summaryrefslogtreecommitdiff
blob: 569612d0620c5e1e76df9eb63b69df77337538e2 (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
--- app_iconv/Makefile.orig	2005-08-27 23:02:02.000000000 +0000
+++ app_iconv/Makefile	2005-08-27 23:02:58.000000000 +0000
@@ -8,15 +8,13 @@
 
 NAME=app_iconv
 
-CFLAGS=-g -Wall -D_REENTRANT -D_GNU_SOURCE -fPIC
+DESTDIR=
+
+CFLAGS+=-g -Wall -D_REENTRANT -D_GNU_SOURCE -fPIC
 LIBS=
 RES=$(shell if [ -f /usr/include/asterisk/channel.h ]; then echo "$(NAME).so"; fi)
 
-ifeq (${OSARCH},Darwin)
-SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
-else
-SOLINK=-shared -Xlinker -x
-endif
+SOLINK=$(shell /usr/bin/asterisk-config --solink)
 
 MODULES_DIR=/usr/lib/asterisk/modules
 
@@ -28,10 +26,8 @@
 clean:
 	rm -f $(NAME).o $(NAME).so
 
-install: all
-	if [ -f $(NAME).so ]; then \
-		install -m 755 $(NAME).so $(MODULES_DIR) ; \
-	fi
+install:
+	install -D -m 755 $(NAME).so $(DESTDIR)$(MODULES_DIR)
 
 reload: install
 	asterisk -rx "unload ${RES}"