From cf6e4aa648c4555bee35c39a72fa5a9eb3f7ce97 Mon Sep 17 00:00:00 2001 From: Jonh Wendell Date: Sun, 24 Feb 2013 10:53:52 +0100 Subject: [PATCH] build an libarptc.a archive this allows programs to statically link against libarptc. (cherry picked from commit b064d44bd2581444108b1bdf8de1b8752246321f) Signed-off-by: Phil Sutter --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9a7bea4643de8..38158d9e98ab4 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ endif include extensions/Makefile -all: arptables +all: arptables libarptc/libarptc.a arptables.o: arptables.c $(CC) $(CFLAGS) -c -o $@ $< @@ -30,6 +30,9 @@ arptables-standalone.o: arptables-standalone.c libarptc/libarptc.o: libarptc/libarptc.c libarptc/libarptc_incl.c $(CC) $(CFLAGS) -c -o $@ $< +libarptc/libarptc.a: libarptc/libarptc.o + $(AR) rcs $@ $< + arptables: arptables-standalone.o arptables.o libarptc/libarptc.o $(EXT_OBJS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ @@ -62,7 +65,7 @@ clean: rm -f arptables rm -f *.o *~ rm -f extensions/*.o extensions/*~ - rm -f libarptc/*.o libarptc/*~ + rm -f libarptc/*.o libarptc/*~ libarptc/*.a rm -f include/*~ include/libarptc/*~ DIR:=arptables-v$(ARPTABLES_VERSION) -- 2.21.0