
CPP = $(CROSS_COMPILE)g++

CFLAGS += -Wall -Werror -fpic -I../../inc -O2 -DPLAT_LINUX
CPPFLAGS = $(CFLAGS)

#ifeq ($(LIB), P100)
#else ifeq ($(LIB), Eth)
	LFLAGS += -L../../EthLib -Wl,-rpath=../../EthLib -lbta_eth -lrt
	LIBNAME = libbta_eth.so
#endif

all: bta_eth_example


#ifeq ($(LIB), P100)
#else ifeq ($(LIB), Eth)
#else
#	$(error Please specify a valid library (LIB=Eth or LIB=P100).)
#endif

bta_eth_example: bta_eth_example.cpp
	$(CPP) $(CFLAGS) -c bta_eth_example.cpp
	$(CPP) -o bta_eth_example bta_eth_example.o $(LFLAGS)
	

clean:
	rm -f *.o
	rm -f bta_eth_example

.PHONY: help
help:
	@echo
	@echo '   === examples Makefile help ==='
	@echo
	@echo '   make ..................... Build bta_eth_example'
	@echo '   make clean ............... Clean up'
	@echo
	
