X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=Makefile;h=89d1c4482abf3ba3291ac9508d756498340c7080;hb=HEAD;hp=1435f526e530aaaa61d0b2819001fb952fb47e13;hpb=d05988274bf2ff6274e2c874976681aa989b7d89;p=cyberay diff --git a/Makefile b/Makefile index 1435f52..89d1c44 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,21 @@ -src = $(wildcard src/*.c) +src = $(wildcard src/*.c) $(wildcard libs/miniglut/*.c) obj = $(src:.c=.o) dep = $(src:.c=.d) bin = cyberay -opt = -O3 -ffast-math +opt = -O3 -ffast-math -fno-strict-aliasing dbg = -g warn = -pedantic -Wall +def = -DMINIGLUT_USE_LIBC +inc = -Ilibs -Ilibs/treestore -Ilibs/miniglut +libdir = -Llibs/treestore -CFLAGS = $(warn) $(opt) $(dbg) -pthread -MMD -LDFLAGS = $(libgl) -lm -pthread +CFLAGS = $(warn) $(opt) $(dbg) $(def) $(inc) -pthread -MMD +LDFLAGS = $(libgl) $(libs) -lm -pthread -limago -ltreestore -libgl = -lGL -lGLU -lglut +libgl = -lGL -lGLU -lX11 -lXext -$(bin): $(obj) +$(bin): $(obj) libs $(CC) -o $@ $(obj) $(LDFLAGS) -include $(dep) @@ -24,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