-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathMakefile
60 lines (52 loc) · 2.28 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
#Makefile
DEV_CFLAGS = -g -Wall -DELF_PLAYER -DELF_LINUX
STA_CFLAGS = -Wall -O2 -DELF_PLAYER -DELF_LINUX
SHR_CFLAGS = -fPIC -Wall -O2 -DELF_LINUX
INCS = -Igfx -Ielf -I/usr/include/lua5.1 -I/usr/include/freetype2
BLENDELF_LIBS = -lGL -lGLEW -lglfw -lXxf86vm -lXrandr -lXrender -pthread \
-lfreeimage -lvorbisfile -lvorbis -logg -lopenal -llua5.1 -lfreetype \
-lBulletDynamics -lLinearMath -lBulletCollision -lenet -lassimp
BLENDELF_STATIC_LIBS = -lGL -lGLU /usr/lib/libGLEW.a /usr/lib/libglfw.a \
/usr/lib/libXxf86vm.a /usr/lib/libXrandr.a /usr/lib/libXrender.a \
/usr/lib/libvorbisfile.a /usr/lib/libvorbis.a /usr/lib/libogg.a \
/usr/lib/liblua5.1.a /usr/local/lib/libenet.a \
/usr/local/lib/libBulletDynamics.a \
/usr/local/lib/libLinearMath.a \
/usr/local/lib/libBulletCollision.a \
-lfreeimage -lfreetype -lopenal -pthread
all:
python genwraps.py
gcc -c elf/blendelf.c $(DEV_CFLAGS) $(INCS)
gcc -c gfx/gfx.c $(DEV_CFLAGS) $(INCS)
gcc -c elf/audio.c $(DEV_CFLAGS) $(INCS)
gcc -c elf/scripting.c $(DEV_CFLAGS) $(INCS)
gcc -c elf/network.c $(DEV_CFLAGS) $(INCS)
g++ -c elf/physics.cpp $(DEV_CFLAGS) $(INCS)
g++ -c elf/binds.cpp $(DEV_CFLAGS) $(INCS)
g++ -c elf/blendelf_wrap.cxx $(DEV_CFLAGS) $(INCS)
gcc -Wl,-rpath,linux_libraries -o blendelf *.o $(DEV_CFLAGS) $(BLENDELF_LIBS)
rm *.o
static:
python genwraps.py
gcc -c elf/blendelf.c $(STA_CFLAGS) $(INCS)
gcc -c gfx/gfx.c $(STA_CFLAGS) $(INCS)
gcc -c elf/audio.c $(STA_CFLAGS) $(INCS)
gcc -c elf/scripting.c $(STA_CFLAGS) $(INCS)
gcc -c elf/network.c $(STA_CFLAGS) $(INCS)
g++ -c elf/physics.cpp $(STA_CFLAGS) $(INCS)
g++ -c elf/binds.cpp $(STA_CFLAGS) $(INCS)
g++ -c elf/blendelf_wrap.cxx $(STA_CFLAGS) $(INCS)
gcc -Wl,-rpath,linux_libraries -o blendelf *.o $(STA_CFLAGS) $(BLENDELF_STATIC_LIBS)
rm *.o
shared:
python genwraps.py
gcc -c -fPIC elf/blendelf.c $(SHR_CFLAGS) $(INCS)
gcc -c -fPIC gfx/gfx.c $(SHR_CFLAGS) $(INCS)
gcc -c -fPIC elf/audio.c $(SHR_CFLAGS) $(INCS)
gcc -c -fPIC elf/scripting.c $(SHR_CFLAGS) $(INCS)
gcc -c -fPIC elf/network.c $(SHR_CFLAGS) $(INCS)
g++ -c -fPIC elf/physics.cpp $(SHR_CFLAGS) $(INCS)
g++ -c -fPIC elf/binds.cpp $(SHR_CFLAGS) $(INCS)
g++ -c -fPIC elf/blendelf_wrap.cxx $(SHR_CFLAGS) $(INCS)
gcc -Wl,-rpath,linux_libraries -shared -o libblendelf.so *.o $(SHR_CFLAGS) $(BLENDELF_STATIC_LIBS)
rm *.o