1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-27 07:33:19 +00:00

Merge pull request #112 from rpljwi/make-j1

Some fixes to mymake and Makefile.simple
This commit is contained in:
Zeno Rogue 2020-05-19 16:36:45 +02:00 committed by GitHub
commit 0813fb65ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -152,7 +152,7 @@ langen$(EXE_EXTENSION): langen.cpp language-??.cpp language-ptbr.cpp
makeh$(EXE_EXTENSION): makeh.cpp
$(CXX) -O2 makeh.cpp -o $@
autohdr.h: makeh$(EXE_EXTENSION) *.cpp
autohdr.h: makeh$(EXE_EXTENSION) language-data.cpp *.cpp
./makeh classes.cpp locations.cpp hyperpoint.cpp geometry.cpp goldberg.cpp init.cpp floorshapes.cpp cell.cpp multi.cpp shmup.cpp pattern2.cpp mapeditor.cpp graph.cpp textures.cpp hprint.cpp language.cpp util.cpp complex.cpp *.cpp > autohdr.h
language-data.cpp: langen$(EXE_EXTENSION)

View File

@ -83,8 +83,10 @@ int main(int argc, char **argv) {
set_linux();
#endif
for(string fname: {"Makefile.loc", "Makefile.simple", "Makefile"})
if(file_exists(fname))
if(file_exists(fname)) {
system("make -f " + fname + " language-data.cpp autohdr.h savepng.o");
break;
}
for(int i=1; i<argc; i++) {
string s = argv[i];
if(s.substr(0, 2) == "-D") {
@ -92,7 +94,7 @@ int main(int argc, char **argv) {
obj_dir += "/";
setdir += "../";
for(char c: s)
if(c == '=' || c == '-' || c == '/') obj_dir += "_";
if(c == '=' || c == '-' || c == '/' || c == '"' || c == '\\') obj_dir += "_";
else obj_dir += c;
}
else if(s == "-win") {