X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=tools%2Fgltest%2FMakefile;fp=tools%2Fgltest%2FMakefile;h=74a02033c9d1c5f5f7abffca15e9bfc723a1b903;hp=0000000000000000000000000000000000000000;hb=1fc50fb52faab54b3d5e160d3765d866c6cf173a;hpb=45f6f46fe758d15aafccdb69ae837fc7d84ee466 diff --git a/tools/gltest/Makefile b/tools/gltest/Makefile new file mode 100644 index 0000000..74a0203 --- /dev/null +++ b/tools/gltest/Makefile @@ -0,0 +1,30 @@ +root = ../.. + +src = $(wildcard src/*.c) \ + $(root)/src/bsptree.c \ + $(root)/src/polyclip.c \ + $(root)/src/mesh.c \ + $(root)/src/meshload.c \ + $(root)/src/dynarr.c \ + $(root)/src/rbtree.c +obj = $(src:.c=.o) +dep = $(obj:.o=.d) +bin = test + +incpath = -I$(root)/src +libpath = -L$(root)/libs/imago -L$(root)/libs/mikmod + +CFLAGS = -pedantic -Wall -g $(incpath) +LDFLAGS = -lGL -lGLU -lglut -lm -limago -lmikmod + +$(bin): $(obj) + $(CC) -o $@ $(obj) $(LDFLAGS) + +-include $(dep) + +%.d: %.c + @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ + +.PHONY: clean +clean: + rm -f src/*.o