minor gitignore additions
[summerhack] / src / 3dengfx / Makefile
1 PREFIX = /usr/local
2 dbg = -g
3 opt = -O1 -ffast-math -fomit-frame-pointer
4
5 inc_flags = -Isrc -I../../libs -I../../libs/zlib -I../../libs/libpng -I../../libs/jpeglib
6 warn_flags = -Wall -Wno-sign-compare -Wno-strict-aliasing -Wno-char-subscripts
7
8 CXXFLAGS = $(opt) $(dbg) -ansi -pedantic $(warn_flags) -MMD $(inc_flags) \
9                    `sdl-config --cflags`
10 CFLAGS = $(opt) $(dbg) -std=c89 -pedantic $(warn_flags) -MMD $(inc_flags) \
11                  `sdl-config --cflags`
12
13 include src/3dengfx/makefile.part
14 include src/gfx/makefile.part
15 include src/n3dmath2/makefile.part
16 include src/dsys/makefile.part
17 include src/common/makefile.part
18 include src/fxwt/makefile.part
19 include src/sim/makefile.part
20
21 # get all the object files in one variable $(obj)
22 obj = $(3dengfx_obj) \
23           $(gfx_obj) \
24           $(n3dmath2_obj) \
25           $(dsys_obj) \
26           $(common_obj) \
27           $(fxwt_obj) \
28           $(sim_obj)
29
30 lib3dengfx.a: $(obj)
31         $(AR) rcs $@ $(obj)
32
33 -include $(obj:.o=.d)
34
35 .PHONY: clean
36 clean:
37         $(RM) $(obj) lib3dengfx.a
38
39 .PHONY: cleandep
40 cleandep:
41         $(RM) $(obj:.o=.d)