-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbs.mk
50 lines (35 loc) · 964 Bytes
/
bs.mk
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
43
44
45
46
47
48
49
50
ifndef BS_MK
BS_MK=1
default: all
ifndef BS_DIR
ifneq ($(MAKEFILE_LIST),)
BS_DIR := $(patsubst %/bs.mk,%,$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
endif
endif
ifeq ($(BS_DIR),)
$(error Could not locate BS root directory -- try setting $$(BS_DIR))
endif
# This really should be a default
.DELETE_ON_ERROR:
.SECONDARY:
include $(BS_DIR)/platform.mk
include $(BS_DIR)/init.mk
include $(BS_DIR)/functions.mk
include $(BS_DIR)/language-functions.mk
include $(BS_DIR)/depends.mk
include $(wildcard $(BS_DIR)/language/*.mk)
include $(wildcard $(BS_DIR)/targets/*.mk)
include $(BS_DIR)/subdir.mk
include $(BS_DIR)/objects.mk
include $(BS_DIR)/data.mk
.PHONY: all clean distclean install
all: $(ALL_BUILD_TARGETS)
clean distclean:
rm -rf $(BUILDDIR) $(TMPROOT)
install: all
rsync -rlptO $(BUILDDIR)/ /
$(foreach target,$(_BS_ALL_TARGETS), \
$(eval $(call _BS_TARGET_RULE_$(_BS_TARGET_TYPE_$(target)),$(target))))
$(DIRS):
@mkdir -p $@
endif