-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
42 lines (29 loc) · 1.19 KB
/
Makefile
1
2
3
4
5
6
7
8
9
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
37
38
39
40
41
42
export BR2_EXTERNAL := $(CURDIR):$(CURDIR)/netbox
export PATH := $(CURDIR)/utils:$(CURDIR)/netbox/utils:$(PATH)
export M4PATH := $(CURDIR)/configs:$(CURDIR)/configs/include:$(CURDIR)/netbox/configs:$(CURDIR)/netbox/configs/include:$(M4PATH)
# $(info $(BR2_EXTERNAL))
ARCH ?= $(shell uname -m)
O ?= $(CURDIR)/output
config := $(O)/.config
bmake = $(MAKE) -C netbox/buildroot O=$(O) $1
nmake = $(MAKE) -C netbox O=$(O) $1
all: $(config) netbox/buildroot/Makefile
@+$(call bmake,$@)
$(config):
@+$(call bmake,list-defconfigs)
@echo "ERROR: No configuration selected."
@echo "Please choose a configuration from the list above by running"
@echo "'make <board>_defconfig' before building an image."
@exit 1
%_defconfig: configs/%_defconfig
@+$(call bmake,$@)
configs/%_defconfig: configs/%_defconfig.m4 | netbox/buildroot/Makefile
@echo "\e[7m>>> Generating $(@F) -- ignore any \"reassigning to symbol\" those are AppDemo overrides.\e[0m"
@gendefconfig -d $(@D) -i $(CURDIR)/configs -i $(CURDIR)/configs/include $(<F) >$@
%: | netbox/buildroot/Makefile
@+$(call bmake,$@)
netbox/buildroot/Makefile:
@git submodule update --init --recursive
run diff-defconfig:
@$(call nmake,$@)
.PHONY: all