1#
2# This file defines the compilation rules for building the covtool
3# programs and is used in tests in the subdirectories.
4#
5
6all::
7tests:: all
8clean::
9depend::
10
11INSTALL_DIR= /usr/local/covtool
12
13MAKEFLAGS:=-j1
14
15#
16# select the optimization level -- optimization is the default
17# unless you change it to 1 -- or specify DEBUGGING=1 on the
18# command line
19#
20DEBUGGING=1
21ifeq ($(DEBUGGING),1)
22CCOPTS= -g -DDEBUGGING
23else
24CCOPTS= +O2
25endif
26
27CCDEFS=
28CCINCS= -I.
29
30CCFLAGS= $(CCDEFS) \
31	 $(CCOPTS) \
32	 $(CCINCS)
33
34CC:=aCC
35LN:=aCC
36
37#
38# the following COVTOOL declarations speed up cov++ by suppressing its
39# need to read the .cfg file.  You must override all 4 symbols for this
40# speed up to work.
41#
42COVTOOL_CC:= $(CC)
43COVTOOL_LN:= $(LN)
44COVTOOL_EXT:= .c
45COVTOOL_TMP:= .c++
46
47.EXPORT: COVTOOL_CC
48.EXPORT: COVTOOL_LN
49.EXPORT: COVTOOL_TMP
50.EXPORT: COVTOOL_EXT
51
52
53.SUFFIXES: .c .o .i .j .ii
54
55.c.o:
56	$(CC) -o $@ $(CCFLAGS) -c $<
57
58.c.i:
59	$(CC) -E $(CCDEFS) $(CCINCS) $< >$@
60
61
62CCDEFS:
63	echo $(CCDEFS)
64
65CCOPTS:
66	echo $(CCOPTS)
67
68CCINCS:
69	echo $(CCINCS)
70
71CCFLAGS:
72	echo $(CCFLAGS)
73
74CC:
75	echo $(CC)
76
77LN:
78	echo $(LN)
79
80
81clean::
82	rm -fr *.o *.exe *.i *.out *.diff *.a *.log *.bak *.j j.c k.c log
83	rm -fr remake.log *.covexp *.db *.ii *.c++ coverage_html
84
85
86