File: cross-build.diff

package info (click to toggle)
elilo 3.14-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,292 kB
  • sloc: ansic: 13,963; sh: 719; asm: 533; makefile: 263; perl: 44
file content (266 lines) | stat: -rw-r--r-- 5,586 bytes parent folder | download | duplicates (2)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
diff --git a/Makefile b/Makefile
index f0efebd..9d82cbf 100644
--- a/Makefile
+++ b/Makefile
@@ -25,15 +25,19 @@
 # to use this program.
 #
 
-include Make.defaults
-TOPDIR=.
+SRCDIR = .
+
+VPATH = $(SRCDIR)
+
+include $(SRCDIR)/Make.defaults
+TOPDIR = $(SRCDIR)
 
 
 CRTOBJS       = $(EFICRT0)/crt0-efi-$(ARCH).o
 LDSCRIPT      = $(EFICRT0)/elf_$(ARCH)_efi.lds
 
 LDFLAGS	     += -T $(LDSCRIPT) -shared -Bsymbolic -L$(EFILIB) -L$(GNUEFILIB) $(CRTOBJS)
-LOADLIBES     = -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name)
+LOADLIBES     = -lefi -lgnuefi $(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
 FORMAT        = efi-app-$(ARCH)
 
 FILESYSTEM    =
@@ -87,7 +91,8 @@ fileops.o : Make.defaults
 chooser.o : Make.defaults
 
 $(SUBDIRS): dummy
-	$(MAKE) -C $@
+	mkdir -p $@
+	$(MAKE) -C $@ -f $(SRCDIR)/../$@/Makefile SRCDIR=$(SRCDIR)/../$@ ARCH=$(ARCH)
 
 dummy:
 
@@ -106,4 +111,4 @@ ifeq ($(GCC_VERSION),2)
 	@exit 1
 endif
 
-include Make.rules
+include $(SRCDIR)/Make.rules
diff --git a/choosers/Makefile b/choosers/Makefile
index 9915f48..85d31c7 100644
--- a/choosers/Makefile
+++ b/choosers/Makefile
@@ -23,10 +23,15 @@
 # to use this program.
 #
 
-include ../Make.defaults
-include ../Make.rules
+SRCDIR = .
+
+VPATH = $(SRCDIR)
+
+include $(SRCDIR)/../Make.defaults
+include $(SRCDIR)/../Make.rules
+
+TOPDIR=$(SRCDIR)/..
 
-TOPDIR=$(CDIR)/..
 
 FILES=
 
@@ -47,7 +52,8 @@ $(TARGET): $(TOPDIR)/Make.defaults $(FILES)
 		echo "You need to define at least one chooser in Make.defaults"; \
 		exit 1; \
 	fi
-	$(LD) -o $@ -r $(FILES)
+	$(LD) $(LD3264) -o $@ -r $(FILES)
+
 
 clean:
 	$(RM) -f $(TARGET) $(FILES)
diff --git a/devschemes/Makefile b/devschemes/Makefile
index 6ac05af..5328cb1 100644
--- a/devschemes/Makefile
+++ b/devschemes/Makefile
@@ -23,10 +23,15 @@
 # to use this program.
 #
 
-include ../Make.defaults
-include ../Make.rules
+SRCDIR = .
+
+VPATH = $(SRCDIR)
+
+include $(SRCDIR)/../Make.defaults
+include $(SRCDIR)/../Make.rules
+
+TOPDIR=$(SRCDIR)/..
 
-TOPDIR=$(CDIR)/..
 
 FILES=simple.o
 
@@ -40,7 +45,7 @@ all: $(TARGET)
 #      without doing make clean.
 #
 $(TARGET): $(FILES)
-	$(LD) -r -o $@ $(FILES)
+	$(LD) $(LD3264) -r -o $@ $(FILES)
 
 clean:
 	$(RM) -f $(TARGET) $(FILES)
diff --git a/fs/Makefile b/fs/Makefile
index 8e422b2..0bb303f 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -23,10 +23,15 @@
 # to use this program.
 #
 
-include ../Make.defaults
-include ../Make.rules
+SRCDIR = .
+
+VPATH = $(SRCDIR)
+
+include $(SRCDIR)/../Make.defaults
+include $(SRCDIR)/../Make.rules
+
+TOPDIR=$(SRCDIR)/..
 
-TOPDIR=$(CDIR)/..
 
 FILES=
 ifeq ($(CONFIG_localfs),y)
@@ -59,7 +64,7 @@ $(TARGET): $(TOPDIR)/Make.defaults $(FILES)
 		echo "You need to define at least one filesystem in Make.defaults"; \
 		exit 1; \
 	fi
-	$(LD) -r -o $@ $(FILES)
+	$(LD) $(LD3264) -r -o $@ $(FILES)
 
 clean:
 	$(RM) -f $(TARGET) $(FILES)
diff --git a/ia32/Makefile b/ia32/Makefile
index 353ae67..c5f421b 100644
--- a/ia32/Makefile
+++ b/ia32/Makefile
@@ -23,10 +23,15 @@
 # to use this program.
 #
 
-include ../Make.defaults
-include ../Make.rules
+SRCDIR = .
+
+VPATH = $(SRCDIR)
+
+include $(SRCDIR)/../Make.defaults
+include $(SRCDIR)/../Make.rules
+
+TOPDIR=$(SRCDIR)/..
 
-TOPDIR=$(CDIR)/..
 
 FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o
 
@@ -37,13 +42,13 @@ all: $(TARGET)
 system.o: rmswitch.h
 
 rmswitch.h: bin_to_h.c rmswitch.S
-	$(CC) -o bin_to_h bin_to_h.c
-	$(AS) -o rmswitch.o rmswitch.S
+	$(CC) -o bin_to_h $(SRCDIR)/bin_to_h.c
+	$(AS) -o rmswitch.o $(SRCDIR)/rmswitch.S
 	$(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o
 	./bin_to_h <rmswitch >rmswitch.h
 
 $(TARGET): $(FILES)
-	$(LD) -r -o $@ $(FILES)
+	$(LD) $(LD3264) -r -o $@ $(FILES)
 
 clean:
 	$(RM) -f $(TARGET) $(FILES)
diff --git a/ia64/Makefile b/ia64/Makefile
index a243d0f..bee0a2b 100644
--- a/ia64/Makefile
+++ b/ia64/Makefile
@@ -23,10 +23,15 @@
 # to use this program.
 #
 
-include ../Make.defaults
-include ../Make.rules
+SRCDIR = .
+
+VPATH = $(SRCDIR)
+
+include $(SRCDIR)/../Make.defaults
+include $(SRCDIR)/../Make.rules
+
+TOPDIR=$(SRCDIR)/..
 
-TOPDIR=$(CDIR)/..
 
 FILES=system.o config.o fpswa.o plain_loader.o gzip_loader.o \
       gzip.o memset.o memcpy.o setjmp.o longjmp.o
diff --git a/tools/Makefile b/tools/Makefile
index 8858224..97083d7 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -23,10 +23,15 @@
 # to use this program.
 #
 
-include ../Make.defaults
-include ../Make.rules
+SRCDIR = .
+
+VPATH = $(SRCDIR)
+
+include $(SRCDIR)/../Make.defaults
+include $(SRCDIR)/../Make.rules
+
+TOPDIR=$(SRCDIR)/..
 
-TOPDIR=$(CDIR)/..
 
 FILES=eliloalt.o
 TARGET=eliloalt
diff --git a/x86_64/Makefile b/x86_64/Makefile
index 4af4b8d..7ade312 100644
--- a/x86_64/Makefile
+++ b/x86_64/Makefile
@@ -23,10 +23,15 @@
 # to use this program.
 #
 
-include ../Make.defaults
-include ../Make.rules
+SRCDIR = .
+
+VPATH = $(SRCDIR)
+
+include $(SRCDIR)/../Make.defaults
+include $(SRCDIR)/../Make.rules
+
+TOPDIR=$(SRCDIR)/..
 
-TOPDIR=$(CDIR)/..
 
 FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o
 #FILES=system.o config.o plain_loader.o
@@ -38,13 +43,13 @@ all: $(TARGET)
 system.o: rmswitch.h
 
 rmswitch.h: bin_to_h.c rmswitch.S
-	$(CC) -o bin_to_h bin_to_h.c
-	$(AS) -o rmswitch.o rmswitch.S
+	$(CC) -o bin_to_h $(SRCDIR)/bin_to_h.c
+	$(AS) -o rmswitch.o $(SRCDIR)/rmswitch.S
 	$(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o
 	./bin_to_h <rmswitch >rmswitch.h
 
 $(TARGET): $(FILES)
-	$(LD) -r -o $@ $(FILES)
+	$(LD) $(LD3264) -r -o $@ $(FILES)
 
 clean:
 	$(RM) -f $(TARGET) $(FILES)