diff options
Diffstat (limited to 'sdl/Makefile')
-rw-r--r-- | sdl/Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sdl/Makefile b/sdl/Makefile index e7dfefd..269c69e 100644 --- a/sdl/Makefile +++ b/sdl/Makefile @@ -1,5 +1,6 @@ BIN = pyramid -SRC = pyramid.c math3d.c gltools.c glframe.c shader.c platform.c window.c gldraw.c +SRC = pyramid.c math3d.c gltools.c glframe.c shader.c platform.c window.c \ + gldraw.c sdltools.c CC = gcc CFLAGS = -Wall -std=gnu99 DBGFLAGS = -g -O0 @@ -20,7 +21,7 @@ OBJ_FILES = $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(subst .c,,$(SRC)))) $(BIN): $(OBJ_DIR) $(OBJ_FILES) $(CC) $(LDFLAGS) $(SDL_LDFLAGS) $(SDL_image_LDFLAGS) $(OBJ_FILES) -o $@ -$(OBJ_DIR)/pyramid.o: $(OBJ_DIR)/%.o: %.c math3d.h gltools.h glframe.h platform.h +$(OBJ_DIR)/pyramid.o: $(OBJ_DIR)/%.o: %.c math3d.h gltools.h glframe.h platform.h sdltools.h $(CC) -c $(CFLAGS) $(SDL_CFLAGS) $(SDL_image_CFLAGS) $< -o $@ $(OBJ_DIR)/math3d.o: $(OBJ_DIR)/%.o: %.c %.h @@ -44,6 +45,9 @@ $(OBJ_DIR)/window.o: $(OBJ_DIR)/%.o: %.c %.h $(OBJ_DIR)/gldraw.o: $(OBJ_DIR)/%.o: %.c %.h math3d.h $(CC) -c $(CFLAGS) $< -o $@ +$(OBJ_DIR)/sdltools.o: $(OBJ_DIR)/%.o: %.c %.h math3d.h + $(CC) -c $(CFLAGS) $< -o $@ + $(OBJ_DIR): mkdir -p $(OBJ_DIR) |