]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Fix compilation of iptables-static build
authorJan Engelhardt <jengelh@medozas.de>
Sun, 10 Feb 2008 23:29:36 +0000 (00:29 +0100)
committerPatrick McHardy <kaber@trash.net>
Sun, 6 Apr 2008 15:39:37 +0000 (17:39 +0200)
Adjust the _INIT macro and thus fix the build/linking procedure of
the monolithic do-it-all binary (iptables-static).

Also fix the Makefile since unfortunately, lib%.o does not seem to
have a higher precedence than %.o

extensions/GNUmakefile.in

index 155703d86b3f8b8bd1b23995aadbff9bb2280308..489240912944eb3bd6c41c89778dfd061d055997 100644 (file)
@@ -91,7 +91,7 @@ clean:
 distclean: clean
        rm -f .*.d .*.dd;
 
-%.o: %.c
+init%.o: ${srcdir}/init%.c
        ${AM_VERBOSE_CC} ${CC} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=$*_init ${CFLAGS} -o $@ -c $<;
 
 -include .*.d
@@ -104,7 +104,7 @@ lib%.so: lib%.oo
        ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $<;
 
 lib%.oo: ${srcdir}/lib%.c
-       ${AM_VERBOSE_CC} ${CC} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
+       ${AM_VERBOSE_CC} ${CC} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
 
 
 #
@@ -115,7 +115,7 @@ lib%.oo: ${srcdir}/lib%.c
 #      handling code in the Makefiles.
 #
 lib%.o: ${srcdir}/lib%.c
-       ${AM_VERBOSE_CC} ${CC} ${AM_DEPFLAGS} ${AM_CFLAGS} -DNO_SHARED_LIBS=1 -D_INIT=$*_init ${CFLAGS} -o $@ -c $<;
+       ${AM_VERBOSE_CC} ${CC} ${AM_DEPFLAGS} ${AM_CFLAGS} -DNO_SHARED_LIBS=1 -D_INIT=lib$*_init ${CFLAGS} -o $@ -c $<;
 
 libext4.a: initext4.o ${libext4_objs}
        ${AM_VERBOSE_AR} ${AR} crs $@ $^;