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