summaryrefslogtreecommitdiff
path: root/devel/covtool/files/patch-rules.FreeBSD
blob: 130b20b74b4780bb3d00a3fb75cc6a12d0b91be7 (plain) (blame)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
--- ./rules.FreeBSD.orig	2012-12-06 17:33:14.000000000 +0400
+++ ./rules.FreeBSD	2012-12-06 17:33:14.000000000 +0400
@@ -0,0 +1,85 @@
+#
+# This file defines the compilation rules for building the covtool
+# programs and is used in tests in the subdirectories.
+#
+
+all::
+tests:: all
+clean::
+depend::
+
+INSTALL_DIR=$(PREFIX)
+MAKEFLAGS:=-j1
+INSTALL_PROGRAM=$(BSD_INSTALL_PROGRAM)
+INSTALL_DATA=$(BSD_INSTALL_DATA)
+INSTALL_SCRIPT=$(BSD_INSTALL_SCRIPT)
+
+#
+# select the optimization level -- optimization is the default
+# unless you change it to 1 -- or specify DEBUGGING=1 on the
+# command line
+#
+DEBUGGING=0
+ifeq ($(DEBUGGING),1)
+CCOPTS= %%CXXFLAGS%% -g -DDEBUGGING -Wall -pedantic
+else
+CCOPTS= %%CXXFLAGS%% -Wall -pedantic
+endif
+
+CCDEFS=
+CCINCS= -I. -I/usr/include/g++
+
+CCFLAGS= $(CCDEFS) \
+	 $(CCOPTS) \
+	 $(CCINCS)
+
+CC:=g++
+LN:=g++
+
+#
+# the following COVTOOL declarations speed up cov++ by suppressing its
+# need to read the .cfg file.  You must override all 4 symbols for this
+# speed up to work.
+#
+COVTOOL_CC:= $(CC)
+COVTOOL_LN:= $(LN)
+COVTOOL_EXT:= .c
+COVTOOL_TMP:= .c++
+
+.EXPORT: COVTOOL_CC
+.EXPORT: COVTOOL_LN
+.EXPORT: COVTOOL_TMP
+.EXPORT: COVTOOL_EXT
+
+
+.SUFFIXES: .c .o .i .j .ii
+
+.c.o:
+	$(CC) -o $@ $(CCFLAGS) -fpermissive -c $<
+	
+.c.i:
+	$(CC) "-D__extension__=" "-D__attribute__(X)=" -E $(CCDEFS) $(CCINCS) $< >$@
+
+
+CCDEFS:
+	echo $(CCDEFS)
+	
+CCOPTS:
+	echo $(CCOPTS)
+	
+CCINCS:
+	echo $(CCINCS)
+	
+CCFLAGS:
+	echo $(CCFLAGS)
+	
+CC:
+	echo $(CC)
+	
+LN:
+	echo $(LN)
+	
+	
+clean::
+	rm -fr *.o *.exe *.i *.out *.diff *.a *.log *.bak *.j j.c k.c log
+	rm -fr remake.log *.covexp *.db *.ii *.c++ coverage_html