source: mainline/Makefile@ 7688b5d

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 7688b5d was a710680, checked in by Martin Decky <martin@…>, 19 years ago

allow automatic build

  • Property mode set to 100644
File size: 3.5 KB
Line 
1#
2# Copyright (C) 2006 Martin Decky
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8#
9# - Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer.
11# - Redistributions in binary form must reproduce the above copyright
12# notice, this list of conditions and the following disclaimer in the
13# documentation and/or other materials provided with the distribution.
14# - The name of the author may not be used to endorse or promote products
15# derived from this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28
29## Include configuration
30#
31
32-include Makefile.config
33
34## Setup platform configuration
35#
36
37ifeq ($(PLATFORM),amd64)
38 KARCH = amd64
39 MACHINE = opteron
40 UARCH = amd64
41 BARCH = amd64
42endif
43
44ifeq ($(PLATFORM),ia32)
45 KARCH = ia32
46 UARCH = ia32
47 BARCH = ia32
48endif
49
50ifeq ($(PLATFORM),ia64)
51 KARCH = ia64
52 UARCH = ia64
53 BARCH = ia64
54endif
55
56ifeq ($(PLATFORM),mips32msim)
57 KARCH = mips32
58 MACHINE = msim
59 UARCH = mips32
60 BARCH = mips32
61 IMAGE = binary
62endif
63
64ifeq ($(PLATFORM),mips32sim)
65 KARCH = mips32
66 MACHINE = simics
67 UARCH = mips32
68 BARCH = mips32
69 IMAGE = ecoff
70endif
71
72ifeq ($(PLATFORM),mips32gbe)
73 KARCH = mips32
74 MACHINE = bgxemul
75 UARCH = mips32eb
76 BARCH = mips32
77 IMAGE = ecoff
78endif
79
80ifeq ($(PLATFORM),mips32gle)
81 KARCH = mips32
82 MACHINE = lgxemul
83 UARCH = mips32
84 BARCH = mips32
85 IMAGE = ecoff
86endif
87
88ifeq ($(PLATFORM),mips32sgi)
89 KARCH = mips32
90 MACHINE = indy
91 UARCH = mips32eb
92 BARCH = mips32
93 IMAGE = ecoff
94endif
95
96ifeq ($(PLATFORM),ppc32)
97 KARCH = ppc32
98 UARCH = ppc32
99 BARCH = ppc32
100endif
101
102ifeq ($(PLATFORM),ppc64)
103 KARCH = ppc64
104 UARCH = ppc64
105 BARCH = ppc64
106endif
107
108ifeq ($(PLATFORM),sparc64)
109 KARCH = sparc64
110 UARCH = sparc64
111 BARCH = sparc64
112endif
113
114ifeq ($(PLATFORM),xen32)
115 KARCH = xen32
116 UARCH = ia32
117 BARCH = xen32
118endif
119
120.PHONY: all build config distclean clean
121
122all:
123 tools/config.py HelenOS.config default $(PLATFORM) $(COMPILER) $(CONFIG_DEBUG)
124 $(MAKE) -C . build
125
126build:
127ifneq ($(MACHINE),)
128 $(MAKE) -C kernel ARCH=$(KARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG) MACHINE=$(MACHINE)
129else
130 $(MAKE) -C kernel ARCH=$(KARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG)
131endif
132 $(MAKE) -C uspace ARCH=$(UARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG)
133ifneq ($(IMAGE),)
134 $(MAKE) -C boot ARCH=$(BARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG) IMAGE=$(IMAGE)
135else
136 $(MAKE) -C boot ARCH=$(BARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG)
137endif
138
139config:
140 tools/config.py HelenOS.config
141
142distclean:
143 -rm Makefile.config
144 -$(MAKE) -C kernel distclean
145 -$(MAKE) -C uspace distclean
146 -$(MAKE) -C boot distclean
147
148clean:
149 -$(MAKE) -C kernel clean
150 -$(MAKE) -C uspace clean
151 -$(MAKE) -C boot clean
Note: See TracBrowser for help on using the repository browser.