Makefile 876 Bytes
Newer Older
1 2
# include parent_common.mk for buildsystem's defines
#use absolute path for REPO_PARENT
3
REPO_PARENT ?= $(shell /bin/pwd)/..
4 5
-include $(REPO_PARENT)/parent_common.mk

6 7
FMC_BUS ?= fmc-bus

8 9 10
# FMC_BUS_ABS has to be absolut path, due to beeing passed to the Kbuild
FMC_BUS_ABS ?= $(abspath $(FMC_BUS) )
export FMC_BUS_ABS
11

12
DIRS = $(FMC_BUS_ABS) kernel tools
13

Adam Wujek's avatar
Adam Wujek committed
14 15 16 17 18 19 20 21 22 23 24 25
.PHONY: all clean modules install modules_install $(DIRS)

all clean modules install modules_install: $(DIRS)

clean: TARGET = clean
modules: TARGET = modules
install: TARGET = install
modules_install: TARGET = modules_install

$(DIRS):
	$(MAKE) -C $@ $(TARGET)

26
$(FMC_BUS_ABS): fmc-bus-init_repo
27 28 29

# init submodule if missing
fmc-bus-init_repo:
30
	@test -d $(FMC_BUS_ABS)/doc || ( echo "Checking out submodule $(FMC_BUS_ABS)"; git submodule update --init $(FMC_BUS_ABS) )
31

32
kernel: $(FMC_BUS_ABS)
33

34
include scripts/gateware.mk