CC=gcc
WANINC=$(WAN_VIRTUAL)/usr/include/wanpipe

WLINC=../../../patches/kdrivers/include
WEC=../../../patches/kdrivers/wanec
WECOCT=../../../patches/kdrivers/wanec/oct6100_api/include

INCLUDES=-I../ -I/usr/include -I/usr/src/libpri  -I$(WLINC) -I$(WEC) -I$(WECOCT) -I$(WANINC) -I$(WANINC)/oct6100_api -I$(WANINC)/oct6100_api/oct6100api -I. -Ihdlc -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  hdlc_test.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
