refactoring the folder structure
This commit is contained in:
parent
3ecb7ddf26
commit
09859c1019
265
Makefile
265
Makefile
@ -1,31 +1,32 @@
|
||||
CXXFLAGS=-Wall -Wextra -pedantic -O2
|
||||
CXXFLAGS=-Wall -Wextra -pedantic -g
|
||||
CXX=g++
|
||||
BIN=${DESTDIR}/usr/bin
|
||||
|
||||
|
||||
###### Object Files
|
||||
|
||||
OBJECTS = src/checkautovariables.o \
|
||||
src/checkbufferoverrun.o \
|
||||
src/checkclass.o \
|
||||
src/checkdangerousfunctions.o \
|
||||
src/checkexceptionsafety.o \
|
||||
src/checkheaders.o \
|
||||
src/checkmemoryleak.o \
|
||||
src/checkother.o \
|
||||
src/checkstl.o \
|
||||
src/checkunusedfunctions.o \
|
||||
src/cppcheck.o \
|
||||
src/cppcheckexecutor.o \
|
||||
src/errorlogger.o \
|
||||
src/filelister.o \
|
||||
src/main.o \
|
||||
src/mathlib.o \
|
||||
src/preprocessor.o \
|
||||
src/settings.o \
|
||||
src/threadexecutor.o \
|
||||
src/token.o \
|
||||
src/tokenize.o
|
||||
LIBOBJ = lib/checkautovariables.o \
|
||||
lib/checkbufferoverrun.o \
|
||||
lib/checkclass.o \
|
||||
lib/checkdangerousfunctions.o \
|
||||
lib/checkexceptionsafety.o \
|
||||
lib/checkheaders.o \
|
||||
lib/checkmemoryleak.o \
|
||||
lib/checkother.o \
|
||||
lib/checkstl.o \
|
||||
lib/checkunusedfunctions.o \
|
||||
lib/cppcheck.o \
|
||||
lib/errorlogger.o \
|
||||
lib/filelister.o \
|
||||
lib/mathlib.o \
|
||||
lib/preprocessor.o \
|
||||
lib/settings.o \
|
||||
lib/token.o \
|
||||
lib/tokenize.o
|
||||
|
||||
CLIOBJ = cli/cppcheckexecutor.o \
|
||||
cli/main.o \
|
||||
cli/threadexecutor.o
|
||||
|
||||
TESTOBJ = test/testautovariables.o \
|
||||
test/testbufferoverrun.o \
|
||||
@ -51,49 +52,29 @@ TESTOBJ = test/testautovariables.o \
|
||||
test/testtokenize.o \
|
||||
test/testunusedfunctions.o \
|
||||
test/testunusedprivfunc.o \
|
||||
test/testunusedvar.o \
|
||||
src/checkautovariables.o \
|
||||
src/checkbufferoverrun.o \
|
||||
src/checkclass.o \
|
||||
src/checkdangerousfunctions.o \
|
||||
src/checkexceptionsafety.o \
|
||||
src/checkheaders.o \
|
||||
src/checkmemoryleak.o \
|
||||
src/checkother.o \
|
||||
src/checkstl.o \
|
||||
src/checkunusedfunctions.o \
|
||||
src/cppcheck.o \
|
||||
src/cppcheckexecutor.o \
|
||||
src/errorlogger.o \
|
||||
src/filelister.o \
|
||||
src/mathlib.o \
|
||||
src/preprocessor.o \
|
||||
src/settings.o \
|
||||
src/threadexecutor.o \
|
||||
src/token.o \
|
||||
src/tokenize.o
|
||||
test/testunusedvar.o
|
||||
|
||||
|
||||
###### Targets
|
||||
|
||||
cppcheck: $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) -o cppcheck $(OBJECTS) $(LDFLAGS)
|
||||
cppcheck: $(LIBOBJ) $(CLIOBJ)
|
||||
$(CXX) $(CXXFLAGS) -o cppcheck $(CLIOBJ) $(LIBOBJ) $(LDFLAGS)
|
||||
|
||||
all: cppcheck testrunner tools
|
||||
|
||||
testrunner: $(TESTOBJ)
|
||||
$(CXX) $(CXXFLAGS) -o testrunner $(TESTOBJ) $(LDFLAGS)
|
||||
testrunner: $(TESTOBJ) $(LIBOBJ)
|
||||
$(CXX) $(CXXFLAGS) -o testrunner $(TESTOBJ) $(LIBOBJ) $(LDFLAGS)
|
||||
|
||||
test: all
|
||||
./testrunner
|
||||
|
||||
tools: tools/dmake
|
||||
|
||||
tools/dmake: tools/dmake.cpp src/filelister.cpp src/filelister.h
|
||||
$(CXX) $(CXXFLAGS) -o tools/dmake tools/dmake.cpp src/filelister.cpp $(LDFLAGS)
|
||||
tools/dmake: tools/dmake.cpp lib/filelister.cpp lib/filelister.h
|
||||
$(CXX) $(CXXFLAGS) -o tools/dmake tools/dmake.cpp lib/filelister.cpp $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f src/*.o test/*.o testrunner cppcheck tools/dmake tools/errmsg
|
||||
rm -f lib/*.o cli/*.o test/*.o testrunner cppcheck tools/dmake tools/errmsg
|
||||
|
||||
install: cppcheck
|
||||
install -d ${BIN}
|
||||
@ -102,141 +83,141 @@ install: cppcheck
|
||||
|
||||
###### Build
|
||||
|
||||
src/checkautovariables.o: src/checkautovariables.cpp src/checkautovariables.h src/check.h src/token.h src/tokenize.h src/classinfo.h src/settings.h src/errorlogger.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/checkautovariables.o src/checkautovariables.cpp
|
||||
lib/checkautovariables.o: lib/checkautovariables.cpp lib/checkautovariables.h lib/check.h lib/token.h lib/tokenize.h lib/classinfo.h lib/settings.h lib/errorlogger.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/checkautovariables.o lib/checkautovariables.cpp
|
||||
|
||||
src/checkbufferoverrun.o: src/checkbufferoverrun.cpp src/checkbufferoverrun.h src/check.h src/token.h src/tokenize.h src/classinfo.h src/settings.h src/errorlogger.h src/mathlib.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/checkbufferoverrun.o src/checkbufferoverrun.cpp
|
||||
lib/checkbufferoverrun.o: lib/checkbufferoverrun.cpp lib/checkbufferoverrun.h lib/check.h lib/token.h lib/tokenize.h lib/classinfo.h lib/settings.h lib/errorlogger.h lib/mathlib.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/checkbufferoverrun.o lib/checkbufferoverrun.cpp
|
||||
|
||||
src/checkclass.o: src/checkclass.cpp src/checkclass.h src/check.h src/token.h src/tokenize.h src/classinfo.h src/settings.h src/errorlogger.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/checkclass.o src/checkclass.cpp
|
||||
lib/checkclass.o: lib/checkclass.cpp lib/checkclass.h lib/check.h lib/token.h lib/tokenize.h lib/classinfo.h lib/settings.h lib/errorlogger.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/checkclass.o lib/checkclass.cpp
|
||||
|
||||
src/checkdangerousfunctions.o: src/checkdangerousfunctions.cpp src/checkdangerousfunctions.h src/check.h src/token.h src/tokenize.h src/classinfo.h src/settings.h src/errorlogger.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/checkdangerousfunctions.o src/checkdangerousfunctions.cpp
|
||||
lib/checkdangerousfunctions.o: lib/checkdangerousfunctions.cpp lib/checkdangerousfunctions.h lib/check.h lib/token.h lib/tokenize.h lib/classinfo.h lib/settings.h lib/errorlogger.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/checkdangerousfunctions.o lib/checkdangerousfunctions.cpp
|
||||
|
||||
src/checkexceptionsafety.o: src/checkexceptionsafety.cpp
|
||||
$(CXX) $(CXXFLAGS) -c -o src/checkexceptionsafety.o src/checkexceptionsafety.cpp
|
||||
lib/checkexceptionsafety.o: lib/checkexceptionsafety.cpp lib/checkexceptionsafety.h lib/check.h lib/token.h lib/tokenize.h lib/classinfo.h lib/settings.h lib/errorlogger.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/checkexceptionsafety.o lib/checkexceptionsafety.cpp
|
||||
|
||||
src/checkheaders.o: src/checkheaders.cpp src/checkheaders.h src/tokenize.h src/classinfo.h src/token.h src/errorlogger.h src/settings.h src/filelister.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/checkheaders.o src/checkheaders.cpp
|
||||
lib/checkheaders.o: lib/checkheaders.cpp lib/checkheaders.h lib/tokenize.h lib/classinfo.h lib/token.h lib/errorlogger.h lib/settings.h lib/filelister.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/checkheaders.o lib/checkheaders.cpp
|
||||
|
||||
src/checkmemoryleak.o: src/checkmemoryleak.cpp src/checkmemoryleak.h src/check.h src/token.h src/tokenize.h src/classinfo.h src/settings.h src/errorlogger.h src/mathlib.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/checkmemoryleak.o src/checkmemoryleak.cpp
|
||||
lib/checkmemoryleak.o: lib/checkmemoryleak.cpp lib/checkmemoryleak.h lib/check.h lib/token.h lib/tokenize.h lib/classinfo.h lib/settings.h lib/errorlogger.h lib/mathlib.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/checkmemoryleak.o lib/checkmemoryleak.cpp
|
||||
|
||||
src/checkother.o: src/checkother.cpp src/checkother.h src/check.h src/token.h src/tokenize.h src/classinfo.h src/settings.h src/errorlogger.h src/mathlib.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/checkother.o src/checkother.cpp
|
||||
lib/checkother.o: lib/checkother.cpp lib/checkother.h lib/check.h lib/token.h lib/tokenize.h lib/classinfo.h lib/settings.h lib/errorlogger.h lib/mathlib.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/checkother.o lib/checkother.cpp
|
||||
|
||||
src/checkstl.o: src/checkstl.cpp src/checkstl.h src/check.h src/token.h src/tokenize.h src/classinfo.h src/settings.h src/errorlogger.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/checkstl.o src/checkstl.cpp
|
||||
lib/checkstl.o: lib/checkstl.cpp lib/checkstl.h lib/check.h lib/token.h lib/tokenize.h lib/classinfo.h lib/settings.h lib/errorlogger.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/checkstl.o lib/checkstl.cpp
|
||||
|
||||
src/checkunusedfunctions.o: src/checkunusedfunctions.cpp src/checkunusedfunctions.h src/tokenize.h src/classinfo.h src/token.h src/errorlogger.h src/settings.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/checkunusedfunctions.o src/checkunusedfunctions.cpp
|
||||
lib/checkunusedfunctions.o: lib/checkunusedfunctions.cpp lib/checkunusedfunctions.h lib/tokenize.h lib/classinfo.h lib/token.h lib/errorlogger.h lib/settings.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/checkunusedfunctions.o lib/checkunusedfunctions.cpp
|
||||
|
||||
src/cppcheck.o: src/cppcheck.cpp src/cppcheck.h src/settings.h src/errorlogger.h src/checkunusedfunctions.h src/tokenize.h src/classinfo.h src/token.h src/preprocessor.h src/filelister.h src/check.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/cppcheck.o src/cppcheck.cpp
|
||||
lib/cppcheck.o: lib/cppcheck.cpp lib/cppcheck.h lib/settings.h lib/errorlogger.h lib/checkunusedfunctions.h lib/tokenize.h lib/classinfo.h lib/token.h lib/preprocessor.h lib/filelister.h lib/check.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/cppcheck.o lib/cppcheck.cpp
|
||||
|
||||
src/cppcheckexecutor.o: src/cppcheckexecutor.cpp src/cppcheckexecutor.h src/errorlogger.h src/settings.h src/cppcheck.h src/checkunusedfunctions.h src/tokenize.h src/classinfo.h src/token.h src/threadexecutor.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/cppcheckexecutor.o src/cppcheckexecutor.cpp
|
||||
lib/errorlogger.o: lib/errorlogger.cpp lib/errorlogger.h lib/settings.h lib/tokenize.h lib/classinfo.h lib/token.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/errorlogger.o lib/errorlogger.cpp
|
||||
|
||||
src/errorlogger.o: src/errorlogger.cpp src/errorlogger.h src/settings.h src/tokenize.h src/classinfo.h src/token.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/errorlogger.o src/errorlogger.cpp
|
||||
lib/filelister.o: lib/filelister.cpp lib/filelister.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/filelister.o lib/filelister.cpp
|
||||
|
||||
src/filelister.o: src/filelister.cpp src/filelister.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/filelister.o src/filelister.cpp
|
||||
lib/mathlib.o: lib/mathlib.cpp lib/mathlib.h lib/token.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/mathlib.o lib/mathlib.cpp
|
||||
|
||||
src/main.o: src/main.cpp src/cppcheckexecutor.h src/errorlogger.h src/settings.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/main.o src/main.cpp
|
||||
lib/preprocessor.o: lib/preprocessor.cpp lib/preprocessor.h lib/errorlogger.h lib/settings.h lib/tokenize.h lib/classinfo.h lib/token.h lib/filelister.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/preprocessor.o lib/preprocessor.cpp
|
||||
|
||||
src/mathlib.o: src/mathlib.cpp src/mathlib.h src/token.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/mathlib.o src/mathlib.cpp
|
||||
lib/settings.o: lib/settings.cpp lib/settings.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/settings.o lib/settings.cpp
|
||||
|
||||
src/preprocessor.o: src/preprocessor.cpp src/preprocessor.h src/errorlogger.h src/settings.h src/tokenize.h src/classinfo.h src/token.h src/filelister.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/preprocessor.o src/preprocessor.cpp
|
||||
lib/token.o: lib/token.cpp lib/token.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/token.o lib/token.cpp
|
||||
|
||||
src/settings.o: src/settings.cpp src/settings.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/settings.o src/settings.cpp
|
||||
lib/tokenize.o: lib/tokenize.cpp lib/tokenize.h lib/classinfo.h lib/token.h lib/filelister.h lib/mathlib.h lib/settings.h lib/errorlogger.h lib/check.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o lib/tokenize.o lib/tokenize.cpp
|
||||
|
||||
src/threadexecutor.o: src/threadexecutor.cpp src/threadexecutor.h src/settings.h src/errorlogger.h src/cppcheck.h src/checkunusedfunctions.h src/tokenize.h src/classinfo.h src/token.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/threadexecutor.o src/threadexecutor.cpp
|
||||
cli/cppcheckexecutor.o: cli/cppcheckexecutor.cpp cli/cppcheckexecutor.h cli/threadexecutor.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o cli/cppcheckexecutor.o cli/cppcheckexecutor.cpp
|
||||
|
||||
src/token.o: src/token.cpp src/token.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/token.o src/token.cpp
|
||||
cli/main.o: cli/main.cpp cli/cppcheckexecutor.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o cli/main.o cli/main.cpp
|
||||
|
||||
src/tokenize.o: src/tokenize.cpp src/tokenize.h src/classinfo.h src/token.h src/filelister.h src/mathlib.h src/settings.h src/errorlogger.h src/check.h
|
||||
$(CXX) $(CXXFLAGS) -c -o src/tokenize.o src/tokenize.cpp
|
||||
cli/threadexecutor.o: cli/threadexecutor.cpp cli/threadexecutor.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o cli/threadexecutor.o cli/threadexecutor.cpp
|
||||
|
||||
test/testautovariables.o: test/testautovariables.cpp src/tokenize.h src/classinfo.h src/token.h src/checkautovariables.h src/check.h src/settings.h src/errorlogger.h test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testautovariables.o test/testautovariables.cpp
|
||||
test/testautovariables.o: test/testautovariables.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testautovariables.o test/testautovariables.cpp
|
||||
|
||||
test/testbufferoverrun.o: test/testbufferoverrun.cpp src/tokenize.h src/classinfo.h src/token.h src/checkbufferoverrun.h src/check.h src/settings.h src/errorlogger.h test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testbufferoverrun.o test/testbufferoverrun.cpp
|
||||
test/testbufferoverrun.o: test/testbufferoverrun.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testbufferoverrun.o test/testbufferoverrun.cpp
|
||||
|
||||
test/testcharvar.o: test/testcharvar.cpp src/tokenize.h src/classinfo.h src/token.h src/checkother.h src/check.h src/settings.h src/errorlogger.h test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testcharvar.o test/testcharvar.cpp
|
||||
test/testcharvar.o: test/testcharvar.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testcharvar.o test/testcharvar.cpp
|
||||
|
||||
test/testclass.o: test/testclass.cpp src/tokenize.h src/classinfo.h src/token.h src/checkclass.h src/check.h src/settings.h src/errorlogger.h test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testclass.o test/testclass.cpp
|
||||
test/testclass.o: test/testclass.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testclass.o test/testclass.cpp
|
||||
|
||||
test/testconstructors.o: test/testconstructors.cpp src/tokenize.h src/classinfo.h src/token.h src/checkclass.h src/check.h src/settings.h src/errorlogger.h test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testconstructors.o test/testconstructors.cpp
|
||||
test/testconstructors.o: test/testconstructors.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testconstructors.o test/testconstructors.cpp
|
||||
|
||||
test/testcppcheck.o: test/testcppcheck.cpp test/testsuite.h src/errorlogger.h src/settings.h src/cppcheck.h src/checkunusedfunctions.h src/tokenize.h src/classinfo.h src/token.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testcppcheck.o test/testcppcheck.cpp
|
||||
test/testcppcheck.o: test/testcppcheck.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testcppcheck.o test/testcppcheck.cpp
|
||||
|
||||
test/testdangerousfunctions.o: test/testdangerousfunctions.cpp src/tokenize.h src/classinfo.h src/token.h src/checkdangerousfunctions.h src/check.h src/settings.h src/errorlogger.h test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testdangerousfunctions.o test/testdangerousfunctions.cpp
|
||||
test/testdangerousfunctions.o: test/testdangerousfunctions.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testdangerousfunctions.o test/testdangerousfunctions.cpp
|
||||
|
||||
test/testdivision.o: test/testdivision.cpp src/tokenize.h src/classinfo.h src/token.h src/checkother.h src/check.h src/settings.h src/errorlogger.h test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testdivision.o test/testdivision.cpp
|
||||
test/testdivision.o: test/testdivision.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testdivision.o test/testdivision.cpp
|
||||
|
||||
test/testexceptionsafety.o: test/testexceptionsafety.cpp
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testexceptionsafety.o test/testexceptionsafety.cpp
|
||||
test/testexceptionsafety.o: test/testexceptionsafety.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testexceptionsafety.o test/testexceptionsafety.cpp
|
||||
|
||||
test/testfilelister.o: test/testfilelister.cpp test/testsuite.h src/errorlogger.h src/settings.h src/filelister.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testfilelister.o test/testfilelister.cpp
|
||||
test/testfilelister.o: test/testfilelister.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testfilelister.o test/testfilelister.cpp
|
||||
|
||||
test/testincompletestatement.o: test/testincompletestatement.cpp test/testsuite.h src/errorlogger.h src/settings.h src/tokenize.h src/classinfo.h src/token.h src/checkother.h src/check.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testincompletestatement.o test/testincompletestatement.cpp
|
||||
test/testincompletestatement.o: test/testincompletestatement.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testincompletestatement.o test/testincompletestatement.cpp
|
||||
|
||||
test/testmathlib.o: test/testmathlib.cpp src/mathlib.h src/token.h test/testsuite.h src/errorlogger.h src/settings.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testmathlib.o test/testmathlib.cpp
|
||||
test/testmathlib.o: test/testmathlib.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testmathlib.o test/testmathlib.cpp
|
||||
|
||||
test/testmemleak.o: test/testmemleak.cpp src/tokenize.h src/classinfo.h src/token.h src/checkmemoryleak.h src/check.h src/settings.h src/errorlogger.h test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testmemleak.o test/testmemleak.cpp
|
||||
test/testmemleak.o: test/testmemleak.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testmemleak.o test/testmemleak.cpp
|
||||
|
||||
test/testother.o: test/testother.cpp src/tokenize.h src/classinfo.h src/token.h src/checkother.h src/check.h src/settings.h src/errorlogger.h test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testother.o test/testother.cpp
|
||||
test/testother.o: test/testother.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testother.o test/testother.cpp
|
||||
|
||||
test/testpreprocessor.o: test/testpreprocessor.cpp test/testsuite.h src/errorlogger.h src/settings.h src/preprocessor.h src/tokenize.h src/classinfo.h src/token.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testpreprocessor.o test/testpreprocessor.cpp
|
||||
test/testpreprocessor.o: test/testpreprocessor.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testpreprocessor.o test/testpreprocessor.cpp
|
||||
|
||||
test/testredundantif.o: test/testredundantif.cpp src/tokenize.h src/classinfo.h src/token.h src/checkother.h src/check.h src/settings.h src/errorlogger.h test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testredundantif.o test/testredundantif.cpp
|
||||
test/testredundantif.o: test/testredundantif.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testredundantif.o test/testredundantif.cpp
|
||||
|
||||
test/testrunner.o: test/testrunner.cpp test/testsuite.h src/errorlogger.h src/settings.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testrunner.o test/testrunner.cpp
|
||||
test/testrunner.o: test/testrunner.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testrunner.o test/testrunner.cpp
|
||||
|
||||
test/testsimplifytokens.o: test/testsimplifytokens.cpp test/testsuite.h src/errorlogger.h src/settings.h src/tokenize.h src/classinfo.h src/token.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testsimplifytokens.o test/testsimplifytokens.cpp
|
||||
test/testsimplifytokens.o: test/testsimplifytokens.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testsimplifytokens.o test/testsimplifytokens.cpp
|
||||
|
||||
test/teststl.o: test/teststl.cpp src/tokenize.h src/classinfo.h src/token.h src/checkstl.h src/check.h src/settings.h src/errorlogger.h test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/teststl.o test/teststl.cpp
|
||||
test/teststl.o: test/teststl.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/teststl.o test/teststl.cpp
|
||||
|
||||
test/testsuite.o: test/testsuite.cpp test/testsuite.h src/errorlogger.h src/settings.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testsuite.o test/testsuite.cpp
|
||||
test/testsuite.o: test/testsuite.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testsuite.o test/testsuite.cpp
|
||||
|
||||
test/testtoken.o: test/testtoken.cpp test/testsuite.h src/errorlogger.h src/settings.h src/tokenize.h src/classinfo.h src/token.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testtoken.o test/testtoken.cpp
|
||||
test/testtoken.o: test/testtoken.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testtoken.o test/testtoken.cpp
|
||||
|
||||
test/testtokenize.o: test/testtokenize.cpp test/testsuite.h src/errorlogger.h src/settings.h src/tokenize.h src/classinfo.h src/token.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testtokenize.o test/testtokenize.cpp
|
||||
test/testtokenize.o: test/testtokenize.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testtokenize.o test/testtokenize.cpp
|
||||
|
||||
test/testunusedfunctions.o: test/testunusedfunctions.cpp src/tokenize.h src/classinfo.h src/token.h test/testsuite.h src/errorlogger.h src/settings.h src/checkunusedfunctions.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testunusedfunctions.o test/testunusedfunctions.cpp
|
||||
test/testunusedfunctions.o: test/testunusedfunctions.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testunusedfunctions.o test/testunusedfunctions.cpp
|
||||
|
||||
test/testunusedprivfunc.o: test/testunusedprivfunc.cpp src/tokenize.h src/classinfo.h src/token.h src/checkclass.h src/check.h src/settings.h src/errorlogger.h test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testunusedprivfunc.o test/testunusedprivfunc.cpp
|
||||
test/testunusedprivfunc.o: test/testunusedprivfunc.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testunusedprivfunc.o test/testunusedprivfunc.cpp
|
||||
|
||||
test/testunusedvar.o: test/testunusedvar.cpp test/testsuite.h src/errorlogger.h src/settings.h src/tokenize.h src/classinfo.h src/token.h src/checkother.h src/check.h
|
||||
$(CXX) $(CXXFLAGS) -c -o test/testunusedvar.o test/testunusedvar.cpp
|
||||
test/testunusedvar.o: test/testunusedvar.cpp test/testsuite.h
|
||||
$(CXX) $(CXXFLAGS) -Ilib -c -o test/testunusedvar.o test/testunusedvar.cpp
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren src/*.cpp
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren src/*.h
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren cli/*.cpp
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren cli/*.h
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren gui/*.cpp
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren gui/*.h
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren lib/*.cpp
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren lib/*.h
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren test/*.cpp
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren test/*.h
|
||||
|
||||
|
@ -1,9 +1,12 @@
|
||||
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren src/*.cpp
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren src/*.h
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren gui/*.cpp
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren gui/*.h
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren test/*.cpp
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren test/*.h
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren tools/*.cpp
|
||||
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren cli/*.cpp
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren cli/*.h
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren gui/*.cpp
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren gui/*.h
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren lib/*.cpp
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren lib/*.h
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren test/*.cpp
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren test/*.h
|
||||
|
||||
astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren tools/*.cpp
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/checkautovariables.h"
|
||||
#include "tokenize.h"
|
||||
#include "checkautovariables.h"
|
||||
#include "testsuite.h"
|
||||
|
||||
#include <sstream>
|
||||
|
@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/checkbufferoverrun.h"
|
||||
#include "tokenize.h"
|
||||
#include "checkbufferoverrun.h"
|
||||
#include "testsuite.h"
|
||||
|
||||
#include <sstream>
|
||||
|
@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/checkother.h"
|
||||
#include "tokenize.h"
|
||||
#include "checkother.h"
|
||||
#include "testsuite.h"
|
||||
#include <sstream>
|
||||
|
||||
|
@ -18,8 +18,8 @@
|
||||
|
||||
|
||||
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/checkclass.h"
|
||||
#include "tokenize.h"
|
||||
#include "checkclass.h"
|
||||
#include "testsuite.h"
|
||||
#include <sstream>
|
||||
|
||||
|
@ -18,8 +18,8 @@
|
||||
|
||||
|
||||
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/checkclass.h"
|
||||
#include "tokenize.h"
|
||||
#include "checkclass.h"
|
||||
#include "testsuite.h"
|
||||
#include <sstream>
|
||||
|
||||
|
@ -21,8 +21,8 @@
|
||||
// the code for a known configuration, it generates the code for each configuration.
|
||||
|
||||
|
||||
#include "cppcheck.h"
|
||||
#include "testsuite.h"
|
||||
#include "../src/cppcheck.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/checkdangerousfunctions.h"
|
||||
#include "tokenize.h"
|
||||
#include "checkdangerousfunctions.h"
|
||||
#include "testsuite.h"
|
||||
|
||||
#include <sstream>
|
||||
|
@ -21,8 +21,8 @@
|
||||
// such as "svar / uvar". Treating "svar" as unsigned data is not good
|
||||
|
||||
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/checkother.h"
|
||||
#include "tokenize.h"
|
||||
#include "checkother.h"
|
||||
#include "testsuite.h"
|
||||
|
||||
#include <sstream>
|
||||
|
@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/checkexceptionsafety.h"
|
||||
#include "tokenize.h"
|
||||
#include "checkexceptionsafety.h"
|
||||
#include "testsuite.h"
|
||||
#include <sstream>
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include <string>
|
||||
#include "testsuite.h"
|
||||
#include "../src/filelister.h"
|
||||
#include "filelister.h"
|
||||
|
||||
class TestFileLister : public TestFixture
|
||||
{
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
|
||||
#include "testsuite.h"
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/checkother.h"
|
||||
#include "tokenize.h"
|
||||
#include "checkother.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
|
||||
#include "../src/mathlib.h"
|
||||
#include "mathlib.h"
|
||||
#include "testsuite.h"
|
||||
|
||||
class TestMathLib : public TestFixture
|
||||
|
@ -19,8 +19,8 @@
|
||||
|
||||
|
||||
#define private public
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/checkmemoryleak.h"
|
||||
#include "tokenize.h"
|
||||
#include "checkmemoryleak.h"
|
||||
#undef private
|
||||
#include "testsuite.h"
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/checkother.h"
|
||||
#include "tokenize.h"
|
||||
#include "checkother.h"
|
||||
#include "testsuite.h"
|
||||
#include <sstream>
|
||||
|
||||
|
@ -22,9 +22,9 @@
|
||||
|
||||
|
||||
#include "testsuite.h"
|
||||
#include "../src/preprocessor.h"
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/token.h"
|
||||
#include "preprocessor.h"
|
||||
#include "tokenize.h"
|
||||
#include "token.h"
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
@ -21,8 +21,8 @@
|
||||
// such as "svar / uvar". Treating "svar" as unsigned data is not good
|
||||
|
||||
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/checkother.h"
|
||||
#include "tokenize.h"
|
||||
#include "checkother.h"
|
||||
#include "testsuite.h"
|
||||
|
||||
#include <sstream>
|
||||
|
@ -20,9 +20,9 @@
|
||||
|
||||
#include "testsuite.h"
|
||||
#define private public
|
||||
#include "../src/tokenize.h"
|
||||
#include "tokenize.h"
|
||||
#undef private
|
||||
#include "../src/token.h"
|
||||
#include "token.h"
|
||||
#include <sstream>
|
||||
|
||||
extern std::ostringstream errout;
|
||||
|
@ -18,8 +18,8 @@
|
||||
|
||||
|
||||
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/checkstl.h"
|
||||
#include "tokenize.h"
|
||||
#include "checkstl.h"
|
||||
#include "testsuite.h"
|
||||
#include <sstream>
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#define testsuiteH
|
||||
|
||||
#include <sstream>
|
||||
#include "../src/errorlogger.h"
|
||||
#include "errorlogger.h"
|
||||
|
||||
class Token;
|
||||
|
||||
|
@ -16,10 +16,11 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <cstring>
|
||||
#include "testsuite.h"
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/token.h"
|
||||
#include "tokenize.h"
|
||||
#include "token.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
extern std::ostringstream errout;
|
||||
class TestTOKEN : public TestFixture
|
||||
|
@ -24,9 +24,9 @@
|
||||
#include <cstring>
|
||||
#include "testsuite.h"
|
||||
#define private public
|
||||
#include "../src/tokenize.h"
|
||||
#include "tokenize.h"
|
||||
#undef private
|
||||
#include "../src/token.h"
|
||||
#include "token.h"
|
||||
|
||||
extern std::ostringstream errout;
|
||||
class TestTokenizer : public TestFixture
|
||||
|
@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "../src/tokenize.h"
|
||||
#include "tokenize.h"
|
||||
#include "testsuite.h"
|
||||
#include "../src/checkunusedfunctions.h"
|
||||
#include "checkunusedfunctions.h"
|
||||
#include <sstream>
|
||||
|
||||
extern std::ostringstream errout;
|
||||
|
@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/checkclass.h"
|
||||
#include "tokenize.h"
|
||||
#include "checkclass.h"
|
||||
#include "testsuite.h"
|
||||
|
||||
#include <sstream>
|
||||
|
@ -21,8 +21,8 @@
|
||||
// Check for unused variables..
|
||||
|
||||
#include "testsuite.h"
|
||||
#include "../src/tokenize.h"
|
||||
#include "../src/checkother.h"
|
||||
#include "tokenize.h"
|
||||
#include "checkother.h"
|
||||
|
||||
#include <sstream>
|
||||
extern std::ostringstream errout;
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "../src/filelister.h"
|
||||
#include "../lib/filelister.h"
|
||||
|
||||
std::string objfile(std::string cppfile)
|
||||
{
|
||||
@ -61,16 +61,28 @@ void getDeps(const std::string &filename, std::vector<std::string> &depfiles)
|
||||
}
|
||||
}
|
||||
|
||||
static void compilefiles(std::ostream &fout, const std::vector<std::string> &files)
|
||||
{
|
||||
for (unsigned int i = 0; i < files.size(); ++i)
|
||||
{
|
||||
fout << objfile(files[i]) << ": " << files[i];
|
||||
std::vector<std::string> depfiles;
|
||||
getDeps(files[i], depfiles);
|
||||
for (unsigned int dep = 0; dep < depfiles.size(); ++dep)
|
||||
fout << " " << depfiles[dep];
|
||||
fout << "\n\t$(CXX) $(CXXFLAGS) -Ilib -c -o " << objfile(files[i]) << " " << files[i] << "\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
// Get files..
|
||||
std::vector<std::string> srcfiles;
|
||||
FileLister::recursiveAddFiles(srcfiles, "src/", true);
|
||||
if (srcfiles.empty())
|
||||
{
|
||||
std::cout << "No source files found." << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
std::vector<std::string> libfiles;
|
||||
FileLister::recursiveAddFiles(libfiles, "lib/", true);
|
||||
|
||||
std::vector<std::string> clifiles;
|
||||
FileLister::recursiveAddFiles(clifiles, "cli/", true);
|
||||
|
||||
std::vector<std::string> testfiles;
|
||||
FileLister::recursiveAddFiles(testfiles, "test/", true);
|
||||
|
||||
@ -82,59 +94,42 @@ int main()
|
||||
fout << "BIN=${DESTDIR}/usr/bin\n\n";
|
||||
|
||||
fout << "\n###### Object Files\n\n";
|
||||
fout << "OBJECTS = " << objfile(srcfiles[0]);
|
||||
for (unsigned int i = 1; i < srcfiles.size(); ++i)
|
||||
fout << " \\" << std::endl << std::string(14, ' ') << objfile(srcfiles[i]);
|
||||
fout << "LIBOBJ = " << objfile(libfiles[0]);
|
||||
for (unsigned int i = 1; i < libfiles.size(); ++i)
|
||||
fout << " \\" << std::endl << std::string(14, ' ') << objfile(libfiles[i]);
|
||||
fout << "\n\n";
|
||||
fout << "CLIOBJ = " << objfile(clifiles[0]);
|
||||
for (unsigned int i = 1; i < clifiles.size(); ++i)
|
||||
fout << " \\" << std::endl << std::string(14, ' ') << objfile(clifiles[i]);
|
||||
fout << "\n\n";
|
||||
fout << "TESTOBJ = " << objfile(testfiles[0]);
|
||||
for (unsigned int i = 1; i < testfiles.size(); ++i)
|
||||
fout << " \\" << std::endl << std::string(14, ' ') << objfile(testfiles[i]);
|
||||
for (unsigned int i = 0; i < srcfiles.size(); ++i)
|
||||
{
|
||||
if (srcfiles[i] != "src/main.cpp")
|
||||
fout << " \\" << std::endl << std::string(14, ' ') << objfile(srcfiles[i]);
|
||||
}
|
||||
fout << "\n\n";
|
||||
|
||||
|
||||
fout << "\n###### Targets\n\n";
|
||||
fout << "cppcheck:\t$(OBJECTS)\n";
|
||||
fout << "\t$(CXX) $(CXXFLAGS) -o cppcheck $(OBJECTS) $(LDFLAGS)\n\n";
|
||||
fout << "cppcheck:\t$(LIBOBJ)\t$(CLIOBJ)\n";
|
||||
fout << "\t$(CXX) $(CXXFLAGS) -o cppcheck $(CLIOBJ) $(LIBOBJ) $(LDFLAGS)\n\n";
|
||||
fout << "all:\tcppcheck\ttestrunner\ttools\n\n";
|
||||
fout << "testrunner:\t$(TESTOBJ)\n";
|
||||
fout << "\t$(CXX) $(CXXFLAGS) -o testrunner $(TESTOBJ) $(LDFLAGS)\n\n";
|
||||
fout << "testrunner:\t$(TESTOBJ)\t$(LIBOBJ)\n";
|
||||
fout << "\t$(CXX) $(CXXFLAGS) -o testrunner $(TESTOBJ) $(LIBOBJ) $(LDFLAGS)\n\n";
|
||||
fout << "test:\tall\n";
|
||||
fout << "\t./testrunner\n\n";
|
||||
fout << "tools:\ttools/dmake\n\n";
|
||||
fout << "tools/dmake:\ttools/dmake.cpp\tsrc/filelister.cpp\tsrc/filelister.h\n";
|
||||
fout << "\t$(CXX) $(CXXFLAGS) -o tools/dmake tools/dmake.cpp src/filelister.cpp $(LDFLAGS)\n\n";
|
||||
fout << "tools/dmake:\ttools/dmake.cpp\tlib/filelister.cpp\tlib/filelister.h\n";
|
||||
fout << "\t$(CXX) $(CXXFLAGS) -o tools/dmake tools/dmake.cpp lib/filelister.cpp $(LDFLAGS)\n\n";
|
||||
fout << "clean:\n";
|
||||
fout << "\trm -f src/*.o test/*.o testrunner cppcheck tools/dmake tools/errmsg\n\n";
|
||||
fout << "\trm -f lib/*.o cli/*.o test/*.o testrunner cppcheck tools/dmake\n\n";
|
||||
fout << "install:\tcppcheck\n";
|
||||
fout << "\tinstall -d ${BIN}\n";
|
||||
fout << "\tinstall cppcheck ${BIN}\n\n";
|
||||
|
||||
fout << "\n###### Build\n\n";
|
||||
|
||||
for (unsigned int i = 0; i < srcfiles.size(); ++i)
|
||||
{
|
||||
fout << objfile(srcfiles[i]) << ": " << srcfiles[i];
|
||||
std::vector<std::string> depfiles;
|
||||
getDeps(srcfiles[i], depfiles);
|
||||
for (unsigned int dep = 0; dep < depfiles.size(); ++dep)
|
||||
fout << " " << depfiles[dep];
|
||||
fout << "\n\t$(CXX) $(CXXFLAGS) -c -o " << objfile(srcfiles[i]) << " " << srcfiles[i] << "\n\n";
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < testfiles.size(); ++i)
|
||||
{
|
||||
fout << objfile(testfiles[i]) << ": " << testfiles[i];
|
||||
std::vector<std::string> depfiles;
|
||||
getDeps(testfiles[i], depfiles);
|
||||
for (unsigned int dep = 0; dep < depfiles.size(); ++dep)
|
||||
fout << " " << depfiles[dep];
|
||||
fout << "\n\t$(CXX) $(CXXFLAGS) -c -o " << objfile(testfiles[i]) << " " << testfiles[i] << "\n\n";
|
||||
}
|
||||
compilefiles(fout, libfiles);
|
||||
compilefiles(fout, clifiles);
|
||||
compilefiles(fout, testfiles);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user