Skip to content

Commit 6567071

Browse files
committed
Moved all asset packing steps into single target across modules, added debug delay
1 parent 869ca8d commit 6567071

File tree

4 files changed

+17
-19
lines changed

4 files changed

+17
-19
lines changed

examples/game/Makefile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ packagingFlags = $(ENV_VARS) --excludes "$(packagingExcludes)"
5050
compileFlags += -I $(vendorDir)/glfw/include -I $(vendorDir)/glm -I $(vendorDir)/freetype/include
5151
linkFlags += -l core -l window -l render -l resources -l utils
5252

53-
.PHONY: all game-assets render-assets
53+
.PHONY: all pack-assets
5454

55-
all: $(exampleGameApp) game-assets render-assets
55+
all: $(exampleGameApp) pack-assets
5656

5757
# Link the object files and create an executable
5858
$(exampleGameApp): $(utilsLib) $(windowLib) $(renderLib) $(coreLib) $(exampleGameObjects)
@@ -67,15 +67,13 @@ $(exampleGameBinDir)/%.o: $(exampleGameSrcDir)/%.cpp
6767
$(MKDIR) $(call platformpth, $(@D))
6868
$(CXX) -MMD -MP -c $(compileFlags) -I $(engineDir) $< -o $@ $(CXXFLAGS)
6969

70-
# Copy assets directory to the build directory
71-
game-assets:
70+
# Copy assets directory to the build directory and pack them
71+
pack-assets:
7272
$(MKDIR) $(call platformpth, $(exampleGameBuildDir)/assets)
7373
$(call COPY,$(exampleGameSrcDir)/assets,$(exampleGameBuildDir)/assets,**)
74-
75-
# Copy assets (and other required build files) directory to the build directory
76-
render-assets:
7774
$(MKDIR) $(call platformpth,$(exampleGameBuildDir)/assets/shaders)
7875
$(call COPY,$(binDir)/engine/render/build/assets/shaders,$(exampleGameBuildDir)/assets/shaders,**)
76+
powershell Start-Sleep -Seconds 10.0
7977
$(packerApp) $(exampleGameBuildDir)/app.pck $(exampleGameBuildDir) $(exampleGameAssets)
8078
$(RM) $(call platformpth,$(exampleGameBuildDir)/assets)
8179

examples/render/Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ packagingFlags = $(ENV_VARS) --excludes "$(packagingExcludes)"
4949
compileFlags += -I $(vendorDir)/glfw/include -I $(vendorDir)/glm -I $(vendorDir)/freetype/include
5050
linkFlags += -l render -l window -l resources -l utils
5151

52-
.PHONY: all render-assets
52+
.PHONY: all pack-assets
5353

54-
all: $(exampleRenderApp) render-assets
54+
all: $(exampleRenderApp) pack-assets
5555

5656
# Link the object files and create an executable
5757
$(exampleRenderApp): $(renderLib) $(exampleRenderObjects)
@@ -66,12 +66,13 @@ $(exampleRenderBinDir)/%.o: $(exampleRenderSrcDir)/%.cpp
6666
$(MKDIR) $(call platformpth, $(@D))
6767
$(CXX) -MMD -MP -c $(compileFlags) -I $(engineDir) $< -o $@ $(CXXFLAGS)
6868

69-
# Copy assets (and other required build files) directory to the build directory
70-
render-assets:
69+
# Copy assets directory to the build directory and pack them
70+
pack-assets:
7171
$(MKDIR) $(call platformpth, $(exampleRenderBuildDir)/assets)
7272
$(call COPY,$(exampleRenderSrcDir)/assets,$(exampleRenderBuildDir)/assets,**)
7373
$(MKDIR) $(call platformpth,$(exampleRenderBuildDir)/assets/shaders)
7474
$(call COPY,$(binDir)/engine/render/build/assets/shaders,$(exampleRenderBuildDir)/assets/shaders,**)
75+
powershell Start-Sleep -Seconds 10.0
7576
$(packerApp) $(exampleRenderBuildDir)/app.pck $(exampleRenderBuildDir) $(exampleRenderAssets)
7677
$(RM) $(call platformpth,$(exampleRenderBuildDir)/assets)
7778

examples/tilemap/Makefile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ packagingFlags = $(ENV_VARS) --excludes "$(packagingExcludes)"
4848
compileFlags += -I $(vendorDir)/glfw/include -I $(vendorDir)/glm -I $(vendorDir)/freetype/include
4949
linkFlags += -l render -l window -l resources -l utils
5050

51-
.PHONY: all render-assets tilemap-assets
51+
.PHONY: all pack-assets
5252

53-
all: $(exampleTilemapApp) tilemap-assets render-assets
53+
all: $(exampleTilemapApp) pack-assets
5454

5555
# Link the object files and create an executable
5656
$(exampleTilemapApp): $(renderLib) $(exampleTilemapObjects)
@@ -65,15 +65,13 @@ $(exampleTilemapBinDir)/%.o: $(exampleTilemapSrcDir)/%.cpp
6565
$(MKDIR) $(call platformpth, $(@D))
6666
$(CXX) -MMD -MP -c $(compileFlags) -I $(engineDir) $< -o $@ $(CXXFLAGS)
6767

68-
# Copy assets directory to the build directory
69-
tilemap-assets:
68+
# Copy assets directory to the build directory and pack them
69+
pack-assets:
7070
$(MKDIR) $(call platformpth, $(exampleTilemapBuildDir)/assets)
7171
$(call COPY,$(exampleTilemapSrcDir)/assets,$(exampleTilemapBuildDir)/assets,**)
72-
73-
# Copy assets (and other required build files) directory to the build directory
74-
render-assets:
7572
$(MKDIR) $(call platformpth,$(exampleTilemapBuildDir)/assets/shaders)
7673
$(call COPY,$(binDir)/engine/render/build/assets/shaders,$(exampleTilemapBuildDir)/assets/shaders,**)
74+
powershell Start-Sleep -Seconds 10.0
7775
$(packerApp) $(exampleTilemapBuildDir)/app.pck $(exampleTilemapBuildDir) $(exampleTilemapAssets)
7876
$(RM) $(call platformpth,$(exampleTilemapBuildDir)/assets)
7977

tests/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ $(utestIncludeDir):
4747
$(MKDIR) $(call platformpth, $(utestIncludeDir))
4848
$(call COPY,$(vendorDir)/utest.h,$(utestIncludeDir),utest.h)
4949

50-
# Copy the data directory to the build directory
50+
# Copy the data directory to the build directory, and pack them
5151
test-data:
5252
$(MKDIR) $(call platformpth,$(testBuildDir)/data)
5353
$(call COPY,$(testSrcDir)/data,$(testBuildDir)/data,**)
54+
powershell Start-Sleep -Seconds 10.0
5455
$(packerApp) $(testBuildDir)/app.pck $(testBuildDir) $(testAssets)

0 commit comments

Comments
 (0)