mirror of https://github.com/zeldaret/tmc.git
Fix incbin dependencies to assets
This commit is contained in:
parent
91ad7860b2
commit
fefa865d91
|
@ -93,9 +93,15 @@ int main(int argc, char **argv)
|
||||||
includeDirs.push_back(file.GetSrcDir());
|
includeDirs.push_back(file.GetSrcDir());
|
||||||
for (auto incbin : file.GetIncbins())
|
for (auto incbin : file.GetIncbins())
|
||||||
{
|
{
|
||||||
// TODO add incbin dependencies in correct folder?
|
// Search for the incbin in the include directories as well.
|
||||||
if (incbin.rfind("translations", 0) == 0) {
|
for (auto includeDir : includeDirs)
|
||||||
dependencies.insert(incbin);
|
{
|
||||||
|
std::string path(includeDir + incbin);
|
||||||
|
if (CanOpenFile(path))
|
||||||
|
{
|
||||||
|
dependencies.insert(path).second;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (auto include : file.GetIncludes())
|
for (auto include : file.GetIncludes())
|
||||||
|
|
|
@ -8,7 +8,9 @@ export INCLUDES := -I./
|
||||||
export DIFF := diff
|
export DIFF := diff
|
||||||
export HEXDUMP := hexdump -C
|
export HEXDUMP := hexdump -C
|
||||||
|
|
||||||
all:
|
all: tmc_strings
|
||||||
|
|
||||||
|
tmc_strings: main.cpp
|
||||||
$(CC) -o tmc_strings main.cpp $(CXXFLAGS) $(INCLUDES)
|
$(CC) -o tmc_strings main.cpp $(CXXFLAGS) $(INCLUDES)
|
||||||
|
|
||||||
run: extract pack
|
run: extract pack
|
||||||
|
|
Loading…
Reference in New Issue