From 17c60f5edd85c1a74c8832c79535e2c25bcf627c Mon Sep 17 00:00:00 2001 From: Bart De Schuymer Date: Thu, 14 Dec 2006 18:55:44 +0000 Subject: shared libraries need fPIC --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6ddfdc9..a05ce17 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,7 @@ override SYSCONFIGDIR:=$(DESTDIR)$(SYSCONFIGDIR) CFLAGS:=-Wall -Wunused +CFLAGS_SH_LIB:=-fPIC CC:=gcc LD:=ld @@ -72,16 +73,16 @@ PROGSPECSD:=-DPROGVERSION=\"$(PROGVERSION)\" \ all: ebtables ebtables-restore communication.o: communication.c include/ebtables_u.h - $(CC) $(CFLAGS) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES) + $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES) libebtc.o: libebtc.c include/ebtables_u.h - $(CC) $(CFLAGS) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES) + $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES) useful_functions.o: useful_functions.c include/ebtables_u.h - $(CC) $(CFLAGS) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES) + $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES) getethertype.o: getethertype.c include/ethernetdb.h - $(CC) $(CFLAGS) $(PROGSPECS) -c -o $@ $< -Iinclude/ + $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -Iinclude/ ebtables.o: ebtables.c include/ebtables_u.h $(CC) $(CFLAGS) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES) -- cgit v1.2.3