-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile-rpi
executable file
·56 lines (37 loc) · 1.07 KB
/
makefile-rpi
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
CC=g++ -std=c++1y -ggdb -O3 -Wno-invalid-offsetof -DRASPBERRY_PI -g \
-I./ -I/usr/include/mozjs-24 -I/usr/include/SDL2 \
-I/usr/local/include -I/usr/include -I/opt/vc/include
# Raspberry
LIBS=-Wl,-Bstatic \
-lSDL2_gpu \
-Wl,-Bdynamic \
-L/usr/lib/arm-linux-gnueabihf \
-lSDL2_image -lSDL2_ttf -lSDL2_mixer -lmozjs-24 \
-lSDL2 \
-L/opt/vc/lib/ -lEGL -lGLESv2
CPP_FILES := $(wildcard src/*.cpp) $(wildcard Box2D/**/*.cpp) $(wildcard Box2D/**/**/*.cpp)
OBJ_FILES := $(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
make: $(OBJ_FILES)
$(CC) $^ -o ./aviko $(LIBS)
obj/%.o: src/%.cpp
$(CC) -c -o $@ $<
obj/%.o: Box2D/Collision/Shapes/%.cpp
$(CC) -c -o $@ $<
obj/%.o: Box2D/Collision/%.cpp
$(CC) -c -o $@ $<
obj/%.o: Box2D/Common/%.cpp
$(CC) -c -o $@ $<
obj/%.o: Box2D/Dynamics/%.cpp
$(CC) -c -o $@ $<
obj/%.o: Box2D/Dynamics/Contacts/%.cpp
$(CC) -c -o $@ $<
obj/%.o: Box2D/Dynamics/Joints/%.cpp
$(CC) -c -o $@ $<
obj/%.o: Box2D/Particle/%.cpp
$(CC) -c -o $@ $<
obj/%.o: Box2D/Rope/%.cpp
$(CC) -c -o $@ $<
clean:
rm obj/*.o ./aviko
install:
cp ./aviko /usr/local/bin