ifndef COMPILING_WHOLE_TREE
TOPDIR=$(shell pwd)/../../../../..
endif

include $(TOPDIR)/Rules.make

OBJECTS=bnep.o main.o sdp.o

CFLAGS=-I../include -I../../libs/include -I../../sdp/include/\
 -O2 -fPIC -DVERSION=\"1.1rc2\"

ifneq ($(sort $(filter y,$(CONFIG_SAGEM_LB2) $(CONFIG_GENERATION_SAGEM_MINI))),y)
CFLAGS += -mips32
endif

LDFLAGS=-L $(TOPDIR)/libs -lbluetooth -lsdp\

all : pand

pand : $(OBJECTS)
	$(CC) $(LDFLAGS) -o pand $(OBJECTS)
	$(STRIP) $@

%.o: %.c
	$(CC) $(CFLAGS) -o $@ -c $<
        
clean :
	rm -f *.o pand
