blob: 9afb2548a81b763449b7195b688adee091684284 [file] [log] [blame]
default: install
AUTOTOOLS_DIRS:=fci/lib cmm
KMOD_DIRS:=fci pfe_ctrl auto_bridge
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))
# Don't try to install in parallel, or depmod gets confused.
auto_bridge/install: pfe_ctrl/install
pfe_ctrl/install: fci/install
pfe_ctrl/all:
$(MAKE) -C pfe_ctrl $(LINUX_MAKE_FLAGS) KERNELDIR=$(LINUX_DIR) PFE_DIR=../pfe
pfe_ctrl/install:
$(MAKE) -C $(LINUX_DIR) $(LINUX_MAKE_FLAGS) M="$(shell /bin/pwd)/pfe_ctrl" modules_install
auto_bridge/all:
$(MAKE) -C auto_bridge $(LINUX_MAKE_FLAGS) KERNEL_SOURCE=$(LINUX_DIR)
auto_bridge/install:
$(MAKE) -C $(LINUX_DIR) $(LINUX_MAKE_FLAGS) M="$(shell /bin/pwd)/auto_bridge" modules_install
$(MAKE) -C auto_bridge 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 auto_bridge/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