added 3dengfx into the repo, probably not the correct version for this
[summerhack] / Makefile
1 src = src/sumhack.cpp src/events.cpp
2 bin = sumhack-thelab
3
4 include src/parts/Makefile-part
5 include src/sdlvf/Makefile-part
6
7
8 obj = $(src:.cpp=.o) $(csrc:.c=.o)
9
10 opt = -O1
11 opt = -g
12 CXXFLAGS = -ansi -pedantic -Wall $(opt) -Isrc/3dengfx/src -MMD `sdl-config --cflags`
13 CFLAGS = -std=c89 -pedantic -Wall $(opt) -MMD `sdl-config --cflags`
14 libs = src/3dengfx/lib3dengfx.a `sdl-config --libs` -lGL -lvorbisfile -ljpeg -lpng -lz
15
16 $(bin): $(obj) src/3dengfx/lib3dengfx.a
17         $(CXX) -o $@ $(obj) $(libs)
18
19 src/3dengfx/lib3dengfx.a:
20         $(MAKE) -C src/3dengfx
21
22 -include $(obj:.o=.d)
23
24 .PHONY: clean
25 clean:
26         $(RM) $(obj) $(bin)
27
28 .PHONY: cleandep
29 cleandep:
30         $(RM) $(obj:.o=.d)