X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=Makefile;h=08cc64b76ef9ffb46deb940599884bc13ed961ec;hb=8de1d701e4e9a45e7ed69ccf1fc298514fed5d8f;hp=4661524a7b4a2ce2c0d361146d0b799e504276af;hpb=8823811bf3bc8d38b4ee10487d5d095427afed45;p=vrlugburz diff --git a/Makefile b/Makefile index 4661524..08cc64b 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,25 @@ src = $(wildcard src/*.c) obj = $(src:.c=.o) -bin = lugburz +dep = $(src:.c=.d) +bin = game #opt = -O3 dbg = -g warn = -pedantic -Wall def = -DMINIGLUT_USE_LIBC +inc = -Ilibs -Ilibs/treestore -Ilibs/drawtext +libdir = -Llibs/treestore -Llibs/imago -Llibs/drawtext CFLAGS = $(warn) $(opt) $(dbg) $(def) $(inc) -fcommon -MMD -LDFLAGS = -lGL -lX11 -lm +LDFLAGS = $(libdir) -ldrawtext -limago -ltreestore $(libgl) -lm -$(bin): $(obj) +libgl = -lGL -lX11 -lXext + +$(bin): $(obj) libs $(CC) -o $@ $(obj) $(LDFLAGS) +-include $(dep) + .PHONY: clean clean: rm -f $(obj) $(bin) @@ -20,3 +27,11 @@ clean: .PHONY: cleandep cleandep: rm -f $(dep) + +.PHONY: libs +libs: + $(MAKE) -C libs + +.PHONY: clean-libs +clean-libs: + $(MAKE) -C libs clean