Skip to content

Commit

Permalink
Utilize .d files deeper in the build dir (#6)
Browse files Browse the repository at this point in the history
Unfortunately make doesn't support glob `**`, so we need to provide different wildcards for `.d` files
  • Loading branch information
anacierdem authored Nov 17, 2024
1 parent 8aa4106 commit 2f032e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ $(FILESYSTEM_DIR)/%.xm64: $(ASSETS_DIR)/%.xm
define MINIGAME_template
SRC_$(1) = \
$$(wildcard $$(MINIGAME_DIR)/$(1)/*.c) \
$$(wildcard $$(MINIGAME_DIR)/$(1)/**/*.c) \
$$(wildcard $$(MINIGAME_DIR)/$(1)/*/*.c) \
$$(wildcard $$(MINIGAME_DIR)/$(1)/*.cpp) \
$$(wildcard $$(MINIGAME_DIR)/$(1)/**/*.cpp)
$$(wildcard $$(MINIGAME_DIR)/$(1)/*/*.cpp)
$$(MINIGAMEDSO_DIR)/$(1).dso: $$(SRC_$(1):%.cpp=$$(BUILD_DIR)/%.o)
$$(MINIGAMEDSO_DIR)/$(1).dso: $$(SRC_$(1):%.c=$$(BUILD_DIR)/%.o)
-include $$(MINIGAME_DIR)/$(1)/$(1).mk
Expand All @@ -90,6 +90,6 @@ $(BUILD_DIR)/$(ROMNAME).msym: $(BUILD_DIR)/$(ROMNAME).elf
clean:
rm -rf $(BUILD_DIR) $(FILESYSTEM_DIR) $(DSO_LIST) $(ROMNAME).z64

-include $(wildcard $(BUILD_DIR)/*.d)
-include $(wildcard $(BUILD_DIR)/*.d) $(wildcard $(BUILD_DIR)/*/*.d) $(wildcard $(BUILD_DIR)/*/*/*.d) $(wildcard $(BUILD_DIR)/*/*/*/*.d)

.PHONY: all clean

0 comments on commit 2f032e8

Please sign in to comment.