summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
-rw-r--r--extensions/Makefile2
2 files changed, 4 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index fc63616..5103425 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,6 @@ DESTDIR:=
CFLAGS:=-Wall -Wunused
CFLAGS_SH_LIB:=-fPIC
CC:=gcc
-LD:=ld
ifeq ($(shell uname -m),sparc64)
CFLAGS+=-DEBT_MIN_ALIGN=8 -DKERNEL_64_USERSPACE_32
@@ -85,10 +84,10 @@ ebtables-standalone.o: ebtables-standalone.c include/ebtables_u.h
.PHONY: libebtc
libebtc: $(OBJECTS2)
- $(CC) -shared -Wl,-soname,libebtc.so -o libebtc.so -lc $(OBJECTS2)
+ $(CC) -shared $(LDFLAGS) -Wl,-soname,libebtc.so -o libebtc.so -lc $(OBJECTS2)
ebtables: $(OBJECTS) ebtables-standalone.o libebtc
- $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) -o $@ ebtables-standalone.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \
+ $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(LDFLAGS) -o $@ ebtables-standalone.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \
-Wl,-rpath,$(LIBDIR)
ebtablesu: ebtablesu.c
@@ -105,7 +104,7 @@ ebtables-restore.o: ebtables-restore.c include/ebtables_u.h
$(CC) $(CFLAGS) $(PROGSPECS) -c $< -o $@ -I$(KERNEL_INCLUDES)
ebtables-restore: $(OBJECTS) ebtables-restore.o libebtc
- $(CC) $(CFLAGS) -o $@ ebtables-restore.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ebtables-restore.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \
-Wl,-rpath,$(LIBDIR)
.PHONY: daemon
diff --git a/extensions/Makefile b/extensions/Makefile
index 0ac4f7a..2070ee8 100644
--- a/extensions/Makefile
+++ b/extensions/Makefile
@@ -17,7 +17,7 @@ extensions/libebt_%.so: extensions/ebt_%.so
mv $< $@
extensions/ebtable_%.so: extensions/ebtable_%.o
- $(CC) -shared -o $@ -lc $< -nostartfiles
+ $(CC) $(LDFLAGS) -shared -o $@ -lc $< -nostartfiles
extensions/libebtable_%.so: extensions/ebtable_%.so
mv $< $@