mirror of
https://github.com/asterisk/asterisk.git
synced 2026-01-06 18:13:45 +00:00
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
58 lines
1.1 KiB
Makefile
58 lines
1.1 KiB
Makefile
#
|
|
# Asterisk -- A telephony toolkit for Linux.
|
|
#
|
|
# Makefile for dialplan functions
|
|
#
|
|
# Copyright (C) 2005 - 2006, Digium
|
|
#
|
|
# Kevin P. Fleming <kpfleming@digium.com>
|
|
#
|
|
# This program is free software, distributed under the terms of
|
|
# the GNU General Public License
|
|
#
|
|
|
|
AVAILABLE_FUNCS=$(patsubst %.c,%.o,$(wildcard func*.c))
|
|
|
|
ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
|
|
STANDALONE_FUNCS=$(filter-out func_odbc.o,$(AVAILABLE_FUNCS))
|
|
else
|
|
STANDALONE_FUNCS=$(AVAILABLE_FUNCS)
|
|
endif
|
|
|
|
FUNCS=$(STANDALONE_FUNCS:.o=.so)
|
|
|
|
ifeq (${OSARCH},CYGWIN)
|
|
CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
|
|
CYGSOLIB=-L.. -L. -lasterisk.dll
|
|
else
|
|
CFLAGS+=-fPIC
|
|
endif
|
|
|
|
all: $(FUNCS)
|
|
|
|
clean:
|
|
rm -f *.so *.o .depend
|
|
|
|
%.so : %.o
|
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
|
|
|
|
func_odbc.so: func_odbc.o
|
|
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc
|
|
|
|
install: all
|
|
for x in $(FUNCS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
|
|
|
|
uninstall:
|
|
|
|
ifneq ($(wildcard .depend),)
|
|
include .depend
|
|
endif
|
|
|
|
depend: .depend
|
|
|
|
.depend:
|
|
../build_tools/mkdep $(CFLAGS) `ls *.c`
|
|
|
|
env:
|
|
env
|