diff --git a/tools/scaninc/scaninc.cpp b/tools/scaninc/scaninc.cpp index 2dc9f1c1..bb33ae97 100755 --- a/tools/scaninc/scaninc.cpp +++ b/tools/scaninc/scaninc.cpp @@ -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()) diff --git a/tools/tmc_strings/Makefile b/tools/tmc_strings/Makefile index a7e50964..4f77fac1 100644 --- a/tools/tmc_strings/Makefile +++ b/tools/tmc_strings/Makefile @@ -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