X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=Makefile;fp=Makefile;h=89d1c4482abf3ba3291ac9508d756498340c7080;hb=44dd42b26168034afe1763e0490111be3e7025f5;hp=db3c31a8d7301f07aa97564f74718125b39bb81a;hpb=5caf9953c6c26f649087189222b1359da85d306e;p=cyberay diff --git a/Makefile b/Makefile index db3c31a..89d1c44 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -src = $(wildcard src/*.c) +src = $(wildcard src/*.c) $(wildcard libs/miniglut/*.c) obj = $(src:.c=.o) dep = $(src:.c=.d) bin = cyberay @@ -6,14 +6,16 @@ bin = cyberay opt = -O3 -ffast-math -fno-strict-aliasing dbg = -g warn = -pedantic -Wall -inc = -Ilibs +def = -DMINIGLUT_USE_LIBC +inc = -Ilibs -Ilibs/treestore -Ilibs/miniglut +libdir = -Llibs/treestore -CFLAGS = $(warn) $(opt) $(dbg) -pthread -MMD $(inc) -LDFLAGS = $(libgl) -lm -pthread -limago +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) @@ -25,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