2008-11-22 23:49:14 +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
|
2008-11-13 21:48:25 +01:00
|
|
|
OBJS=$(SRCS:%.cpp=%.o)
|
2008-11-23 12:40:41 +01:00
|
|
|
TESTS=testbufferoverrun.o testcharvar.o testconstructors.o testdivision.o testfunctionusage.o testincompletestatement.o testmemleak.o testpreprocessor.o testsimplifytokens.o testtokenize.o testunusedprivfunc.o testunusedvar.o settings.o cppcheck.o token.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-22 23:49:14 +01:00
|
|
|
cppcheck.o: cppcheck.cpp cppcheck.h preprocessor.h tokenize.h CheckMemoryLeak.h CheckBufferOverrun.h CheckClass.h CheckHeaders.h CheckOther.h FileLister.h settings.h token.h
|
2008-11-14 23:26:38 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
|
|
|
main.o: main.cpp cppcheck.h
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
|
|
|
settings.o: settings.cpp
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-22 23:49:14 +01:00
|
|
|
token.o: token.cpp
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-21 22:14:24 +01:00
|
|
|
CheckBufferOverrun.o: CheckBufferOverrun.cpp CheckBufferOverrun.h tokenize.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-21 22:14:24 +01:00
|
|
|
CheckClass.o: CheckClass.cpp CheckClass.h tokenize.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-22 19:51:01 +01:00
|
|
|
CheckFunctionUsage.o: CheckFunctionUsage.cpp CheckFunctionUsage.h tokenize.h
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-21 22:14:24 +01:00
|
|
|
CheckHeaders.o: CheckHeaders.cpp CheckHeaders.h tokenize.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-21 22:14:24 +01:00
|
|
|
CheckMemoryLeak.o: CheckMemoryLeak.cpp CheckMemoryLeak.h tokenize.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-21 22:14:24 +01:00
|
|
|
CheckOther.o: CheckOther.cpp CheckOther.h tokenize.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
|
|
|
FileLister.o: FileLister.cpp FileLister.h
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-21 22:14:24 +01:00
|
|
|
preprocessor.o: preprocessor.cpp preprocessor.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-21 22:14:24 +01:00
|
|
|
testbufferoverrun.o: testbufferoverrun.cpp tokenize.h CheckBufferOverrun.h testsuite.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-21 22:14:24 +01:00
|
|
|
testcharvar.o: testcharvar.cpp tokenize.h CheckOther.h testsuite.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
|
|
|
testconstructors.o: testconstructors.cpp tokenize.h CheckClass.h testsuite.h
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
|
|
|
testdivision.o: testdivision.cpp tokenize.h CheckOther.h testsuite.h
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-23 12:40:41 +01:00
|
|
|
testfunctionusage.o: testfunctionusage.cpp tokenize.h CheckFunctionUsage.h testsuite.h
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-13 21:48:25 +01:00
|
|
|
testincompletestatement.o: testincompletestatement.cpp testsuite.h tokenize.h CheckOther.h
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-21 22:14:24 +01:00
|
|
|
testmemleak.o: testmemleak.cpp tokenize.h CheckMemoryLeak.h testsuite.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
|
|
|
testpreprocessor.o: testpreprocessor.cpp testsuite.h preprocessor.h
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
|
|
|
testrunner.o: testrunner.cpp testsuite.h
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
|
|
|
testsuite.o: testsuite.cpp testsuite.h
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-15 17:27:09 +01:00
|
|
|
testsimplifytokens.o: testsimplifytokens.cpp testsuite.h tokenize.h
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-13 21:48:25 +01:00
|
|
|
testtokenize.o:testtokenize.cpp testsuite.h tokenize.h
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
|
|
|
testunusedprivfunc.o: testunusedprivfunc.cpp tokenize.h CheckClass.h testsuite.h
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
|
|
|
testunusedvar.o: testunusedvar.cpp testsuite.h tokenize.h CheckOther.h
|
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
2008-11-22 23:49:14 +01:00
|
|
|
tokenize.o: tokenize.cpp tokenize.h token.h
|
2008-11-13 21:48:25 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $*.cpp
|
|
|
|
clean:
|
|
|
|
rm -f *.o testrunner cppcheck
|
|
|
|
install: cppcheck
|
|
|
|
install -d ${BIN}
|
|
|
|
install cppcheck ${BIN}
|