-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRules.common
95 lines (79 loc) · 2.33 KB
/
Rules.common
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Definitions for various make thingies.
.SUFFIXES: .c .c++ .o .a
.PHONY: clean_dso clean all
# Operating system.
include $(TOPDIR)/Platform
ifeq "$(PLATFORM)" "VSS_IRIX_53"
PLATFORMBASE := VSS_IRIX
endif
ifeq "$(PLATFORM)" "VSS_IRIX_62"
PLATFORMBASE := VSS_IRIX
endif
ifeq "$(PLATFORM)" "VSS_IRIX_63"
PLATFORMBASE := VSS_IRIX
endif
ifeq "$(PLATFORM)" "VSS_IRIX_65"
PLATFORMBASE := VSS_IRIX
endif
ifeq "$(PLATFORM)" "VSS_LINUX_UBUNTU"
PLATFORMBASE := VSS_LINUX
endif
ifeq "$(PLATFORM)" "VSS_CYGWIN32_NT40"
PLATFORMBASE := VSS_WINDOWS
endif
ifeq "$(PLATFORM)" "VSS_MACOS"
PLATFORMBASE := VSS_MAC
endif
ifeq "$(PLATFORMBASE)" "VSS_IRIX"
VSSLIBS := -laudio -lmd -ldmedia
# -ldmedia is only for dmGetUST(), in platform.c++
ifneq "$(PLATFORM)" "VSS_IRIX_53"
VSSLIBS := -lpthread
endif
endif
CCC := gcc
CC := g++
INC := -I$(TOPDIR)
cFLAGS := $(INC) -D$(PLATFORMBASE) -D$(PLATFORM) -Wall -Ofast -march=native -ffast-math
# -maccumulate-outgoing-args -malign-double -fomit-frame-pointer
# VSS-specific
# cFLAGS += -DVERBOSE
LDFLAGS :=
ifeq "$(PLATFORM)" "VSS_IRIX_53"
cFLAGS += -I/usr/local/gnu/include/g++ -I/usr/local/gnu/mips-sgi-irix5.3/include -mips2
LDFLAGS += -L/usr/local/gnu/lib # to find libstdc++.a
endif
ifeq "$(PLATFORM)" "VSS_IRIX_65"
cFLAGS += -DVSS_IRIX_63PLUS
# -mips3 or -mips4 cause compile errors in STL.
endif
ifeq "$(PLATFORM)" "VSS_IRIX_63"
cFLAGS += -DVSS_IRIX_63PLUS
# -mips3 or -mips4 cause compile errors in STL.
endif
ifeq "$(PLATFORM)" "VSS_LINUX_UBUNTU"
LDFLAGS := -lasound
endif
ifeq "$(PLATFORMBASE)" "VSS_WINDOWS"
# VSS_CYGWIN32_NT40
cFLAGS += -malign-double
# cFLAGS += -I/usr/local/include
# -I/usr/local/include makes vss crash (exception thrown before main()).
# i'm going to remove -mwindows
# maybe do a full build now. also remove -ldsound and -lwinmm.
CYG=/cygdrive/d/cygwin
LDFLAGS := -L $(CYG)/lib -L /usr/local/lib -ldsound -lwinmm -lole32
endif
# Optional file containing debugging options for CFLAGS, LDFLAGS, etc.
# Reach it from the top dir or the subdirs.
-include Rules.debug
-include ../Rules.debug
CFLAGS := $(cFLAGS) -std=c++17
AUDTEST = $(TOPDIR)/../util/audtest # Not yet in this repo.
DEPENDFLAGS = -MMD -MT $@ -MF $(patsubst %.o,.depend/%.d,$@)
%.o: %.c++
@mkdir -p .depend
$(CC) -c $(CFLAGS) $(DEPENDFLAGS) $<
%.o: %.c
@mkdir -p .depend
$(CCC) -c $(cFLAGS) $(DEPENDFLAGS) $<