2009-02-17 10:41:34 -05:00
|
|
|
PWD=$(shell pwd)
|
|
|
|
INCS=-I$(PWD)/src/include
|
2008-12-19 19:35:09 -05:00
|
|
|
LIBEDIT_DIR=../../libs/libedit
|
2008-12-21 16:54:43 -05:00
|
|
|
DEBUG=-g -ggdb
|
2009-02-16 19:27:28 -05:00
|
|
|
BASE_FLAGS=$(INCS) -DHAVE_EDITLINE $(DEBUG) -I$(LIBEDIT_DIR)/src/ -fPIC
|
2011-08-31 15:05:37 -04:00
|
|
|
PICKY=-O2
|
2009-02-16 19:27:28 -05:00
|
|
|
CFLAGS=$(BASE_FLAGS) $(PICKY)
|
2011-08-31 15:05:37 -04:00
|
|
|
CXXFLAGS=$(BASE_FLAGS)
|
2008-12-19 19:35:09 -05:00
|
|
|
MYLIB=libesl.a
|
2011-09-01 10:42:00 -04:00
|
|
|
LIBS=-lncurses -lesl -lpthread -lm
|
2008-12-20 10:40:33 -05:00
|
|
|
LDFLAGS=-L.
|
2010-12-16 12:33:38 -05:00
|
|
|
OBJS=src/esl.o src/esl_event.o src/esl_threadmutex.o src/esl_config.o src/esl_json.o src/esl_buffer.o
|
|
|
|
SRC=src/esl.c src/esl_json.c src/esl_event.c src/esl_threadmutex.c src/esl_config.c src/esl_oop.cpp src/esl_json.c src/esl_buffer.c
|
|
|
|
HEADERS=src/include/esl_config.h src/include/esl_event.h src/include/esl.h src/include/esl_threadmutex.h src/include/esl_oop.h src/include/esl_json.h src/include/esl_buffer.h
|
2009-07-16 16:12:55 -04:00
|
|
|
SOLINK=-shared -Xlinker -x
|
2009-02-16 19:27:28 -05:00
|
|
|
# comment the next line to disable c++ (no swig mods for you then)
|
|
|
|
OBJS += src/esl_oop.o
|
2008-12-19 19:35:09 -05:00
|
|
|
|
2011-03-21 16:18:07 -04:00
|
|
|
all: $(MYLIB) fs_cli testclient testserver ivrd
|
2008-12-19 19:35:09 -05:00
|
|
|
|
2008-12-21 16:54:43 -05:00
|
|
|
$(MYLIB): $(OBJS) $(HEADERS) $(SRC)
|
2008-12-19 19:35:09 -05:00
|
|
|
ar rcs $(MYLIB) $(OBJS)
|
|
|
|
ranlib $(MYLIB)
|
|
|
|
|
2008-12-20 10:40:33 -05:00
|
|
|
testserver: $(MYLIB) testserver.c
|
|
|
|
$(CC) $(CC_CFLAGS) $(CFLAGS) testserver.c -o testserver $(LDFLAGS) $(LIBS)
|
2008-12-19 19:35:09 -05:00
|
|
|
|
2009-03-23 15:55:02 -04:00
|
|
|
ivrd: $(MYLIB) ivrd.c
|
|
|
|
$(CC) $(CC_CFLAGS) $(CFLAGS) ivrd.c -o ivrd $(LDFLAGS) $(LIBS)
|
|
|
|
|
2008-12-20 10:40:33 -05:00
|
|
|
testclient: $(MYLIB) testclient.c
|
|
|
|
$(CC) $(CC_CFLAGS) $(CFLAGS) testclient.c -o testclient $(LDFLAGS) $(LIBS)
|
2008-12-19 19:35:09 -05:00
|
|
|
|
|
|
|
fs_cli: $(MYLIB) fs_cli.c
|
2011-09-01 10:42:00 -04:00
|
|
|
$(CC) $(CC_CFLAGS) $(CFLAGS) fs_cli.c -o fs_cli $(LDFLAGS) -L$(LIBEDIT_DIR)/src/.libs -ledit $(LIBS)
|
2008-12-20 10:40:33 -05:00
|
|
|
|
2011-05-25 16:42:36 -04:00
|
|
|
%.o: %.c $(HEADERS)
|
2008-12-20 10:40:33 -05:00
|
|
|
$(CC) $(CC_CFLAGS) $(CFLAGS) -c $< -o $@
|
2008-12-19 19:35:09 -05:00
|
|
|
|
2011-05-25 16:42:36 -04:00
|
|
|
%.o: %.cpp $(HEADERS)
|
2009-02-16 19:27:28 -05:00
|
|
|
$(CXX) $(CXX_CFLAGS) $(CXXFLAGS) -c $< -o $@
|
|
|
|
|
2008-12-19 19:35:09 -05:00
|
|
|
clean:
|
2009-03-23 15:55:02 -04:00
|
|
|
rm -f *.o src/*.o testclient testserver ivrd fs_cli libesl.a *~ src/*~ src/include/*~
|
2009-03-12 12:10:37 -04:00
|
|
|
$(MAKE) -C perl clean
|
|
|
|
$(MAKE) -C php clean
|
|
|
|
$(MAKE) -C lua clean
|
|
|
|
$(MAKE) -C python clean
|
|
|
|
$(MAKE) -C ruby clean
|
2009-06-25 11:59:41 -04:00
|
|
|
$(MAKE) -C java clean
|
2009-09-23 12:11:58 -04:00
|
|
|
$(MAKE) -C managed clean
|
2009-02-16 19:27:28 -05:00
|
|
|
|
2009-02-17 10:41:34 -05:00
|
|
|
reswig: swigclean
|
2009-03-12 12:10:37 -04:00
|
|
|
$(MAKE) -C perl reswig
|
|
|
|
$(MAKE) -C php reswig
|
|
|
|
$(MAKE) -C lua reswig
|
|
|
|
$(MAKE) -C python reswig
|
|
|
|
$(MAKE) -C ruby reswig
|
2009-06-25 11:59:41 -04:00
|
|
|
$(MAKE) -C java reswig
|
2009-09-23 12:11:58 -04:00
|
|
|
$(MAKE) -C managed reswig
|
2009-02-17 11:06:02 -05:00
|
|
|
|
2009-02-16 19:27:28 -05:00
|
|
|
swigclean: clean
|
2009-03-12 12:10:37 -04:00
|
|
|
$(MAKE) -C perl swigclean
|
|
|
|
$(MAKE) -C php swigclean
|
|
|
|
$(MAKE) -C lua swigclean
|
|
|
|
$(MAKE) -C python swigclean
|
|
|
|
$(MAKE) -C ruby swigclean
|
2009-06-25 11:59:41 -04:00
|
|
|
$(MAKE) -C java swigclean
|
2009-09-23 12:11:58 -04:00
|
|
|
$(MAKE) -C managed swigclean
|
2009-02-16 19:27:28 -05:00
|
|
|
|
2009-02-17 10:46:18 -05:00
|
|
|
perlmod: $(MYLIB)
|
2009-03-12 12:10:37 -04:00
|
|
|
$(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C perl
|
2009-02-16 19:27:28 -05:00
|
|
|
|
2009-02-17 10:54:36 -05:00
|
|
|
phpmod: $(MYLIB)
|
2009-03-12 12:10:37 -04:00
|
|
|
$(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C php
|
2009-02-17 10:54:36 -05:00
|
|
|
|
2009-02-17 11:02:26 -05:00
|
|
|
luamod: $(MYLIB)
|
2009-03-12 12:10:37 -04:00
|
|
|
$(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C lua
|
2009-02-17 11:02:26 -05:00
|
|
|
|
2009-02-17 11:06:02 -05:00
|
|
|
pymod: $(MYLIB)
|
2009-03-12 12:10:37 -04:00
|
|
|
$(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C python
|
2009-02-17 11:06:02 -05:00
|
|
|
|
2010-01-13 19:39:32 -05:00
|
|
|
tclmod: $(MYLIB)
|
|
|
|
$(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C tcl
|
|
|
|
|
2009-02-17 11:12:03 -05:00
|
|
|
rubymod: $(MYLIB)
|
2009-03-12 12:10:37 -04:00
|
|
|
$(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C ruby
|
2009-02-17 11:12:03 -05:00
|
|
|
|
2009-06-25 11:59:41 -04:00
|
|
|
javamod: $(MYLIB)
|
|
|
|
$(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C java
|
|
|
|
|
2009-09-23 12:11:58 -04:00
|
|
|
managedmod: $(MYLIB)
|
|
|
|
$(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C managed
|
|
|
|
|
2011-03-18 12:26:03 -04:00
|
|
|
perlmod-install: perlmod
|
|
|
|
$(MAKE) -C perl install
|
|
|
|
|
2009-02-17 17:12:17 -05:00
|
|
|
phpmod-install: phpmod
|
2009-03-12 12:10:37 -04:00
|
|
|
$(MAKE) -C php install
|
2009-02-17 16:41:06 -05:00
|
|
|
|
2011-02-16 14:35:11 -05:00
|
|
|
pymod-install: pymod
|
|
|
|
$(MAKE) -C python install
|
|
|
|
|
2009-09-23 12:11:58 -04:00
|
|
|
everymod: perlmod phpmod luamod pymod rubymod javamod managedmod
|