aboutsummaryrefslogtreecommitdiff
path: root/examples/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Makefile')
-rw-r--r--examples/Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/Makefile b/examples/Makefile
new file mode 100644
index 0000000..c2d2176
--- /dev/null
+++ b/examples/Makefile
@@ -0,0 +1,20 @@
+# Build the verite-gl example programs against the in-tree libGL
+
+CC ?= cc
+CFLAGS ?= -O2 -mcpu=603e -fsigned-char -fno-strict-aliasing -ffast-math
+TOP = ..
+GLINC = -I$(TOP)/include
+LIBGL = $(TOP)/lib/libGL.a
+LIBS = -lm
+
+PROGS = cube rave
+
+.PHONY: all clean
+all: $(PROGS)
+
+$(PROGS): %: %.c $(LIBGL)
+ $(CC) $(CFLAGS) $(GLINC) $< $(LIBGL) $(LIBS) -o $@
+
+clean:
+ rm -f $(PROGS)
+