pud: nmealib: also build a static library
authorFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 20 Jul 2012 07:59:40 +0000 (09:59 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 20 Jul 2012 08:37:31 +0000 (10:37 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/nmealib/Makefile

index 58e2b9e..55e58ee 100644 (file)
@@ -12,6 +12,7 @@ include Makefile.inc
 #
 
 LIBNAME = libnmea.so
+LIBNAMESTATIC = libnmea.a
 
 DESTDIR ?=
 USRDIR ?= $(DESTDIR)/usr
@@ -32,10 +33,14 @@ INCLUDES = -I ./include
 
 all: default_target
 
-default_target: all-before lib/$(LIBNAME)
+default_target: all-before lib/$(LIBNAMESTATIC) lib/$(LIBNAME)
 
 remake: clean all
 
+lib/$(LIBNAMESTATIC): $(OBJ)
+       @echo "[AR] $@"
+       @ar rcs "$@" $(OBJ)
+
 lib/$(LIBNAME): $(OBJ)
        @echo "[LD] $@"
        @$(CC) -shared -Wl,-soname=$(LIBNAME) -o "$@" $(LIBRARIES) $(OBJ)