2008-12-14 21:49:55 +01:00
|
|
|
SRCS=checkbufferoverrun.cpp checkclass.cpp checkheaders.cpp checkmemoryleak.cpp checkfunctionusage.cpp checkother.cpp filelister.cpp preprocessor.cpp tokenize.cpp cppcheck.cpp settings.cpp token.cpp cppcheckexecutor.cpp
|
2008-11-13 21:48:25 +01:00
|
|
|
OBJS=$(SRCS:%.cpp=%.o)
|
2008-12-14 20:03:34 +01:00
|
|
|
TESTS=testbufferoverrun.o testcharvar.o testclass.o testconstructors.o testdivision.o testfunctionusage.o testincompletestatement.o testmemleak.o testpreprocessor.o testsimplifytokens.o testtokenize.o testtoken.o testunusedprivfunc.o testunusedvar.o testfilelister.o
|
2008-11-13 21:48:25 +01:00
|
|
|
BIN = ${DESTDIR}/usr/bin
|
|
|
|
|
|
|
|
all: ${OBJS} main.o
|
|
|
|
g++ -Wall -g -o cppcheck $^
|
2008-11-14 23:26:38 +01:00
|
|
|
test: ${OBJS} testrunner.o testsuite.o ${TESTS}
|
|
|
|
g++ -Wall -g -o testrunner $^
|
2008-11-24 22:50:20 +01:00
|
|
|
cppcheckexecutor.o: cppcheckexecutor.cpp cppcheckexecutor.h cppcheck.h errorlogger.h
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
cppcheck.o: cppcheck.cpp cppcheck.h settings.h errorlogger.h preprocessor.h tokenize.h token.h checkmemoryleak.h checkbufferoverrun.h checkclass.h checkheaders.h checkother.h checkfunctionusage.h filelister.h
|
2008-11-14 23:26:38 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-23 21:12:43 +01:00
|
|
|
main.o: main.cpp cppcheck.h settings.h errorlogger.h
|
2008-11-14 23:26:38 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
checkbufferoverrun.o: checkbufferoverrun.cpp checkbufferoverrun.h tokenize.h settings.h errorlogger.h token.h
|
2008-11-14 23:26:38 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
checkclass.o: checkclass.cpp checkclass.h tokenize.h settings.h errorlogger.h token.h
|
2008-11-22 23:49:14 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
checkfunctionusage.o: checkfunctionusage.cpp checkfunctionusage.h tokenize.h settings.h errorlogger.h token.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
checkheaders.o: checkheaders.cpp checkheaders.h tokenize.h settings.h errorlogger.h token.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
checkmemoryleak.o: checkmemoryleak.cpp checkmemoryleak.h tokenize.h settings.h errorlogger.h token.h
|
2008-11-22 19:51:01 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
checkother.o: checkother.cpp checkother.h tokenize.h settings.h errorlogger.h token.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
filelister.o: filelister.cpp filelister.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-23 21:12:43 +01:00
|
|
|
preprocessor.o: preprocessor.cpp preprocessor.h errorlogger.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-23 21:12:43 +01:00
|
|
|
settings.o: settings.cpp settings.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
testbufferoverrun.o: testbufferoverrun.cpp tokenize.h settings.h errorlogger.h token.h checkbufferoverrun.h testsuite.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
testcharvar.o: testcharvar.cpp tokenize.h settings.h errorlogger.h token.h checkother.h testsuite.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
testclass.o: testclass.cpp tokenize.h settings.h errorlogger.h token.h checkclass.h testsuite.h
|
2008-12-06 19:31:26 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
testconstructors.o: testconstructors.cpp tokenize.h settings.h errorlogger.h token.h checkclass.h testsuite.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
testdivision.o: testdivision.cpp tokenize.h settings.h errorlogger.h token.h checkother.h testsuite.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
testfunctionusage.o: testfunctionusage.cpp tokenize.h settings.h errorlogger.h token.h testsuite.h checkfunctionusage.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
testincompletestatement.o: testincompletestatement.cpp testsuite.h errorlogger.h tokenize.h settings.h token.h checkother.h
|
2008-11-23 12:40:41 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
testmemleak.o: testmemleak.cpp tokenize.h settings.h errorlogger.h token.h checkmemoryleak.h testsuite.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-23 21:12:43 +01:00
|
|
|
testpreprocessor.o: testpreprocessor.cpp testsuite.h errorlogger.h preprocessor.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-23 21:12:43 +01:00
|
|
|
testrunner.o: testrunner.cpp testsuite.h errorlogger.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-23 21:12:43 +01:00
|
|
|
testsimplifytokens.o: testsimplifytokens.cpp testsuite.h errorlogger.h tokenize.h settings.h token.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-23 21:12:43 +01:00
|
|
|
testsuite.o: testsuite.cpp testsuite.h errorlogger.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-09 19:13:38 +01:00
|
|
|
testtoken.o: testtoken.cpp testsuite.h errorlogger.h token.h
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-23 21:12:43 +01:00
|
|
|
testtokenize.o: testtokenize.cpp testsuite.h errorlogger.h tokenize.h settings.h token.h
|
2008-11-15 17:27:09 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
testunusedprivfunc.o: testunusedprivfunc.cpp tokenize.h settings.h errorlogger.h token.h checkclass.h testsuite.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
testunusedvar.o: testunusedvar.cpp testsuite.h errorlogger.h tokenize.h settings.h token.h checkother.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
testfilelister.o: testfilelister.cpp filelister.h
|
2008-12-14 20:03:34 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-23 21:12:43 +01:00
|
|
|
token.o: token.cpp token.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-12-14 21:49:55 +01:00
|
|
|
tokenize.o: tokenize.cpp tokenize.h settings.h errorlogger.h token.h filelister.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-23 21:12:43 +01:00
|
|
|
|
2008-11-13 21:48:25 +01:00
|
|
|
clean:
|
|
|
|
rm -f *.o testrunner cppcheck
|
|
|
|
install: cppcheck
|
|
|
|
install -d ${BIN}
|
|
|
|
install cppcheck ${BIN}
|
2008-11-23 21:12:43 +01:00
|
|
|
|