fix include paths
[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 incdir = -Isrc/3dengfx/src -Ilibs -Ilibs/png -Ilibs/jpeglib -Ilibs/ogg -Ilibs/vorbis
13 CXXFLAGS = -ansi -pedantic -Wall $(opt) $(incdir) -MMD `sdl-config --cflags`
14 CFLAGS = -std=c89 -pedantic -Wall $(opt) $(incdir) -MMD `sdl-config --cflags`
15 libs = -Llibs src/3dengfx/lib3dengfx.a `sdl-config --libs` -lGL -lvorbis -logg \
16            -ljpeg -lpng -lz -l3ds
17
18 $(bin): $(obj) 3dengfx libs
19         $(CXX) -o $@ $(obj) $(libs)
20
21 .PHONY: 3dengfx
22 3dengfx:
23         $(MAKE) -C src/3dengfx
24
25 .PHONY: 3dengfx-clean
26 3dengfx-clean:
27         $(MAKE) -C src/3dengfx clean
28
29 -include $(obj:.o=.d)
30
31 .PHONY: clean
32 clean:
33         $(RM) $(obj) $(bin)
34
35 .PHONY: clean-all
36 clean-all: clean 3dengfx-clean cleandep clean-libs
37
38 .PHONY: cleandep
39 cleandep:
40         $(RM) $(obj:.o=.d)
41
42 .PHONY: libs
43 libs:
44         $(MAKE) -C libs
45
46 .PHONY: clean-libs
47 clean-libs:
48         $(MAKE) -C libs clean