SGI makefile for mklevel
authorJohn Tsiombikas <nuclear@member.fsf.org>
Sat, 1 Apr 2023 20:02:20 +0000 (22:02 +0200)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Sat, 1 Apr 2023 20:02:20 +0000 (22:02 +0200)
tools/mklevel/GNUmakefile
tools/mklevel/Makefile [new file with mode: 0644]

index 23719c7..a991897 100644 (file)
@@ -10,7 +10,7 @@ libdir = ../../libs/unix
 libs = $(libdir)/goat3d.a $(libdir)/treestor.a
 
 CC = gcc
-CFLAGS = $(warn) $(dbg) -MMD
+CFLAGS = $(warn) $(dbg) $(inc) -MMD
 LDFLAGS = $(libs) -lm
 
 $(bin): $(obj) $(libs)
diff --git a/tools/mklevel/Makefile b/tools/mklevel/Makefile
new file mode 100644 (file)
index 0000000..b960c60
--- /dev/null
@@ -0,0 +1,25 @@
+obj = src/main.o
+bin = mklevel
+
+dbg = -g
+inc = -I../../libs -I../../libs/goat3d/include -I../../libs/treestor/include
+libdir = ../../libs/unix
+libs = $(libdir)/goat3d.a $(libdir)/treestor.a
+
+CFLAGS = $(dbg) $(inc)
+LDFLAGS = $(libs) -lm
+
+$(bin): $(obj) $(libs)
+       $(CC) -o $@ $(obj) $(LDFLAGS)
+
+.c.o:
+       $(CC) $(CFLAGS) -o $@ -c $<
+
+clean:
+       rm -f $(obj) $(bin)
+
+$(libdir)/goat3d.a:
+       cd ../../libs/goat3d; $(MAKE)
+
+$(libdir)/treestor.a:
+       cd ../../libs/treestor; $(MAKE)