You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-libs/libnatpmp/files/remove-static-lib-20120821....

74 lines
2.2 KiB

diff -Naur libnatpmp-20120821.orig/Makefile libnatpmp-20120821/Makefile
--- libnatpmp-20120821.orig/Makefile 2012-08-26 20:33:51.000000000 -0400
+++ libnatpmp-20120821/Makefile 2012-08-26 20:36:53.000000000 -0400
@@ -24,7 +24,6 @@
OBJS = $(LIBOBJS) testgetgateway.o natpmpc.o
-STATICLIB = libnatpmp.a
ifeq ($(OS), Darwin)
SHAREDLIB = libnatpmp.dylib
SONAME = $(basename $(SHAREDLIB)).$(APIVERSION).dylib
@@ -38,7 +37,7 @@
HEADERS = natpmp.h
-EXECUTABLES = testgetgateway natpmpc-shared natpmpc-static
+EXECUTABLES = testgetgateway natpmpc-shared
INSTALLPREFIX ?= $(PREFIX)/usr
INSTALLDIRINC = $(INSTALLPREFIX)/include
@@ -47,9 +46,9 @@
.PHONY: all clean depend install cleaninstall installpythonmodule
-all: $(STATICLIB) $(SHAREDLIB) $(EXECUTABLES)
+all: $(SHAREDLIB) $(EXECUTABLES)
-pythonmodule: $(STATICLIB) libnatpmpmodule.c setup.py
+pythonmodule: libnatpmpmodule.c setup.py
python setup.py build
touch $@
@@ -57,18 +56,17 @@
python setup.py install
clean:
- $(RM) $(OBJS) $(EXECUTABLES) $(STATICLIB) $(SHAREDLIB)
+ $(RM) $(OBJS) $(EXECUTABLES) $(SHAREDLIB)
$(RM) pythonmodule
$(RM) -r build/ dist/
depend:
makedepend -f$(MAKEFILE_LIST) -Y $(OBJS:.o=.c) 2>/dev/null
-install: $(HEADERS) $(STATICLIB) $(SHAREDLIB) natpmpc-shared
+install: $(HEADERS) $(SHAREDLIB) natpmpc-shared
$(INSTALL) -d $(INSTALLDIRINC)
$(INSTALL) -m 644 $(HEADERS) $(INSTALLDIRINC)
$(INSTALL) -d $(INSTALLDIRLIB)
- $(INSTALL) -m 644 $(STATICLIB) $(INSTALLDIRLIB)
$(INSTALL) -m 644 $(SHAREDLIB) $(INSTALLDIRLIB)/$(SONAME)
$(INSTALL) -d $(INSTALLDIRBIN)
$(INSTALL) -m 755 natpmpc-shared $(INSTALLDIRBIN)/natpmpc
@@ -78,19 +76,12 @@
$(RM) $(addprefix $(INSTALLDIRINC), $(HEADERS))
$(RM) $(INSTALLDIRLIB)/$(SONAME)
$(RM) $(INSTALLDIRLIB)/$(SHAREDLIB)
- $(RM) $(INSTALLDIRLIB)/$(STATICLIB)
testgetgateway: testgetgateway.o getgateway.o
-natpmpc-static: natpmpc.o $(STATICLIB)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
-
natpmpc-shared: natpmpc.o $(SHAREDLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
-$(STATICLIB): $(LIBOBJS)
- $(AR) crs $@ $?
-
$(SHAREDLIB): $(LIBOBJS)
ifeq ($(OS), Darwin)
$(CC) $(CFLAGS) $(LDFLAGS) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^