Fix incbin dependencies to assets

This commit is contained in:
octorock 2021-11-19 23:13:08 +01:00
parent 91ad7860b2
commit fefa865d91
2 changed files with 12 additions and 4 deletions

View File

@ -93,9 +93,15 @@ int main(int argc, char **argv)
includeDirs.push_back(file.GetSrcDir());
for (auto incbin : file.GetIncbins())
{
// TODO add incbin dependencies in correct folder?
if (incbin.rfind("translations", 0) == 0) {
dependencies.insert(incbin);
// Search for the incbin in the include directories as well.
for (auto includeDir : includeDirs)
{
std::string path(includeDir + incbin);
if (CanOpenFile(path))
{
dependencies.insert(path).second;
break;
}
}
}
for (auto include : file.GetIncludes())

View File

@ -8,7 +8,9 @@ export INCLUDES := -I./
export DIFF := diff
export HEXDUMP := hexdump -C
all:
all: tmc_strings
tmc_strings: main.cpp
$(CC) -o tmc_strings main.cpp $(CXXFLAGS) $(INCLUDES)
run: extract pack