--- ./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