summaryrefslogtreecommitdiffstats
path: root/sdl/mingw32
diff options
context:
space:
mode:
Diffstat (limited to 'sdl/mingw32')
-rw-r--r--sdl/mingw3233
1 files changed, 33 insertions, 0 deletions
diff --git a/sdl/mingw32 b/sdl/mingw32
new file mode 100644
index 0000000..a43c1ef
--- /dev/null
+++ b/sdl/mingw32
@@ -0,0 +1,33 @@
+PROG = pyramid
+OBJS = $(PROG).o math3d.o gltools.o glframe.o shader.o
+CC = gcc
+DBGFLAGS = -g -O0
+ifdef DEBUG
+ CFLAGS = $(DBGFLAGS) -Wall -std=c99
+else
+ CFLAGS = -Wall -std=c99 -O2 -march=native -mtune=native
+endif
+LDFLAGS = -lglew32 -lopengl32 -lglu32 -lm -lfreeglut -lmingw32 -lsdlmain -lsdl -mwindows
+
+$(PROG): $(OBJS)
+ $(CC) -o $(PROG) $(OBJS) $(LDFLAGS)
+
+$(PROG).o: $(PROG).c math3d.h gltools.h glframe.h
+ $(CC) -c $(CFLAGS) $(PROG).c
+
+math3d.o: math3d.c math3d.h
+ $(CC) -c $(CFLAGS) math3d.c
+
+gltools.o: gltools.c gltools.h math3d.h
+ $(CC) -c $(CFLAGS) gltools.c
+
+glframe.o: glframe.c glframe.h math3d.h
+ $(CC) -c $(CFLAGS) glframe.c
+
+shader.o: shader.c shader.h math3d.h
+ $(CC) -c $(CFLAGS) shader.c
+
+.PHONY: clean
+
+clean:
+ rm -f *.o ./$(PROG)