aboutsummaryrefslogtreecommitdiff
path: root/09-september/Makefile
blob: c6add7a6dfca6803f2d03254d8f9b0b359f26ab8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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)