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

ifndef GOLINUX
include $(TOPDIR)/Rules.make
else
include $(TOPDIR)/Rules_GoLinux.make
endif

PROGS=hciattach hciconfig hcitool l2ping sdptool

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

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

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

all : $(PROGS)
	$(STRIP) $(PROGS)

clean :
	rm -f hciattach hciconfig hcitool l2ping
