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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
#
# Copyright (C) 2003 by Troll Phone Networks AS
#
# This program is distributed under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2, or (at your
# option) any later version.
#
# $Id: Makefile,v 1.11 2004/08/26 16:49:12 tholo Exp $
#
DEBUG+= -g -fno-inline-functions
CFLAGS+= -O3 -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow \
$(DEBUG) -D_REENTRANT -I/usr/include/pcre -fPIC
LDFLAGS+= $(DEBUG)
LDLIBS+= -lpthread
CFLAGS+= -DWITH_MYSQL -I/usr/include/mysql
LDFLAGS+= -L/usr/lib/mysql
LDLIBS+= -lmysqlclient -lz
LDLIBS+= -lpcre
HDRS=
SRCS= rate_engine.c pcre_subst.c
OBJS:= $(SRCS:%.c=%.o)
MOD= rate_engine.so
ASTLIBDIR= $(DESTDIR)/usr/lib/asterisk/modules
ASTCONFDIR= $(DESTDIR)/etc/asterisk
BINDIR= /usr/bin
.PHONY: all
all: $(MOD)
$(MOD): $(OBJS)
$(CC) $(LDFLAGS) -shared -o $@ $(OBJS) $(LDLIBS)
.PHONY: clean
clean:
rm -f .depend $(MOD) $(OBJS) *.bak
.PHONY: depend
depend .depend:
$(CC) -M $(SRCS) >.depend
.PHONY: install
install: all
install -m 755 $(MOD) $(ASTLIBDIR)
.PHONY: samples
samples:
install -m 644 rate_engine.conf.sample $(ASTCONFDIR)/rate_engine.conf
ifneq ($(wildcard .depend),)
include .depend
endif
|