blob: 0a007b169a7975469601d108ef54fbbbfcbd8d0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
diff -Naur libnatpmp-20140401.orig/Makefile libnatpmp-20140401/Makefile
--- libnatpmp-20140401.orig/Makefile 2013-12-09 15:52:28.000000000 -0500
+++ libnatpmp-20140401/Makefile 2014-04-02 10:03:42.128609226 -0400
@@ -5,7 +5,7 @@
# http://miniupnp.free.fr/libnatpmp.html
OS = $(shell uname -s)
-CC = gcc
+CC ?= gcc
INSTALL = install -p
ARCH = $(shell uname -m | sed -e s/i.86/i686/)
VERSION = $(shell cat VERSION)
@@ -153,19 +153,19 @@
$(CC) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
natpmpc-static: natpmpc.o $(STATICLIB)
- $(CC) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
natpmpc-shared: natpmpc.o $(SHAREDLIB)
- $(CC) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
$(STATICLIB): $(LIBOBJS)
$(AR) crs $@ $?
$(SHAREDLIB): $(LIBOBJS)
ifeq ($(OS), Darwin)
- $(CC) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
else
- $(CC) -shared -Wl,-soname,$(SONAME) -o $@ $^ $(EXTRA_LD)
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(SONAME) -o $@ $^ $(EXTRA_LD)
endif
|