X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=Makefile;h=159a11908f7fb723bf7052f7460253d7bb862ec8;hb=024e6f9e1a39a9617a737448b60b3ea95d513203;hp=d5f022e3f83c2467e564c1aa7cd115cb496a6fb2;hpb=6e23259dbabaeb1711a2a5ca25b9cb421f693759;p=summerhack diff --git a/Makefile b/Makefile index d5f022e..159a119 100644 --- a/Makefile +++ b/Makefile @@ -9,22 +9,40 @@ obj = $(src:.cpp=.o) $(csrc:.c=.o) opt = -O1 opt = -g -CXXFLAGS = -ansi -pedantic -Wall $(opt) -Isrc/3dengfx/src -MMD `sdl-config --cflags` -CFLAGS = -std=c89 -pedantic -Wall $(opt) -MMD `sdl-config --cflags` -libs = src/3dengfx/lib3dengfx.a `sdl-config --libs` -lGL -lvorbisfile -ljpeg -lpng -lz +incdir = -Isrc/3dengfx/src -Ilibs -Ilibs/png -Ilibs/jpeglib -Ilibs/ogg -Ilibs/vorbis +CXXFLAGS = -ansi -pedantic -Wall $(opt) $(incdir) -MMD `sdl-config --cflags` +CFLAGS = -std=c89 -pedantic -Wall $(opt) $(incdir) -MMD `sdl-config --cflags` +libs = -Llibs src/3dengfx/lib3dengfx.a `sdl-config --libs` -lGL -lvorbis -logg \ + -ljpeg -lpng -lz -l3ds -$(bin): $(obj) src/3dengfx/lib3dengfx.a +$(bin): $(obj) 3dengfx libs $(CXX) -o $@ $(obj) $(libs) -src/3dengfx/lib3dengfx.a: +.PHONY: 3dengfx +3dengfx: $(MAKE) -C src/3dengfx +.PHONY: 3dengfx-clean +3dengfx-clean: + $(MAKE) -C src/3dengfx clean + -include $(obj:.o=.d) .PHONY: clean clean: $(RM) $(obj) $(bin) +.PHONY: clean-all +clean-all: clean 3dengfx-clean cleandep clean-libs + .PHONY: cleandep cleandep: $(RM) $(obj:.o=.d) + +.PHONY: libs +libs: + $(MAKE) -C libs + +.PHONY: clean-libs +clean-libs: + $(MAKE) -C libs clean