forked from opencomputeproject/OpenNetworkLinux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
87 lines (64 loc) · 2.47 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
###########################################################
#
# Work in progress.
#
############################################################
ifneq ($(MAKECMDGOALS),docker)
ifneq ($(MAKECMDGOALS),docker-debug)
ifndef ONL
$(error Please source the setup.env script at the root of the ONL tree)
endif
include $(ONL)/make/config.mk
all: amd64 ppc arm
$(MAKE) -C REPO build-clean
onl-amd64 onl-x86 x86 x86_64 amd64: packages_base_all
$(MAKE) -C packages/base/amd64/kernels
$(MAKE) -C packages/base/amd64/initrds
$(MAKE) -C packages/base/amd64/onlp
$(MAKE) -C packages/base/amd64/onlp-snmpd
$(MAKE) -C packages/base/amd64/faultd
$(MAKE) -C builds/amd64
onl-ppc ppc: packages_base_all
$(MAKE) -C packages/base/powerpc/kernels
$(MAKE) -C packages/base/powerpc/initrds
$(MAKE) -C packages/base/powerpc/onlp
$(MAKE) -C packages/base/powerpc/onlp-snmpd
$(MAKE) -C packages/base/powerpc/faultd
$(MAKE) -C packages/base/powerpc/fit
$(MAKE) -C builds/powerpc
ifdef ONL_DEBIAN_SUITE_jessie
arm_toolchain_check:
@which arm-linux-gnueabi-gcc || (/bin/echo -e "*\n* ERROR\n*\n* This container does not support building for the ARM architecture.\n* Please use opennetworklinux/onlbuilder8:1.2 later.\n*" && exit 1)
onl-arm arm: arm_toolchain_check packages_base_all
$(MAKE) -C packages/base/armel/kernels
$(MAKE) -C packages/base/armel/initrds
$(MAKE) -C packages/base/armel/onlp
$(MAKE) -C packages/base/armel/onlp-snmpd
$(MAKE) -C packages/base/armel/faultd
$(MAKE) -C packages/base/armel/fit
$(MAKE) -C builds/armel
else
onl-arm arm:
@/bin/echo -e "*\n* Warning\n*\n* ARM Architecture support is only available in Jessie builds. Please use onbuilder -8.\n*"
endif
packages_base_all:
$(MAKE) -C packages/base/all
rpc rebuild:
$(ONLPM) --rebuild-pkg-cache
endif
endif
.PHONY: docker
ifndef VERSION
VERSION:=7
endif
docker_check:
@which docker > /dev/null || (echo "*** Docker appears to be missing. Please install docker.io in order to build OpenNetworkLinux." && exit 1)
docker: docker_check
@docker/tools/onlbuilder -$(VERSION) --isolate --hostname onlbuilder$(VERSION) --pull --autobuild --non-interactive
# create an interative docker shell, for debugging builds
docker-debug: docker_check
@docker/tools/onlbuilder -$(VERSION) --isolate --hostname onlbuilder$(VERSION) --pull
versions:
$(ONL)/tools/make-versions.py --import-file=$(ONL)/tools/onlvi --class-name=OnlVersionImplementation --output-dir $(ONL)/make/versions --force
relclean:
@find $(ONL)/RELEASE -name "ONL-*" -delete