Debian Codegraph @

scripts/CppUnitTemplates/ProjectTemplate/ProjectMakefile

raw
1 #Set this to @ to keep the makefile quiet
2 SILENCE = @
3
4 #---- Outputs ----#
5 COMPONENT_NAME = Project
6 TARGET_LIB = \
7 lib/lib$(COMPONENT_NAME).a
8
9 TEST_TARGET = \
10 $(COMPONENT_NAME)_tests
11
12 #--- Inputs ----#
13 PROJECT_HOME_DIR = .
14 CPPUTEST_HOME = ../CppUTest
15 CPPUNIT_HOME = ../cppunit
16 CPP_PLATFORM = Gcc
17
18 #CFLAGS are set to override malloc and free to get memory leak detection in C programs
19 CFLAGS = -Dmalloc=cpputest_malloc -Dfree=cpputest_free
20 CPPFLAGS =
21 #GCOVFLAGS = -fprofile-arcs -ftest-coverage
22
23 #SRC_DIRS is a list of source directories that make up the target library
24 #If test files are in these directories, their IMPORT_TEST_GROUPs need
25 #to be included in main to force them to be linked in. By convention
26 #put them into an AllTests.h file in each directory
27 SRC_DIRS = \
28 src/util
29
30 #TEST_SRC_DIRS is a list of directories including
31 # - A test main (AllTests.cpp by convention)
32 # - OBJ files in these directories are included in the TEST_TARGET
33 # - Consequently - AllTests.h containing the IMPORT_TEST_GROUPS is not needed
34 # -
35 TEST_SRC_DIRS = \
36 tests \
37 tests/util
38
39 #includes for all compiles
40 INCLUDES =\
41 -I.\
42 -Iinclude/util\
43 -I$(CPPUTEST_HOME)/include/
44
45 #Flags to pass to ld
46 LDFLAGS += $(CPPUNIT_HOME)/lib/libcppunit.a
47
48 include $(CPPUTEST_HOME)/build/ComponentMakefile