dmake: minor fixes. The tools binaries will be put in the tools folder

This commit is contained in:
Daniel Marjamäki 2009-01-10 07:38:11 +00:00
parent d6d26f4705
commit 01ec1b15fe
2 changed files with 16 additions and 16 deletions

View File

@ -68,16 +68,16 @@ all: cppcheck testrunner tools
test: testrunner
tools: errmsg dmake
tools: tools/errmsg tools/dmake
errmsg: tools/errmsg.cpp
g++ -Wall -pedantic -o errmsg tools/errmsg.cpp
tools/errmsg: tools/errmsg.cpp
g++ $(CXXFLAGS) -o tools/errmsg tools/errmsg.cpp
dmake: tools/dmake.cpp src/filelister.cpp src/filelister.h
g++ -Wall -pedantic -o dmake tools/dmake.cpp src/filelister.cpp
tools/dmake: tools/dmake.cpp src/filelister.cpp src/filelister.h
g++ $(CXXFLAGS) -o tools/dmake tools/dmake.cpp src/filelister.cpp
clean:
rm -f src/*.o test/*.o testrunner cppcheck dmake errmsg
rm -f src/*.o test/*.o testrunner cppcheck tools/dmake tools/errmsg
install: cppcheck
install -d ${BIN}
@ -191,7 +191,7 @@ test/testunusedprivfunc.o: test/testunusedprivfunc.cpp src/tokenize.h src/settin
test/testunusedvar.o: test/testunusedvar.cpp test/testsuite.h src/errorlogger.h src/tokenize.h src/settings.h src/token.h src/checkother.h
g++ $(CXXFLAGS) -c -o test/testunusedvar.o test/testunusedvar.cpp
src/errormessage.h: errmsg
./errmsg
src/errormessage.h: tools/errmsg
tools/errmsg
mv errormessage.h src/

View File

@ -101,13 +101,13 @@ int main()
fout << "\tg++ $(CXXFLAGS) -o testrunner $(TESTOBJ)\n\n";
fout << "all:\tcppcheck\ttestrunner\ttools\n\n";
fout << "test:\ttestrunner\n\n";
fout << "tools:\terrmsg\tdmake\n\n";
fout << "errmsg:\ttools/errmsg.cpp\n";
fout << "\tg++ -Wall -pedantic -o errmsg tools/errmsg.cpp\n\n";
fout << "dmake:\ttools/dmake.cpp\tsrc/filelister.cpp\tsrc/filelister.h\n";
fout << "\tg++ -Wall -pedantic -o dmake tools/dmake.cpp src/filelister.cpp\n\n";
fout << "tools:\ttools/errmsg\ttools/dmake\n\n";
fout << "tools/errmsg:\ttools/errmsg.cpp\n";
fout << "\tg++ $(CXXFLAGS) -o tools/errmsg tools/errmsg.cpp\n\n";
fout << "tools/dmake:\ttools/dmake.cpp\tsrc/filelister.cpp\tsrc/filelister.h\n";
fout << "\tg++ $(CXXFLAGS) -o tools/dmake tools/dmake.cpp src/filelister.cpp\n\n";
fout << "clean:\n";
fout << "\trm -f src/*.o test/*.o testrunner cppcheck dmake errmsg\n\n";
fout << "\trm -f src/*.o test/*.o testrunner cppcheck tools/dmake tools/errmsg\n\n";
fout << "install:\tcppcheck\n";
fout << "\tinstall -d ${BIN}\n";
fout << "\tinstall cppcheck ${BIN}\n\n";
@ -134,8 +134,8 @@ int main()
fout << "\n\tg++ $(CXXFLAGS) -c -o " << objfile(testfiles[i]) << " " << testfiles[i] << "\n\n";
}
fout << "src/errormessage.h:\terrmsg\n";
fout << "\t./errmsg\n";
fout << "src/errormessage.h:\ttools/errmsg\n";
fout << "\ttools/errmsg\n";
fout << "\tmv errormessage.h src/\n\n";
return 0;