diff --git a/assets/Makefile b/assets/Makefile index 1262748e..4b8e7f8c 100644 --- a/assets/Makefile +++ b/assets/Makefile @@ -63,6 +63,53 @@ all: # TEMP EFROCACHE TESTING------------------------------------------------ +build/testfile_a: ../.efrocachemap + cd .. && tools/snippets efrocache_get assets/$@ + +EFROCACHE_FILES = build/testfile_a + +# Build everything we want available in efrocache +efrocache_build: $(EFROCACHE_FILES) + +# Print everything in efrocache +efrocache_list: + @echo $(EFROCACHE_FILES) +# --------------------------------------------------------------------- + + + +# Build everything needed for desktop platforms (mac, windows, linux). +desktop: + @test -d ${ASSET_SRC_MASTER_DIR} && make asset_sources || true + @${TOOLS_DIR}/convert_util --init-asset-cache + @make assets-desktop + @${TOOLS_DIR}/snippets clean_orphaned_assets + +# Build everything needed for ios. +ios: + @test -d ${ASSET_SRC_MASTER_DIR} && make asset_sources || true + @${TOOLS_DIR}/convert_util --init-asset-cache + @make assets-ios + @${TOOLS_DIR}/snippets clean_orphaned_assets + +# Build everything needed for android. +android: + @test -d ${ASSET_SRC_MASTER_DIR} && make asset_sources || true + @${TOOLS_DIR}/convert_util --init-asset-cache + @make assets-android + @${TOOLS_DIR}/snippets clean_orphaned_assets + +MAKE_AUDIO = 1 +MAKE_TEXTURES = 1 +MAKE_SCRIPTS = 1 +MAKE_FONTS = 1 +MAKE_DATA = 1 + +ASSET_TARGETS_COMMON = +ASSET_TARGETS_DESKTOP = +ASSET_TARGETS_IOS = +ASSET_TARGETS_ANDROID = + # Audio. ifeq ($(MAKE_AUDIO),1) diff --git a/tools/efrotools/efrocache.py b/tools/efrotools/efrocache.py index 4d26599d..6c18532d 100644 --- a/tools/efrotools/efrocache.py +++ b/tools/efrotools/efrocache.py @@ -112,7 +112,7 @@ def filter_makefile(makefile_dir: str, contents: str) -> str: # Strip out parts they don't want. while STRIP_BEGIN_TAG in lines: - index = lines.index(TARGET_TAG) + index = lines.index(STRIP_BEGIN_TAG) endindex = index while lines[endindex] != STRIP_END_TAG: endindex += 1 @@ -128,7 +128,7 @@ def filter_makefile(makefile_dir: str, contents: str) -> str: del lines[index:endindex] lines.insert(index, tname + ': ' + cachemap) target = (makefile_dir + '/' + '$@') if makefile_dir else '$@' - pre = 'cd {to_proj_root} && ' if makefile_dir else '' + pre = f'cd {to_proj_root} && ' if makefile_dir else '' lines.insert(index + 1, f'\t{pre}{snippets} efrocache_get {target}') return '\n'.join(lines) + '\n'