blob: a45ac7c71225872abb2cf450e457bc934233251f [file] [log] [blame]
default: install
AUTOTOOLS_DIRS:=fci/lib cmm
KMOD_DIRS:=fci pfe_ctrl
DIRS:=$(AUTOTOOLS_DIRS) $(KMOD_DIRS) pfe_firmware
show-AUTOTOOLS_DIRS:
@echo $(AUTOTOOLS_DIRS)
all: $(addsuffix /all,$(DIRS))
clean: $(addsuffix /clean,$(DIRS))
install: $(addsuffix /install,$(DIRS))
pfe_ctrl/all:
$(MAKE) -C pfe_ctrl $(LINUX_MAKE_FLAGS) KERNELDIR=$(LINUX_DIR) PFE_DIR=../pfe WIFI_ENABLE=y
pfe_ctrl/install:
$(MAKE) -C $(LINUX_DIR) $(LINUX_MAKE_FLAGS) M="$(shell /bin/pwd)/pfe_ctrl" modules_install
fci/all:
$(MAKE) -C fci $(LINUX_MAKE_FLAGS) KERNEL_SOURCE=$(LINUX_DIR)
fci/install:
$(MAKE) -C $(LINUX_DIR) $(LINUX_MAKE_FLAGS) M="$(shell /bin/pwd)/fci" modules_install
$(addsuffix /install,$(KMOD_DIRS)): %/install: %/all
cmm/all: fci/lib/install
%/all:
$(MAKE) -C $* all
%/clean:
$(MAKE) -C $* clean
%/install:
$(MAKE) -C $* DESTDIR=$(TARGET_DIR) install
$(addsuffix /install,$(AUTOTOOLS_DIRS)): %/install: %/install-staging %/install-target
@
fci/lib/install-staging: fci/lib/all
$(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
cp $(@D)/include/*.h $(STAGING_DIR)/usr/include/
%/install-staging: %/all
$(MAKE) -C $* DESTDIR=$(STAGING_DIR) install
%/install-target: %/all
$(MAKE) -C $* DESTDIR=$(TARGET_DIR) install