Skip to content

Commit 8ac75e1

Browse files
Raelrjonjondev
authored andcommitted
Updated asset copying across modules
1 parent 6567071 commit 8ac75e1

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

examples/game/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ $(exampleGameBinDir)/%.o: $(exampleGameSrcDir)/%.cpp
7070
# Copy assets directory to the build directory and pack them
7171
pack-assets:
7272
$(MKDIR) $(call platformpth, $(exampleGameBuildDir)/assets)
73-
$(call COPY,$(exampleGameSrcDir)/assets,$(exampleGameBuildDir)/assets,**)
73+
$(call COPY,$(exampleGameSrcDir)/assets,$(exampleGameBuildDir)/assets,"$(WCARD)")
7474
$(MKDIR) $(call platformpth,$(exampleGameBuildDir)/assets/shaders)
75-
$(call COPY,$(binDir)/engine/render/build/assets/shaders,$(exampleGameBuildDir)/assets/shaders,**)
75+
$(call COPY,$(binDir)/engine/render/build/assets/shaders,$(exampleGameBuildDir)/assets/shaders,"$(WCARD)")
7676
powershell Start-Sleep -Seconds 10.0
7777
$(packerApp) $(exampleGameBuildDir)/app.pck $(exampleGameBuildDir) $(exampleGameAssets)
7878
$(RM) $(call platformpth,$(exampleGameBuildDir)/assets)

examples/render/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ $(exampleRenderBinDir)/%.o: $(exampleRenderSrcDir)/%.cpp
6969
# Copy assets directory to the build directory and pack them
7070
pack-assets:
7171
$(MKDIR) $(call platformpth, $(exampleRenderBuildDir)/assets)
72-
$(call COPY,$(exampleRenderSrcDir)/assets,$(exampleRenderBuildDir)/assets,**)
72+
$(call COPY,$(exampleRenderSrcDir)/assets,$(exampleRenderBuildDir)/assets,"$(WCARD)")
7373
$(MKDIR) $(call platformpth,$(exampleRenderBuildDir)/assets/shaders)
74-
$(call COPY,$(binDir)/engine/render/build/assets/shaders,$(exampleRenderBuildDir)/assets/shaders,**)
74+
$(call COPY,$(binDir)/engine/render/build/assets/shaders,$(exampleRenderBuildDir)/assets/shaders,"$(WCARD)")
7575
powershell Start-Sleep -Seconds 10.0
7676
$(packerApp) $(exampleRenderBuildDir)/app.pck $(exampleRenderBuildDir) $(exampleRenderAssets)
7777
$(RM) $(call platformpth,$(exampleRenderBuildDir)/assets)

examples/tilemap/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ $(exampleTilemapBinDir)/%.o: $(exampleTilemapSrcDir)/%.cpp
6868
# Copy assets directory to the build directory and pack them
6969
pack-assets:
7070
$(MKDIR) $(call platformpth, $(exampleTilemapBuildDir)/assets)
71-
$(call COPY,$(exampleTilemapSrcDir)/assets,$(exampleTilemapBuildDir)/assets,**)
71+
$(call COPY,$(exampleTilemapSrcDir)/assets,$(exampleTilemapBuildDir)/assets,"$(WCARD)")
7272
$(MKDIR) $(call platformpth,$(exampleTilemapBuildDir)/assets/shaders)
73-
$(call COPY,$(binDir)/engine/render/build/assets/shaders,$(exampleTilemapBuildDir)/assets/shaders,**)
73+
$(call COPY,$(binDir)/engine/render/build/assets/shaders,$(exampleTilemapBuildDir)/assets/shaders,"$(WCARD)")
7474
powershell Start-Sleep -Seconds 10.0
7575
$(packerApp) $(exampleTilemapBuildDir)/app.pck $(exampleTilemapBuildDir) $(exampleTilemapAssets)
7676
$(RM) $(call platformpth,$(exampleTilemapBuildDir)/assets)

make/Platform.mk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ ifeq ($(OS), Windows_NT)
1111
platform := windows
1212
CXX ?= g++
1313
THEN := &&
14+
WCARD := *.*
1415
PATHSEP := \$(BLANK)
1516
MKDIR = powershell -executionpolicy bypass $(scriptsDir)/mkdir.ps1
1617
RM = powershell -executionpolicy bypass $(scriptsDir)/rm.ps1
1718
EXE_NAME := .exe
1819
VOLK_OS := WIN32_KHR
19-
COPY = powershell -executionpolicy bypass $(scriptsDir)/copy.ps1 $1 $2 $3
20+
COPY = powershell -executionpolicy bypass $(scriptsDir)/copy.ps1 -Source $1 -Destination $2 -Filter $3
2021
BASENAME = $(basename $1)
2122
VALIDATION_LAYERS_INSTALL_DIR := explicit_layer.d
2223
BUILD_FLAGS_SCRIPT = powershell -executionpolicy bypass $(scriptsDir)/buildflags.ps1 --Target $1 --CXXFlags $2 --Dirs $3
@@ -40,6 +41,7 @@ else
4041
endif
4142

4243
# Set UNIX macros
44+
WCARD := **
4345
THEN := ;
4446
PATHSEP := /
4547
MKDIR := mkdir -p
@@ -52,4 +54,4 @@ else
5254
BUILD_LIB = $(scriptsDir)/combinelibs.sh --src_objs $1 --output_dir $2 --output_name $3
5355
COMBINE_LIBS = $(scriptsDir)/combinelibs.sh --src_libs $1 --src_objs $2 --output_dir $3 --output_name $4
5456
PACKAGE_SCRIPT = $(scriptsDir)/package.sh $1 $2 $3 $4 $5
55-
endif
57+
endif

tests/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,5 @@ $(utestIncludeDir):
5050
# Copy the data directory to the build directory, and pack them
5151
test-data:
5252
$(MKDIR) $(call platformpth,$(testBuildDir)/data)
53-
$(call COPY,$(testSrcDir)/data,$(testBuildDir)/data,**)
54-
powershell Start-Sleep -Seconds 10.0
55-
$(packerApp) $(testBuildDir)/app.pck $(testBuildDir) $(testAssets)
53+
$(call COPY,$(testSrcDir)/data,$(testBuildDir)/data,"$(WCARD)")
54+
$(packerApp) $(testBuildDir)/app.pck $(testBuildDir) $(testAssets)

0 commit comments

Comments
 (0)