summaryrefslogtreecommitdiffstats
path: root/glut/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'glut/Makefile')
-rw-r--r--glut/Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/glut/Makefile b/glut/Makefile
new file mode 100644
index 0000000..476be54
--- /dev/null
+++ b/glut/Makefile
@@ -0,0 +1,22 @@
+PROG = pyramid
+OBJS = $(PROG).o math3d.o
+CC = gcc
+DBGFLAGS = -g -O0
+ifdef DEBUG
+ CFLAGS = $(DBGFLAGS) -Wall -std=c99
+else
+ CFLAGS = -Wall -std=c99 -O2 -march=native -mtune=native
+endif
+LFLAGS = -lGLEW -lGL -lGLU -lm -lglut
+
+$(PROG): $(OBJS)
+ $(CC) $(LFLAGS) $(OBJS) -o $(PROG)
+
+$(PROG).o: $(PROG).c math3d.h
+ $(CC) -c $(CFLAGS) $(PROG).c
+
+math3d.o: math3d.c math3d.h
+ $(CC) -c $(CFLAGS) math3d.c
+
+clean:
+ rm -f *.o ./$(PROG)