Subversion Repositories HelenOS

Rev

Rev 3022 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3022 Rev 4055
Line 27... Line 27...
27
#
27
#
28
 
28
 
29
## Include configuration
29
## Include configuration
30
#
30
#
31
 
31
 
32
-include Makefile.config
32
.PHONY: all config distclean clean cscope
33
 
33
 
34
## Setup platform configuration
34
all: Makefile.config config.h config.defs
-
 
35
	$(MAKE) -C kernel
-
 
36
	$(MAKE) -C uspace
35
#
37
	$(MAKE) -C boot
36
 
38
 
37
ifeq ($(PLATFORM),amd64)
-
 
38
	KARCH = amd64
-
 
39
	MACHINE = opteron
-
 
40
	UARCH = amd64
-
 
41
	BARCH = amd64
-
 
42
endif
-
 
43
 
-
 
44
ifeq ($(PLATFORM),arm32)
-
 
45
	KARCH = arm32
-
 
46
	UARCH = arm32
-
 
47
	BARCH = arm32
-
 
48
endif
-
 
49
 
-
 
50
ifeq ($(PLATFORM),ia32)
-
 
51
	KARCH = ia32
-
 
52
	UARCH = ia32
-
 
53
	BARCH = ia32
-
 
54
endif
-
 
55
 
-
 
56
ifeq ($(PLATFORM),ia64)
-
 
57
	KARCH = ia64
-
 
58
	UARCH = ia64
-
 
59
	BARCH = ia64
-
 
60
endif
-
 
61
 
-
 
62
ifeq ($(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
-
 
90
endif
-
 
91
 
-
 
92
ifeq ($(PLATFORM),ppc32)
-
 
93
	KARCH = ppc32
-
 
94
	UARCH = ppc32
-
 
95
	BARCH = ppc32
-
 
96
endif
-
 
97
 
-
 
98
ifeq ($(PLATFORM),ppc64)
-
 
99
	KARCH = ppc64
-
 
100
	UARCH = ppc64
-
 
101
	BARCH = ppc64
-
 
102
endif
-
 
103
 
-
 
104
ifeq ($(PLATFORM),sparc64)
-
 
105
	KARCH = sparc64
-
 
106
	UARCH = sparc64
-
 
107
	BARCH = sparc64
-
 
108
endif
-
 
109
 
-
 
110
ifeq ($(PLATFORM),ia32xen)
-
 
111
	KARCH = ia32xen
-
 
112
	UARCH = ia32
-
 
113
	BARCH = ia32xen
-
 
114
endif
-
 
115
 
-
 
116
.PHONY: all build config distclean clean
39
Makefile.config config.h config.defs: HelenOS.config
117
 
-
 
118
all:
-
 
119
	tools/config.py HelenOS.config default $(PLATFORM) $(COMPILER) $(CONFIG_DEBUG)
40
	tools/config.py HelenOS.config default
120
	$(MAKE) -C . build
-
 
121
 
-
 
122
build:
-
 
123
ifneq ($(MACHINE),)
-
 
124
	$(MAKE) -C kernel ARCH=$(KARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG) MACHINE=$(MACHINE)
-
 
125
else
-
 
126
	$(MAKE) -C kernel ARCH=$(KARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG)
-
 
127
endif
-
 
128
	$(MAKE) -C uspace ARCH=$(UARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG)
-
 
129
ifneq ($(IMAGE),)
-
 
130
	$(MAKE) -C boot ARCH=$(BARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG) IMAGE=$(IMAGE)
-
 
131
else
-
 
132
	$(MAKE) -C boot ARCH=$(BARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG)
-
 
133
endif
-
 
134
 
41
 
135
config:
42
config:
136
	tools/config.py HelenOS.config
43
	tools/config.py HelenOS.config
137
 
44
 
138
distclean:
45
distclean: clean
139
	-$(MAKE) -C kernel distclean
-
 
140
	-$(MAKE) -C uspace distclean
-
 
141
	-$(MAKE) -C boot distclean
-
 
142
	-rm Makefile.config
46
	rm -f Makefile.config config.h config.defs tools/*.pyc
143
 
47
 
144
clean:
48
clean:
145
	-$(MAKE) -C kernel clean
49
	-$(MAKE) -C kernel clean
146
	-$(MAKE) -C uspace clean
50
	-$(MAKE) -C uspace clean
147
	-$(MAKE) -C boot clean
51
	-$(MAKE) -C boot clean
-
 
52
 
-
 
53
cscope:
-
 
54
	find kernel boot uspace -regex '^.*\.[chsS]$$' -print > srclist
-
 
55
	rm -f cscope.out
-
 
56
	cscope -bi srclist