2008-11-03 19:52:39 +01:00
|
|
|
SRCS=CheckBufferOverrun.cpp CheckClass.cpp CheckHeaders.cpp CheckMemoryLeak.cpp CheckOther.cpp CommonCheck.cpp FileLister.cpp preprocessor.cpp tokenize.cpp
|
2007-07-17 08:15:50 +02:00
|
|
|
OBJS=$(SRCS:%.cpp=%.o)
|
2008-11-08 14:14:16 +01:00
|
|
|
TESTS=testbufferoverrun.o testcharvar.o testconstructors.o testdivision.o testincompletestatement.o testmemleak.o testpreprocessor.o testtokenize.o testunusedprivfunc.o testunusedvar.o
|
2008-11-01 18:12:05 +01:00
|
|
|
BIN = ${DESTDIR}/usr/bin
|
2007-05-26 08:42:31 +02:00
|
|
|
|
2007-07-17 08:15:50 +02:00
|
|
|
%.o: %.cpp
|
2008-02-16 16:46:32 +01:00
|
|
|
g++ -Wall -pedantic -g -I. -o $@ -c $^
|
2007-05-26 08:42:31 +02:00
|
|
|
|
2007-07-17 08:15:50 +02:00
|
|
|
all: ${OBJS} main.o
|
2008-02-16 16:46:32 +01:00
|
|
|
g++ -Wall -g -o cppcheck $^
|
2008-10-16 19:22:26 +02:00
|
|
|
test: ${OBJS} testrunner.o testsuite.o ${TESTS}
|
|
|
|
g++ -Wall -g -o testrunner $^
|
2007-07-17 08:15:50 +02:00
|
|
|
clean:
|
2008-11-11 07:42:09 +01:00
|
|
|
rm -f *.o testrunner cppcheck
|
2008-11-01 18:12:05 +01:00
|
|
|
install: cppcheck
|
|
|
|
install -d ${BIN}
|
|
|
|
install cppcheck ${BIN}
|