Line 0
Link Here
|
|
|
1 |
|
2 |
CC=gcc |
3 |
CFLAGS=$(shell /usr/bin/asterisk-config --cflags) -fPIC -DPIC |
4 |
SOLINK=$(shell /usr/bin/asterisk-config --solink) |
5 |
LIBS=-lssl -lcrypto -ldl -lresolv -llber -lldap |
6 |
|
7 |
ASTMODDIR=$(shell /usr/bin/asterisk-config --modulesdir) |
8 |
|
9 |
all: .depend app_ldap.so |
10 |
|
11 |
.depend: |
12 |
@if [ ! -x /usr/bin/asterisk-config ]; then \ |
13 |
echo "/usr/bin/asterisk-config not found!"; \ |
14 |
exit 255; \ |
15 |
fi |
16 |
|
17 |
.c.o: |
18 |
$(CC) -c $(CFLAGS) -o $@ $< |
19 |
|
20 |
app_ldap.so: app_ldap.o |
21 |
$(CC) $(SOLINK) $(LIBS) -o $@ |
22 |
|
23 |
install: |
24 |
if [ ! -d $(DESTDIR)$(ASTMODDIR) ]; then mkdir -p $(DESTDIR)$(ASTMODDIR); fi |
25 |
install -m755 app_ldap.so $(DESTDIR)$(ASTMODDIR) |
26 |
|