TREETOP=$(shell findtop.sh) include $(TREETOP)/Rules.make GBECURRDIR = $(shell pwd) # input and output prog names for this app # user custom script dirs related to this app if needed GBE_SCRIPTDIR = $(GBECURRDIR)/scripts # user custom headers path GBE_INCLUDE_PATH += -I$(GBECURRDIR)/include GBE_INCLUDE_PATH += -I$(TREETOP)/linux/include ## exports for make files in lower level sub dirs # note this is just an example for me to create a static library, # will have to investigate how to create a dynamic library. export GBE_LIB_NAME = libHWDD_GBE.a export GBE_LIB_PATH = $(GBECURRDIR)/lib GBE_CFLAGS += -DCONFIG_NETAPP_HWDD GBE_CFLAGS += $(GBE_INCLUDE_PATH) export GBE_CFLAGS # toolsPfx exported by top of tree make export GBECC = $(toolsPfx)gcc BIN_INSTALL_DIR=$(outDirInstallInitramfs)/hwdd/nic LIB_INSTALL_DIR=$(outDirInstallInitramfs)/usr/lib # export these for lower level make export BIN_INSTALL_DIR export LIB_INSTALL_DIR ## all: $(GBE_LIB_NAME) install: all @mkdir -p $(BIN_INSTALL_DIR)/private @cp -f $(PROGDIR)/test_cmds.sh $(BIN_INSTALL_DIR)/private @cp -f $(PROGDIR)/negative_test_cmds.sh $(BIN_INSTALL_DIR)/private $(GBE_LIB_NAME): @for dir in $(GBE_LIB_PATH); do (cd $$dir && make) ; done clean: @for dir in $(GBE_LIB_PATH); do (cd $$dir && make clean) ; done @rm -f $(BIN_INSTALL_DIR)/gbe*.sh @rm -f $(LIB_INSTALL_DIR)/$(GBE_LIB_NAME) @rm -rf $(TEMP_INSTALL_DIR) clobber: clean chk: @echo @echo "---------------- $(shell pwd) -----------------" @echo "GBECURRDIR=" $(GBECURRDIR) @echo "GBE_INCLUDE_PATH=" $(GBE_INCLUDE_PATH) @echo "BIN_INSTALL_DIR=" $(BIN_INSTALL_DIR) @echo "LIB_INSTALL_DIR=" $(LIB_INSTALL_DIR) @echo "outDirInstallInitramfs=" $(outDirInstallInitramfs) @cd $(GBE_LIB_PATH) && make chk