mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-26 03:17:39 +00:00
mymake now has commandline option -rv to add all RogueViz files
This commit is contained in:
18
mymake.cpp
18
mymake.cpp
@@ -19,7 +19,8 @@ using namespace std;
|
|||||||
|
|
||||||
string opts = "-DFHS -DLINUX -DWHATEVER -DMYMAKE -I/usr/include/SDL";
|
string opts = "-DFHS -DLINUX -DWHATEVER -DMYMAKE -I/usr/include/SDL";
|
||||||
|
|
||||||
string standard = " -std=c++11";
|
string default_standard = " -std=c++11";
|
||||||
|
string standard = default_standard;
|
||||||
|
|
||||||
string preprocessor =
|
string preprocessor =
|
||||||
"g++ -E";
|
"g++ -E";
|
||||||
@@ -85,6 +86,21 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
else if(s.substr(0, 2) == "-I")
|
else if(s.substr(0, 2) == "-I")
|
||||||
opts += " " + s;
|
opts += " " + s;
|
||||||
|
else if(s == "-rv") {
|
||||||
|
|
||||||
|
if(standard == default_standard) {
|
||||||
|
standard = "-std=c++17";
|
||||||
|
}
|
||||||
|
ifstream ifs("rogueviz/rogueviz-all.cpp");
|
||||||
|
string s;
|
||||||
|
while(getline(ifs, s)) {
|
||||||
|
if(s.substr(0, 10) == "#include \"") {
|
||||||
|
string t = s.substr(10);
|
||||||
|
t = t.substr(0, t.find(".cpp\""));
|
||||||
|
modules.push_back("rogueviz/" + t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if(s.size() >= 5 && s.substr(s.size() - 4) == ".cpp")
|
if(s.size() >= 5 && s.substr(s.size() - 4) == ".cpp")
|
||||||
s = s.substr(0, s.size() - 4);
|
s = s.substr(0, s.size() - 4);
|
||||||
|
|||||||
Reference in New Issue
Block a user