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
|
Description: Correct handling of CFLAGS. Thanks to Helmut Grohne (Closes: #980064)
Modify upstream Makefile to *not* combine CFLAGS into CC, which gets
overridden by dh_auto_build and causes cross cross-compilation errors.
Author: Helmut Grohne <helmut@subdivi.de>
Jan Gru <j4n6ru@gmail.com>
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=980064
Last-Update: 2021-05-17
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- scalpel-1.60.orig/Makefile
+++ scalpel-1.60/Makefile
@@ -2,9 +2,8 @@
CC_OPTS = $(CFLAGS) $(LDFLAGS) $(CPPFLAGS)
GOAL = scalpel
-CC += $(CC_OPTS)
.c.o:
- $(CC) -c $<
+ $(CC) $(CC_OPTS) -c $<
HEADER_FILES = scalpel.h prioque.h dirname.h
SRC = helpers.c files.c scalpel.c dig.c prioque.c base_name.c
@@ -12,18 +11,18 @@
all: linux
-linux: CC += -D__LINUX
+linux: CC_OPTS += -D__LINUX
linux: $(GOAL)
-bsd: CC += -D__OPENBSD
+bsd: CC_OPTS += -D__OPENBSD
bsd: $(GOAL)
-win32: CC += -D__WIN32 -Ic:\PThreads\include
+win32: CC_OPTS += -D__WIN32 -Ic:\PThreads\include
win32: $(SRC) $(HEADER_FILES)
- $(CC) -o $(GOAL).exe $(SRC) -liberty -Lc:\PThreads\lib -lpthreadGC1
+ $(CC) $(CC_OPTS) -o $(GOAL).exe $(SRC) -liberty -Lc:\PThreads\lib -lpthreadGC1
$(GOAL): $(OBJS)
- $(CC) -o $(GOAL) $(OBJS) -lm
+ $(CC) $(CC_OPTS) -o $(GOAL) $(OBJS) -lm
scalpel.o: scalpel.c $(HEADER_FILES) Makefile
dig.o: dig.c $(HEADER_FILES) Makefile
|