summaryrefslogtreecommitdiff
path: root/sysutils/dd_rescue/files/patch-Makefile
blob: 83bf0cedb4a304c380aa23fe5c64644f3720878b (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
--- Makefile.orig	2014-05-27 20:31:21.000000000 +0900
+++ Makefile	2014-08-06 21:41:59.000000000 +0900
@@ -6,10 +6,7 @@
 
 DESTDIR = 
 
-CC = gcc
-RPM_OPT_FLAGS = -Os -Wall -g -D_FORTIFY_SOURCE=2
-CFLAGS = $(RPM_OPT_FLAGS) $(EXTRA_CFLAGS) -DHAVE_CONFIG_H
-CFLAGS_OPT = $(CFLAGS) -O3
+CFLAGS_OPT = $(CFLAGS) -DHAVE_CONFIG_H
 INSTALL = install
 INSTALLFLAGS = -s
 prefix = $(DESTDIR)/usr
@@ -32,7 +29,7 @@
 LIB = lib
 LIBDIR = /usr/$(LIB)
 COMPILER = $(shell $(CC) --version | head -n1)
-DEFINES = -DVERSION=\"$(VERSION)\"  -D__COMPILER__="\"$(COMPILER)\"" # -DPLUGSEARCH="\"$(LIBDIR)\""
+DEFINES = -DVERSION=\"$(VERSION)\"  -D__COMPILER__="\"$(COMPILER)\"" -DHAVE_CONFIG_H # -DPLUGSEARCH="\"$(LIBDIR)\""
 OUT = -o dd_rescue
 
 LZOP = $(shell type -p lzop || type -P true)
@@ -46,12 +43,6 @@
   HAVE_LZO=0
 endif
 
-ifeq ($(CC),wcl386)
-  CFLAGS = "-ox -wx $(EXTRA_CFLAGS)"
-  DEFINES = -dMISS_STRSIGNAL -dMISS_PREAD -dVERSION=\"$(VERSION)\" -d__COMPILER__="\"$(COMPILER)\""
-  OUT = ""
-endif
-
 HAVE_AVX2 := $(shell echo "" | $(CC) -mavx2 -xc - 2>&1 | grep unrecognized || echo 1)
 HAVE_SSE42 := $(shell echo "" | $(CC) -msse4.2 -xc - 2>&1 | grep unrecognized || echo 1)
 
@@ -74,7 +65,7 @@
 endif
 endif
 
-ifeq ($(MACH),x86_64)
+ifeq ($(MACH),amd64)
 	LIB = lib64
 	OBJECTS2 = find_nonzero_sse2.o
 ifeq ($(HAVE_SSE42),1)
@@ -180,7 +171,7 @@
 	$(CC) $(CFLAGS) -DNO_LIBDL $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) $(LIBDIR)/libfallocate.a
 
 dd_rescue: dd_rescue.c $(HEADERS) $(OBJECTS) $(OBJECTS2)
-	$(CC) $(CFLAGS) $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) -ldl
+	$(CC) $(CFLAGS) $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2)
 
 md5: md5.c md5.h hash.h config.h
 	$(CC) $(CFLAGS_OPT) -DMD5_MAIN -o $@ $<