CC=gcc
LINUXINC=/lib/modules/$(shell uname -r)/build/include
WANINC=/usr/include/wanpipe
INCLUDES=-I../ -I/usr/include -I/usr/src/libpri -I$(WANINC) -I.  -I/usr/local/include 
CFLAGS=-D__LINUX__ -D_REENTRANT -D_GNU_SOURCE -O2 -DWANPIPE_TDM_API 
CCFLAGS=-Wall -Wstrict-prototypes -Wmissing-prototypes -g

all: sample_c 

everything:  sample_c 


lib_api.o: lib_api.c
	$(CC) $(CCFLAGS) $(INCLUDES) $(CFLAGS) -c -o lib_api.o lib_api.c

sample.o: sample.c
	$(CC) $(CCFLAGS) $(INCLUDES) $(CFLAGS) -c -o sample.o sample.c

sample_c: sample.o lib_api.o 
	$(CC) $(CCFLAGS) $(INCLUDES) $(CFLAGS) -o sample_c sample.o lib_api.o -L. -lsangoma -lm

clean:
	rm -fr sample_c *.o *.so *~ *core* *.so* *.a

distclean: clean
	@echo OK
