makedumpfile/makedumpfile-coptflags.diff

29 lines
860 B
Diff
Raw Normal View History

---
Makefile | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/Makefile
+++ b/Makefile
@@ -4,9 +4,10 @@ VERSION=1.1.3
DATE=13 April 2007
CC = gcc
-CFLAGS = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \
+COPTFLAGS = -g -O2 -Wall
+CFLAGS = $(COPTFLAGS) -D_FILE_OFFSET_BITS=64 \
-DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(DATE)"'
-CFLAGS_ARCH = -g -O2 -Wall
+CFLAGS_ARCH = $(COPTFLAGS)
ARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/sun4u/sparc64/ \
-e s/arm.*/arm/ -e s/sa110/arm/ \
@@ -30,7 +31,7 @@ $(OBJ_ARCH): $(SRC_ARCH)
$(CC) $(CFLAGS_ARCH) -c -o ./$@ ./$(@:.o=.c)
makedumpfile: $(SRC) $(OBJ_ARCH)
- $(CC) $(CFLAGS) $(OBJ_ARCH) -o $@ $< -static -ldw -lelf -lz
+ $(CC) $(CFLAGS) $(OBJ_ARCH) -o $@ $< -Wl,-Bstatic -ldw -lelf -lz -Wl,-Bdynamic
clean:
rm -f $(OBJ) $(OBJ_ARCH) makedumpfile makedumpfile.8.gz