diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -26,8 +26,10 @@ PROG_DIR= PROG_OUT_DIR=$(BUILD_DIR)$(PROG_DIR) PROG_SRCS=$(shell find $(SRC_DIR) -iname \*.c) PROG_OBJS=$(PROG_SRCS:.c=.o) -PROG_DIRS_sub=$(subst $(SRC_DIR),$(PROG_OUT_DIR),$(PROG_SRCS)) -PROGS=$(PROG_DIRS_sub:.c=) +PROG_DIRS_sub=$(shell find $(SRC_DIR) -type d) +PROG_DIRS=$(subst $(SRC_DIR),$(PROG_OUT_DIR),$(PROG_DIRS_sub)) +PROGS_sub=$(subst $(SRC_DIR),$(PROG_OUT_DIR),$(PROG_SRCS)) +PROGS=$(PROGS_sub:.c=) # Include raylib if we want a visual experience ifdef RAYLIB @@ -79,4 +81,4 @@ $(LIB_OBJ_DIR)%.o: $(LIB_DIR)%.c clean: @echo Cleaning build files... @-rm -rf $(OBJ_DIR) $(BUILD_DIR) - @mkdir -p $(BUILD_DIR) $(SRC_OBJ_DIRS) $(LIB_OBJ_DIRS) + @mkdir -p $(BUILD_DIR) $(SRC_OBJ_DIRS) $(LIB_OBJ_DIRS) $(PROG_DIRS) |