source: mainline/Makefile@ 0f6a3376

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export 0.2.0.4
Last change on this file since 0f6a3376 was d630139, checked in by Jakub Jermar <jakub@…>, 18 years ago

Add arm32 architecture. The 32 suffix is used to specify that 16-bit Thumb
instructions are not used. The arm32 code is mostly composed of placeholders
that need to be replaced by real implementation. So far, the arm32 tree
only compiles. If run under GXEmul simulator, an infinit loop at the
kernel entry point will be entered.

  • Property mode set to 100644
File size: 3.4 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),arm32)
45 KARCH = arm32
46 UARCH = arm32
47 BARCH = arm32
48endif
49
50ifeq ($(PLATFORM),ia32)
51 KARCH = ia32
52 UARCH = ia32
53 BARCH = ia32
54endif
55
56ifeq ($(PLATFORM),ia64)
57 KARCH = ia64
58 UARCH = ia64
59 BARCH = ia64
60endif
61
62ifeq ($(PLATFORM),mips32)
63 KARCH = mips32
64 BARCH = mips32
65
66 ifeq ($(MACHINE),msim)
67 UARCH = mips32
68 IMAGE = binary
69 endif
70
71 ifeq ($(MACHINE),simics)
72 UARCH = mips32
73 IMAGE = ecoff
74 endif
75
76 ifeq ($(MACHINE),bgxemul)
77 UARCH = mips32eb
78 IMAGE = ecoff
79 endif
80
81 ifeq ($(MACHINE),lgxemul)
82 UARCH = mips32
83 IMAGE = ecoff
84 endif
85
86 ifeq ($(MACHINE),indy)
87 UARCH = mips32eb
88 IMAGE = ecoff
89 endif
90endif
91
92ifeq ($(PLATFORM),ppc32)
93 KARCH = ppc32
94 UARCH = ppc32
95 BARCH = ppc32
96endif
97
98ifeq ($(PLATFORM),ppc64)
99 KARCH = ppc64
100 UARCH = ppc64
101 BARCH = ppc64
102endif
103
104ifeq ($(PLATFORM),sparc64)
105 KARCH = sparc64
106 UARCH = sparc64
107 BARCH = sparc64
108endif
109
110ifeq ($(PLATFORM),ia32xen)
111 KARCH = ia32xen
112 UARCH = ia32
113 BARCH = ia32xen
114endif
115
116.PHONY: all build config distclean clean
117
118all:
119 tools/config.py HelenOS.config default $(PLATFORM) $(COMPILER) $(CONFIG_DEBUG)
120 $(MAKE) -C . build
121
122build:
123ifneq ($(MACHINE),)
124 $(MAKE) -C kernel ARCH=$(KARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG) MACHINE=$(MACHINE)
125else
126 $(MAKE) -C kernel ARCH=$(KARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG)
127endif
128 $(MAKE) -C uspace ARCH=$(UARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG)
129ifneq ($(IMAGE),)
130 $(MAKE) -C boot ARCH=$(BARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG) IMAGE=$(IMAGE)
131else
132 $(MAKE) -C boot ARCH=$(BARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG)
133endif
134
135config:
136 tools/config.py HelenOS.config
137
138distclean:
139 -rm Makefile.config
140 -$(MAKE) -C kernel distclean
141 -$(MAKE) -C uspace distclean
142 -$(MAKE) -C boot distclean
143
144clean:
145 -$(MAKE) -C kernel clean
146 -$(MAKE) -C uspace clean
147 -$(MAKE) -C boot clean
Note: See TracBrowser for help on using the repository browser.