/
Makefile
54 lines (38 loc) · 957 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
include ../../config.mk
CPPFLAGS = $(XML2_CPPFLAGS) $(CUNIT_CPPFLAGS) $(ZLIB_CPPFLAGS) $(GHT_CPPFLAGS) -I..
LDFLAGS = $(XML2_LDFLAGS) $(CUNIT_LDFLAGS) $(ZLIB_LDFLAGS) $(GHT_LDFLAGS)
EXE = cu_tester
# ADD YOUR NEW TEST FILE HERE (1/1)
OBJS = \
cu_tester.o \
cu_pc_bytes.o \
cu_pc_schema.o \
cu_pc_point.o \
cu_pc_patch.o \
cu_pc_patch_ght.o \
cu_pc_patch_lazperf.o
ifeq ($(CUNIT_LDFLAGS),)
# No cunit? Emit message and continue
all:
@echo "CUnit not found, skipping build"
check:
@echo "CUnit not found, skipping tests"
else
# Yes cunit? Build tests and run
# Build the unit tester
all: $(EXE)
# Build and run the unit tester
check: $(EXE)
@./$(EXE)
endif
# Build the main unit test executable
$(EXE): $(OBJS) ../$(LIB_A) ../$(LIB_A_LAZPERF)
$(CC) -o $@ $^ $(LDFLAGS) -lm -lstdc++
../$(LIB_A):
$(MAKE) -C .. $(LIB_A)
../$(LIB_A_LAZPERF):
$(MAKE) -C .. $(LIB_A_LAZPERF)
# Clean target
clean:
@rm -f $(OBJS)
@rm -f $(EXE)