Blame SOURCES/0001-build-an-libarptc.a-archive.patch

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