Makefile 796 Bytes
Newer Older
1 2 3 4 5

PKGTYPE ?= $(shell scripts/osstuff.sh -p)

DRIVERS =
ifeq ($(PKGTYPE),deb)
6
DRIVERS = e1000e igb i40e i40evf ixgbe ixgbevf mpt3sas mlnx-ofed-src
7 8
endif
ifeq ($(PKGTYPE),rpm)
David Johnson's avatar
David Johnson committed
9
DRIVERS = i40e i40evf ixgbe ixgbevf mpt3sas
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
endif

INSTALL_DRIVERS   := $(addsuffix -install,$(DRIVERS))
CLEAN_DRIVERS     := $(addsuffix -clean,$(DRIVERS))
CLEAN_ALL_DRIVERS := $(addsuffix -cleanall,$(DRIVERS))

.PHONY: all install clean

all: $(DRIVERS)

install: $(INSTALL_DRIVERS)

clean: $(CLEAN_DRIVERS)

cleanall: $(CLEAN_ALL_DRIVERS)

$(DRIVERS):
	@$(MAKE) -C drivers/$@ $(PKGTYPE)

$(INSTALL_DRIVERS):
	@$(MAKE) -C drivers/$(subst -install,,$@) $(PKGTYPE)-install

$(CLEAN_DRIVERS):
	@$(MAKE) -C drivers/$(subst -clean,,$@) $(PKGTYPE)-clean

$(CLEAN_ALL_DRIVERS):
	@$(MAKE) -C drivers/$(subst -cleanall,,$@) clean