summaryrefslogtreecommitdiffstats
path: root/sdl/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'sdl/Makefile')
-rw-r--r--sdl/Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/sdl/Makefile b/sdl/Makefile
index 1d881e9..7b878a9 100644
--- a/sdl/Makefile
+++ b/sdl/Makefile
@@ -1,5 +1,5 @@
BIN = pyramid
-SRC = pyramid.c math3d.c gltools.c glframe.c shader.c
+SRC = pyramid.c math3d.c gltools.c glframe.c shader.c platform.c window.c
CC = gcc
CFLAGS = -Wall -std=c99
DBGFLAGS = -g -O0
@@ -21,7 +21,7 @@ OBJ_ABS = $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(subst .c,,$(SRC))))
$(BIN): $(OBJ_DIR) $(OBJ_REL)
$(CC) $(LDFLAGS) $(SDL_LDFLAGS) $(SDL_image_LDFLAGS) $(OBJ_ABS) -o $@
-pyramid.o: %.o: %.c math3d.h gltools.h glframe.h
+pyramid.o: %.o: %.c math3d.h gltools.h glframe.h platform.h
$(CC) -c $(CFLAGS) $(SDL_CFLAGS) $(SDL_image_CFLAGS) $< -o $(OBJ_DIR)/$@
math3d.o: %.o: %.c %.h
@@ -33,9 +33,15 @@ gltools.o: %.o: %.c %.h math3d.h
glframe.o: %.o: %.c %.h math3d.h
$(CC) -c $(CFLAGS) $< -o $(OBJ_DIR)/$@
-shader.o: %.o: %.c %.h math3d.h
+shader.o: %.o: %.c %.h
$(CC) -c $(CFLAGS) $< -o $(OBJ_DIR)/$@
+platform.o: %.o: %.c %.h
+ $(CC) -c $(CFLAGS) $(SDL_CFLAGS) $(SDL_image_CFLAGS) $< -o $(OBJ_DIR)/$@
+
+window.o: %.o: %.c %.h
+ $(CC) -c $(CFLAGS) $(SDL_CFLAGS) $(SDL_image_CFLAGS) $< -o $(OBJ_DIR)/$@
+
$(OBJ_DIR):
mkdir -p $(OBJ_DIR)