Add 'run-dmake' as PHONY target to Makefile to avoid linking dmake always

This commit is contained in:
Alexander Mai 2015-09-05 17:12:15 +02:00
parent b46df3d551
commit 0d7d1e8350
2 changed files with 6 additions and 3 deletions

View File

@ -230,7 +230,7 @@ endif
EXTOBJ += $(TINYXML)
.PHONY: dmake
.PHONY: run-dmake
###### Targets
@ -254,6 +254,8 @@ checkcfg: cppcheck
dmake: tools/dmake.o cli/filelister.o cli/pathmatch.o lib/path.o
$(CXX) $(CXXFLAGS) -std=c++0x -o dmake tools/dmake.o cli/filelister.o cli/pathmatch.o lib/path.o -Ilib $(LDFLAGS)
run-dmake: dmake
./dmake
reduce: tools/reduce.o externals/tinyxml/tinyxml2.o $(LIBOBJ)

View File

@ -386,7 +386,7 @@ int main(int argc, char **argv)
makeExtObj(fout, externalfiles);
fout << ".PHONY: dmake\n\n";
fout << ".PHONY: run-dmake\n\n";
fout << "\n###### Targets\n\n";
fout << "cppcheck: $(LIBOBJ) $(CLIOBJ) $(EXTOBJ)\n";
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -std=c++0x -o cppcheck $(CLIOBJ) $(LIBOBJ) $(EXTOBJ) $(LIBS) $(LDFLAGS) $(RDYNAMIC)\n\n";
@ -400,7 +400,8 @@ int main(int argc, char **argv)
fout << "checkcfg:\tcppcheck\n";
fout << "\t./test/cfg/runtests.sh\n\n";
fout << "dmake:\ttools/dmake.o cli/filelister.o cli/pathmatch.o lib/path.o\n";
fout << "\t$(CXX) $(CXXFLAGS) -std=c++0x -o dmake tools/dmake.o cli/filelister.o cli/pathmatch.o lib/path.o -Ilib $(LDFLAGS)\n";
fout << "\t$(CXX) $(CXXFLAGS) -std=c++0x -o dmake tools/dmake.o cli/filelister.o cli/pathmatch.o lib/path.o -Ilib $(LDFLAGS)\n\n";
fout << "run-dmake: dmake\n";
fout << "\t./dmake\n\n";
fout << "reduce:\ttools/reduce.o externals/tinyxml/tinyxml2.o $(LIBOBJ)\n";
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -std=c++0x -g -o reduce tools/reduce.o -Ilib -Iexternals/tinyxml $(LIBOBJ) $(LIBS) externals/tinyxml/tinyxml2.o $(LDFLAGS) $(RDYNAMIC)\n\n";