start level tool
[deeprace] / tools / mklevel / GNUmakefile
diff --git a/tools/mklevel/GNUmakefile b/tools/mklevel/GNUmakefile
new file mode 100644 (file)
index 0000000..23719c7
--- /dev/null
@@ -0,0 +1,33 @@
+src = $(wildcard src/*.c)
+obj = $(src:.c=.o)
+dep = $(src:.c=.d)
+bin = mklevel
+
+warn = -pedantic -Wall
+dbg = -g
+inc = -I../../libs -I../../libs/goat3d/include -I../../libs/treestor/include
+libdir = ../../libs/unix
+libs = $(libdir)/goat3d.a $(libdir)/treestor.a
+
+CC = gcc
+CFLAGS = $(warn) $(dbg) -MMD
+LDFLAGS = $(libs) -lm
+
+$(bin): $(obj) $(libs)
+       $(CC) -o $@ $(obj) $(LDFLAGS)
+
+-include $(dep)
+
+.PHONY: clean
+clean:
+       rm -f $(obj) $(bin)
+
+.PHONY: cleandep
+cleandep:
+       rm -f $(dep)
+
+$(libdir)/goat3d.a:
+       $(MAKE) -C ../../libs/goat3d
+
+$(libdir)/treestor.a:
+       $(MAKE) -C ../../libs/treestor