Add license to Makefile

This commit is contained in:
Thraix
2018-06-10 00:07:07 +02:00
parent 23b46ebcd8
commit 0af9887ea7
2 changed files with 10 additions and 2 deletions
+5 -1
View File
@@ -1,3 +1,6 @@
# This Makefile was generated using MakeGen made by Tim Håkansson and is
# licensed under MIT. Full source of the project can be found at
# https://github.com/Thraix/MakeGen
CC=@g++ CC=@g++
CO=@g++ -o CO=@g++ -o
BIN=bin/ BIN=bin/
@@ -19,7 +22,8 @@ $(OUTPUT): $(OBJECTS)
$(info Generating output file) $(info Generating output file)
$(CO) $(OUTPUT) $(OBJECTS) $(LIBS) $(CO) $(OUTPUT) $(OBJECTS) $(LIBS)
install: all install: all
cp $(OUTPUT) /usr/bin/makegen $(info Installing MakeGen to /usr/bin/)
@cp $(OUTPUT) /usr/bin/makegen
$(OBJPATH)/ConfigFile.o : src/ConfigFile.cpp src/ConfigFile.h src/Logging.h $(OBJPATH)/ConfigFile.o : src/ConfigFile.cpp src/ConfigFile.h src/Logging.h
$(info ---- $<) $(info ---- $<)
$(CC) $(CFLAGS) -o $@ $< $(CC) $(CFLAGS) -o $@ $<
+5 -1
View File
@@ -40,6 +40,9 @@ void Makefile::Save(const ConfigFile& conf)
PreSave(conf,hFiles,cppFiles); PreSave(conf,hFiles,cppFiles);
std::ofstream outputFile("Makefile"); std::ofstream outputFile("Makefile");
outputFile << "# This Makefile was generated using MakeGen made by Tim Håkansson and is" << std::endl;
outputFile << "# licensed under MIT. Full source of the project can be found at" << std::endl;
outputFile << "# https://github.com/Thraix/MakeGen" << std::endl;
outputFile << "CC=@g++" << std::endl; outputFile << "CC=@g++" << std::endl;
if(!conf.executable) if(!conf.executable)
outputFile << "CO=@ar rs" << std::endl; outputFile << "CO=@ar rs" << std::endl;
@@ -87,7 +90,8 @@ void Makefile::Save(const ConfigFile& conf)
outputFile << "\t$(info Generating output file)" << std::endl; outputFile << "\t$(info Generating output file)" << std::endl;
outputFile << "\t$(CO) $(OUTPUT) $(OBJECTS) $(LIBS)" << std::endl; outputFile << "\t$(CO) $(OUTPUT) $(OBJECTS) $(LIBS)" << std::endl;
outputFile << "install: all" << std::endl; outputFile << "install: all" << std::endl;
outputFile << "\tcp $(OUTPUT) /usr/bin/" << conf.outputname << std::endl; outputFile << "\t$(info Installing MakeGen to /usr/bin/)" << std::endl;
outputFile << "\t@cp $(OUTPUT) /usr/bin/" << conf.outputname << std::endl;
std::map<std::string, IncludeDeps*> dependencies; std::map<std::string, IncludeDeps*> dependencies;
for(auto it = cppFiles.begin(); it!=cppFiles.end();++it) for(auto it = cppFiles.begin(); it!=cppFiles.end();++it)
{ {