a1b8a8af8e5fd14dbb4e0eaa6cbe042b9beddc59
[sip-router] / modules / db_mysql / Makefile
1 # $Id$
2 #
3 # WARNING: do not run this directly, it should be run by the master Makefile
4
5 include ../../Makefile.defs
6 auto_gen=
7 NAME=db_mysql.so
8
9 # mysql.h locations (freebsd,openbsd  solaris)
10 DEFS +=-DSER_MOD_INTERFACE -I$(LOCALBASE)/include -I$(LOCALBASE)/include/mysql \
11                 -I$(LOCALBASE)/mysql/include \
12                 -I/usr/include/mysql
13
14 # libmysqlclient locations on RH/Suse, Solaris /OpenBSD, FreeBSD
15 # (Debian does the right thing and puts it in /usr/lib)
16 LIBS=-L/usr/lib/mysql -L$(LOCALBASE)/lib -L$(LOCALBASE)/lib/mysql \
17                 -L$(LOCALBASE)/mysql/lib/mysql/ \
18                 -L$(LOCALBASE)/mysql/lib \
19                 -L/usr/lib64/mysql \
20                 -lmysqlclient -lz
21
22 SERLIBPATH=../../lib
23 SER_LIBS=$(SERLIBPATH)/srdb2/srdb2 $(SERLIBPATH)/srdb1/srdb1
24
25 install-mysql-script: $(bin_prefix)/$(bin_dir)
26         sed -e "s#^DEFAULT_SCRIPT_DIR.*#DEFAULT_SCRIPT_DIR=\"$(share_prefix)/$(share_dir)\"#g" \
27         < ../../scripts/mysql/$(SCR_NAME)_mysql.sh > \
28         $(bin_prefix)/$(bin_dir)/$(MAIN_NAME)_mysql.sh
29         chmod 755 $(bin_prefix)/$(bin_dir)/$(MAIN_NAME)_mysql.sh
30
31 install-scripts: install-mysql-script
32
33 include ../../Makefile.modules