-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmakefile
102 lines (71 loc) · 2.92 KB
/
makefile
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
96
97
98
99
100
101
102
#!/bin/sh
CXX=g++ -w
INC=-I include/ -I include/audio -I include/physics/ -I include/visual/ -I include/visual/ui/
INCDIR=./include/
A_INCDIR=./include/audio/
P_INCDIR=./include/physics/
V_INCDIR=./include/visual/
U_INCDIR=./include/visual/ui/
VPATH=$(INCDIR) $(A_INCDIR) $(P_INCDIR) $(V_INCDIR) $(U_INCDIR)
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
FLAGS=-D__UNIX_JACK__ -c
LIBS=-lasound -lpthread -ljack -lstdc++ -lm -lglut -lGL -lGLU
endif
ifeq ($(UNAME), Darwin)
FLAGS=-D__MACOSX_CORE__ -c
LIBS=-framework CoreAudio -framework CoreMIDI -framework CoreFoundation \
-framework IOKit -framework Carbon -framework OpenGL \
-framework GLUT -framework Foundation -framework AppKit \
-lstdc++ -lm
endif
A_OBJS = ClassicWaveform.o DigitalFilter.o fft.o RtAudio.o RtMidi.o Thread.o Stk.o UGenChain.o UGenGraphBuilder.o UnitGenerator.o
P_OBJS = Physics.o vmath.o
V_OBJS = Disc.o Graphics.o Orb.o World.o
U_OBJS = Menu.o RgbImage.o
CollideFx: $(A_OBJS) $(P_OBJS) $(V_OBJS) $(U_OBJS) CollideFx.o
$(CXX) -o CollideFx $(INC) $(A_OBJS) $(P_OBJS) $(V_OBJS) $(U_OBJS) CollideFx.o $(LIBS)
CollideFx.o: CollideFx.cpp DigitalFilter.h
$(CXX) $(FLAGS) $(INC) CollideFx.cpp
#------------------Audio modules-----------------#
ClassicWaveform.o: ClassicWaveform.cpp ClassicWaveform.h
$(CXX) $(FLAGS) $(INC) $(A_INCDIR)ClassicWaveform.cpp
DigitalFilter.o: DigitalFilter.cpp DigitalFilter.h
$(CXX) $(FLAGS) $(INC) $(A_INCDIR)DigitalFilter.cpp
fft.o: fft.cpp fft.h
$(CXX) $(FLAGS) $(INC) $(A_INCDIR)fft.cpp
RtAudio.o: RtAudio.h RtError.h RtAudio.cpp
$(CXX) $(FLAGS) $(INC) $(A_INCDIR)RtAudio.cpp
RtMidi.o: RtMidi.h RtError.h RtMidi.cpp
$(CXX) $(FLAGS) $(INC) $(A_INCDIR)RtMidi.cpp
Stk.o: Stk.h Stk.cpp
$(CXX) $(FLAGS) $(INC) $(A_INCDIR)Stk.cpp
Thread.o: Thread.h Thread.cpp
$(CXX) $(FLAGS) $(INC) $(A_INCDIR)Thread.cpp
UGenChain.o: UGenChain.cpp UGenChain.h
$(CXX) $(FLAGS) $(INC) $(A_INCDIR)UGenChain.cpp
UGenGraphBuilder.o: UGenGraphBuilder.cpp UGenGraphBuilder.h
$(CXX) $(FLAGS) $(INC) $(A_INCDIR)UGenGraphBuilder.cpp
UnitGenerator.o: UnitGenerator.cpp UnitGenerator.h
$(CXX) $(FLAGS) $(INC) $(A_INCDIR)UnitGenerator.cpp
#-----------------Physics modules----------------#
Physics.o: Physics.cpp Physics.h Physical.h
$(CXX) $(FLAGS) $(INC) $(P_INCDIR)Physics.cpp
vmath.o: vmath.cpp vmath.h
$(CXX) $(FLAGS) $(INC) $(P_INCDIR)vmath.cpp
#------------------Visual modules----------------#
Disc.o: Disc.cpp Disc.h Drawable.h Moveable.h Physical.h
$(CXX) $(FLAGS) $(INC) $(V_INCDIR)Disc.cpp
Graphics.o: Graphics.cpp Graphics.h
$(CXX) $(FLAGS) $(INC) $(V_INCDIR)Graphics.cpp
Orb.o: Orb.cpp Orb.h
$(CXX) $(FLAGS) $(INC) $(V_INCDIR)Orb.cpp
World.o: World.cpp World.h Drawable.h
$(CXX) $(FLAGS) $(INC) $(V_INCDIR)World.cpp
#------------------UI modules----------------#
Menu.o: Menu.cpp Menu.h
$(CXX) $(FLAGS) $(INC) $(U_INCDIR)Menu.cpp
RgbImage.o: RgbImage.cpp RgbImage.h
$(CXX) $(FLAGS) $(INC) $(U_INCDIR)RgbImage.cpp
clean:
rm -f *~ *# *.o CollideFx