bash-3.00$ cat Makefile MODULES=res_cepstral.o CC=gcc LD=ld CPUARCH=$(shell uname -m) OPT?=-pipe -O6 WARN=-Wall -Wstrict-prototypes -Wno-pointer-sign -Wmissing-prototypes -Wmissing-declarations DEBUG=-g SOLINK=-shared -Xlinker -x STRIP=strip INSTALL=install STATIC=-static ifeq ($(CPUARCH),i686) ARCHMODE=-m32 endif ifeq ($(CPUARCH),x86_64) ARCHMODE=-m64 -fPIC endif LDFLAGS+=-L/opt/swift/lib CFLAGS+=-I/opt/swift/include -Iinclude LIBCEPSTRAL=-lswift -Wl,-rpath,/opt/swift/lib CFLAGS+=-Iasterisk/include all: asterisk/include/asterisk/autoconfig.h asterisk/include/asterisk/buildopts.h res_cepstral.so clean: rm -f *.o *.so res_cepstral.so: res_cepstral.o $(CC) $(ARCHMODE) $(SOLINK) -o $@ $< $(STATIC) $(LIBS) $(LDFLAGS) $(LIBCEPSTRAL) ifeq ($(DEBUG),) $(STRIP) $@ endif res_cepstral.o: res_cepstral.c $(CC) -c -o $@ $< $(ARCHMODE) $(CFLAGS) $(OPT) $(DEBUG) $(WARN) -DAST_MODULE=\"res_cepstral\" asterisk/include/asterisk/autoconfig.h: @cd asterisk && ./configure && cd .. asterisk/include/asterisk/buildopts.h: @cd asterisk && make include/asterisk/buildopts.h && cd .. install: all install -m 644 include/asterisk/saytext.h /usr/include/asterisk/saytext.h install -m 755 res_cepstral.so /usr/lib/asterisk/modules/res_cepstral.so