#
# Asterisk -- A telephony toolkit for Linux.
# 
# Makefile for channel drivers
#
# Copyright (C) 1999-2005, Mark Spencer
#
# Mark Spencer <markster@digium.com>
#
# Edited By Belgarath <> Aug 28 2004
# Added bare bones ultrasparc-linux support.
#
# This program is free software, distributed under the terms of
# the GNU General Public License
#

#ASTERISK INCLUDE FILES
#The directory containing the Asterisk include files (eg: /usr/include or /usr/include/asterisk or /usr/src/asterisk/include or ...)
#AST_INCLUDE_DIR=/home/maruzz/devel/asterisk-1.4.11/include

#ASTERISK VERSION 1.4.XX
#Uncomment the following line if you are compiling for Asterisk 1.4 series
#CFLAGS+=-DASTERISK_VERSION_1_4

#ASTERISK VERSION 1.2.XX
#Uncomment the following line if you are compiling for Asterisk 1.2 series
CFLAGS+=-DASTERISK_VERSION_1_2

#SKYPE SUPPORT
#Uncomment the following two lines if you DO NOT WANT SKYPE SUPPORT in Linux (so, no libX11 needed)
CFLAGS+=-DNO_SKYPE
SKYPE_LIB=
#Comment out the following line if you DO NOT WANT SKYPE SUPPORT in Linux (so, no libX11 needed)
#SKYPE_LIB=-L/usr/X11R6/lib -lX11



CFLAGS+=-g -ggdb -Wall -D_GNU_SOURCE
CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
CFLAGS+=-fomit-frame-pointer -D_REENTRANT
CFLAGS+=-Wall
#CFLAGS+=-I$(AST_INCLUDE_DIR)
ifeq ($(shell uname -m),x86_64)
CFLAGS+=-fPIC
endif

CHANNEL_LIBS=chan_celliax.so

SUBDIRS=

all: $(CHANNEL_LIBS) 

clean:
	rm -f *.so *.o 

#chan_celliax section begins
chan_celliax.o: chan_celliax.c
	$(CC) -c $(CFLAGS) -o chan_celliax.o chan_celliax.c
chan_celliax.so: chan_celliax.o celliax_spandsp.o celliax_libcsv.o
	$(CC) -shared -Xlinker -x -o $@ chan_celliax.o celliax_spandsp.o celliax_libcsv.o -lasound -lm -ldl $(SKYPE_LIB)
#chan_celliax section ends

