summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
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)