-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile.common
57 lines (43 loc) · 1.25 KB
/
Makefile.common
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
51
52
53
54
55
56
57
# Common paths, rules, etc
# Default rule
.PHONY: build unpack
.PHONY: default woce webos-ports custom
ifndef CONFIG
default: woce
endif
build::
woce:
$(MAKE) CONFIG=woce build
webos-ports:
$(MAKE) CONFIG=webos-ports build
custom:
$(MAKE) CONFIG=custom build
test:
$(MAKE) CONFIG=test build
# LEVEL should be set by every Makefile
ifndef LEVEL
$(error "LEVEL not set in Makefile!")
endif
# Paths to common directories
DL_DIR=$(LEVEL)/downloads
DOCTOR_DIR=$(LEVEL)/doctors
TOOLCHAIN_DIR=$(LEVEL)/toolchain
# Include rules for re-using global directories
# for downloads and doctors, if they already exist
include $(LEVEL)/support/srvln.mk
# Include rules for building download targets
include $(LEVEL)/support/dl.mk
# Include 'metadata-like' file for specifying sources
ifdef CONFIG
include $(LEVEL)/config/$(CONFIG).mk
endif
# Include information used for cross-compiling
include $(LEVEL)/support/cross-compile.mk
# Include rules for downloading doctor files
include $(LEVEL)/support/doctors.mk
# Include rules for extracting rootfs from doctors
include $(LEVEL)/support/rootfs.mk
# Include rules for downloading and extracting toolchains
include $(LEVEL)/support/toolchains.mk
# Include rules for bootstrapping headers
include $(LEVEL)/support/install-headers.mk