aboutsummaryrefslogtreecommitdiff
path: root/09-september/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '09-september/Makefile')
-rw-r--r--09-september/Makefile45
1 files changed, 45 insertions, 0 deletions
diff --git a/09-september/Makefile b/09-september/Makefile
new file mode 100644
index 0000000..c6add7a
--- /dev/null
+++ b/09-september/Makefile
@@ -0,0 +1,45 @@
+OBJDIR = obj
+RENDERDIR = tomcat/renderer
+MATHDIR = tomcat/math
+UTILDIR = tomcat/util
+PARTICLESDIR = tomcat/particles
+
+RENDEROBJ = $(RENDERDIR)/camera.o \
+ $(RENDERDIR)/entity.o \
+ $(RENDERDIR)/mesh.o \
+ $(RENDERDIR)/model.o \
+ $(RENDERDIR)/renderer.o \
+ $(RENDERDIR)/shader.o \
+ $(RENDERDIR)/texture.o \
+ $(RENDERDIR)/window.o
+
+MATHOBJ = $(MATHDIR)/math_util.o \
+ $(MATHDIR)/matrix4x4.o \
+ $(MATHDIR)/vector.o
+
+UTILOBJ = $(UTILDIR)/array.o \
+ $(UTILDIR)/str.o \
+ $(UTILDIR)/util.o \
+ $(UTILDIR)/util_time.o
+
+PARTICLESOBJ = $(PARTICLESDIR)/particles.o
+
+BASEOBJ = tomcat/input.o tomcat/terrain.o
+
+OBJS = main.o Draw.o LoadResources.o ProcessInput.o player.o $(RENDEROBJ) \
+ $(MATHOBJ) $(UTILOBJ) $(PARTICLESOBJ) $(BASEOBJ)
+
+TARGET = game
+CFLAGS = -g -std=c99 -Wall
+LDFLAGS = -lSDL2 -lSDL2_image -lGL -lGLEW -lm
+
+all: $(OBJS)
+ $(CC) $(LDFLAGS) $(OBJS) -o $(TARGET)
+
+%.o : %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+
+.PHONY: clean
+clean:
+ @rm -f $(OBJS) $(TARGET)