| 12
 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
 
 | --- similarity-tester-3.0.2.orig/Makefile	2017-12-15 18:23:23.000000000 +0100
+++ similarity-tester-3.0.2/Makefile	2018-01-05 15:02:00.719422953 +0100
@@ -38,15 +38,15 @@
 # For UNIX-like systems
 
 SYSTEM =	UNIX
-SUBSYSTEM =	SOLARIS
+SUBSYSTEM =	LINUX
 
 # Locations
 DIR =		/home/dick
-BINDIR =	$(DIR)/bin.`$(DIR)/bin/arch`
-MAN1DIR =	$(DIR)/man/man1
+BINDIR =	debian/similarity-tester/usr/bin
+MAN1DIR =	debian/similarity-tester/usr/share/man/man1
 
 # Commands
-COPY =		cp -p
+COPY =		install
 EXE =		#
 LEX =		flex
 LN =		ln
@@ -56,27 +56,6 @@
 NULLFILE =	/dev/null
 
 ################################################################
-# For MSDOS + MinGW
-
-SYSTEM =	MSDOS
-SUBSYSTEM =	MinGW
-
-# Locations
-DIR =		C:/BIN
-BINDIR =	C:/BIN
-MAN1DIR =	C:/BIN
-
-# File names
-NULLFILE =	nul
-
-# Commands (cp required, since xcopy cannot handle forward slashes)
-COPY =		cp -p
-EXE =		.exe
-LEX =		flex
-LN =		ln
-ZIP =		zip -o
-
-################################################################
 # General, C compilation:
 CC =		gcc -D$(SYSTEM) -D$(SUBSYSTEM)
 LINT =		lint -ansi -D$(SYSTEM) -D$(SUBSYSTEM)
@@ -96,13 +75,13 @@
 .3.pdf:
 		$(GROFF) $<
 #	=============== end of ../lib/sysidf.mk
-
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 # Compiling
 MEMORY =	-DMEMCHECK -DMEMCLOBBER
-CFLAGS =	$(VERSION) $(MEMORY) -O4 # -Dlint -DLIB # for all db active
+CFLAGS =	$(VERSION) $(MEMORY) -O4  $(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get CFLAGS) -fPIC
 LIBFLAGS =	#
 LINTFLAGS =	-Dlint_test $(MEMORY) -h# -X
-LOADFLAGS =	-s#			# strip symbol table
+LOADFLAGS =	-s $(shell dpkg-buildflags --get LDFLAGS) # strip symbol table
 LOADER =	$(CC) $(LOADFLAGS)
 
 # Debugging
@@ -391,7 +370,7 @@
 		$(BINDIR)/sim_mira$(EXE) \
 		$(BINDIR)/sim_8086$(EXE)
 
-$(MAN1D)/sim.1:	sim.1
+$(MAN1DIR)/sim.1:	sim.1
 		$(COPY) sim.1 $@
 
 $(BINDIR)/sim_c$(EXE):	sim_c$(EXE)
@@ -429,6 +408,7 @@
 		-rm -f $(GARBAGE)
 		-rm -f *.aux *.log *.out
 		-rm -f a.out a.exe sim.txt core mon.out
+		-rm -f $(BINARIES)
 
 fresh:		clean
 		-rm -f *.exe
 |