Files
asterisk/funcs/Makefile
Russell Bryant c399a06450 add the 'clean', 'clean-depend', and 'dist-clean' targets as .PHONY targets
since they are targets that do not have resulting files and are never listed
as prerequisites to real targets.  Using .PHONY in this manner improves make
performance by never having to check for resulting files.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 11:27:03 +00:00

75 lines
1.6 KiB
Makefile

#
# Asterisk -- A telephony toolkit for Linux.
#
# Makefile for dialplan functions
#
# Copyright (C) 2005-2006, Digium, Inc.
#
# Kevin P. Fleming <kpfleming@digium.com>
#
# This program is free software, distributed under the terms of
# the GNU General Public License
#
.PHONY: clean clean-depend
ifneq ($(wildcard ../menuselect.makeopts),)
include ../menuselect.makeopts
endif
SELECTED_MODS:=$(filter-out $(MENUSELECT_FUNCS),$(patsubst %.c,%,$(wildcard func_*.c)))
# TODO This check needs to be handled with autoconf
ifeq ($(OSARCH),SunOS)
ifeq ($(shell if [ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]; then echo "OK" ; fi),)
MODS:=$(filter-out func_curl,$(MODS))
endif
else
ifeq ($(shell if [[ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]]; then echo "OK" ; fi),)
MODS:=$(filter-out func_curl,$(MODS))
endif
endif
MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
all: $(MODS)
clean-depend:
rm -f .depend
clean: clean-depend
rm -f *.so *.o
%.so : %.o
$(CC) $(SOLINK) -o $@ $<
func_curl.so: func_curl.o
$(CC) $(SOLINK) -o $@ $< $(CURL_LIB)
func_curl.o: func_curl.c
$(CC) -c -o $@ $(CFLAGS) $(CURL_INCLUDE) $<
func_odbc.so: func_odbc.o
$(CC) $(SOLINK) -o $@ $< $(ODBC_LIB)
func_odbc.o: func_odbc.c
$(CC) -c -o $@ $(CFLAGS) $(ODBC_INCLUDE) $<
install: all
for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
rm -f $(DESTDIR)$(MODULES_DIR)/pbx_functions.so
uninstall:
ifneq ($(wildcard .depend),)
include .depend
endif
depend: .depend
.depend:
../build_tools/mkdep $(CFLAGS) `ls *.c`
env:
env