1 diff --git a/Makefile b/Makefile
2 index f0efebd..9d82cbf 100644
15 +include $(SRCDIR)/Make.defaults
19 CRTOBJS = $(EFICRT0)/crt0-efi-$(ARCH).o
20 LDSCRIPT = $(EFICRT0)/elf_$(ARCH)_efi.lds
22 LDFLAGS += -T $(LDSCRIPT) -shared -Bsymbolic -L$(EFILIB) -L$(GNUEFILIB) $(CRTOBJS)
23 -LOADLIBES = -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name)
24 +LOADLIBES = -lefi -lgnuefi $(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
25 FORMAT = efi-app-$(ARCH)
28 @@ -87,7 +91,8 @@ fileops.o : Make.defaults
29 chooser.o : Make.defaults
34 + $(MAKE) -C $@ -f $(SRCDIR)/../$@/Makefile SRCDIR=$(SRCDIR)/../$@ ARCH=$(ARCH)
38 @@ -106,4 +111,4 @@ ifeq ($(GCC_VERSION),2)
43 +include $(SRCDIR)/Make.rules
44 diff --git a/choosers/Makefile b/choosers/Makefile
45 index 9915f48..85d31c7 100644
46 --- a/choosers/Makefile
47 +++ b/choosers/Makefile
49 # to use this program.
52 -include ../Make.defaults
53 -include ../Make.rules
58 +include $(SRCDIR)/../Make.defaults
59 +include $(SRCDIR)/../Make.rules
67 @@ -47,7 +52,8 @@ $(TARGET): $(TOPDIR)/Make.defaults $(FILES)
68 echo "You need to define at least one chooser in Make.defaults"; \
71 - $(LD) -o $@ -r $(FILES)
72 + $(LD) $(LD3264) -o $@ -r $(FILES)
76 $(RM) -f $(TARGET) $(FILES)
77 diff --git a/devschemes/Makefile b/devschemes/Makefile
78 index 6ac05af..5328cb1 100644
79 --- a/devschemes/Makefile
80 +++ b/devschemes/Makefile
82 # to use this program.
85 -include ../Make.defaults
86 -include ../Make.rules
91 +include $(SRCDIR)/../Make.defaults
92 +include $(SRCDIR)/../Make.rules
100 @@ -40,7 +45,7 @@ all: $(TARGET)
101 # without doing make clean.
104 - $(LD) -r -o $@ $(FILES)
105 + $(LD) $(LD3264) -r -o $@ $(FILES)
108 $(RM) -f $(TARGET) $(FILES)
109 diff --git a/fs/Makefile b/fs/Makefile
110 index 8e422b2..0bb303f 100644
114 # to use this program.
117 -include ../Make.defaults
118 -include ../Make.rules
123 +include $(SRCDIR)/../Make.defaults
124 +include $(SRCDIR)/../Make.rules
131 ifeq ($(CONFIG_localfs),y)
132 @@ -59,7 +64,7 @@ $(TARGET): $(TOPDIR)/Make.defaults $(FILES)
133 echo "You need to define at least one filesystem in Make.defaults"; \
136 - $(LD) -r -o $@ $(FILES)
137 + $(LD) $(LD3264) -r -o $@ $(FILES)
140 $(RM) -f $(TARGET) $(FILES)
141 diff --git a/ia32/Makefile b/ia32/Makefile
142 index 353ae67..c5f421b 100644
146 # to use this program.
149 -include ../Make.defaults
150 -include ../Make.rules
155 +include $(SRCDIR)/../Make.defaults
156 +include $(SRCDIR)/../Make.rules
162 FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o
164 @@ -37,13 +42,13 @@ all: $(TARGET)
167 rmswitch.h: bin_to_h.c rmswitch.S
168 - $(CC) -o bin_to_h bin_to_h.c
169 - $(AS) -o rmswitch.o rmswitch.S
170 + $(CC) -o bin_to_h $(SRCDIR)/bin_to_h.c
171 + $(AS) -o rmswitch.o $(SRCDIR)/rmswitch.S
172 $(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o
173 ./bin_to_h <rmswitch >rmswitch.h
176 - $(LD) -r -o $@ $(FILES)
177 + $(LD) $(LD3264) -r -o $@ $(FILES)
180 $(RM) -f $(TARGET) $(FILES)
181 diff --git a/ia64/Makefile b/ia64/Makefile
182 index a243d0f..bee0a2b 100644
186 # to use this program.
189 -include ../Make.defaults
190 -include ../Make.rules
195 +include $(SRCDIR)/../Make.defaults
196 +include $(SRCDIR)/../Make.rules
202 FILES=system.o config.o fpswa.o plain_loader.o gzip_loader.o \
203 gzip.o memset.o memcpy.o setjmp.o longjmp.o
204 diff --git a/tools/Makefile b/tools/Makefile
205 index 8858224..97083d7 100644
209 # to use this program.
212 -include ../Make.defaults
213 -include ../Make.rules
218 +include $(SRCDIR)/../Make.defaults
219 +include $(SRCDIR)/../Make.rules
227 diff --git a/x86_64/Makefile b/x86_64/Makefile
228 index 4af4b8d..7ade312 100644
229 --- a/x86_64/Makefile
230 +++ b/x86_64/Makefile
232 # to use this program.
235 -include ../Make.defaults
236 -include ../Make.rules
241 +include $(SRCDIR)/../Make.defaults
242 +include $(SRCDIR)/../Make.rules
248 FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o
249 #FILES=system.o config.o plain_loader.o
250 @@ -38,13 +43,13 @@ all: $(TARGET)
253 rmswitch.h: bin_to_h.c rmswitch.S
254 - $(CC) -o bin_to_h bin_to_h.c
255 - $(AS) -o rmswitch.o rmswitch.S
256 + $(CC) -o bin_to_h $(SRCDIR)/bin_to_h.c
257 + $(AS) -o rmswitch.o $(SRCDIR)/rmswitch.S
258 $(LD) -Ttext 0x0 -s --oformat binary -o rmswitch rmswitch.o
259 ./bin_to_h <rmswitch >rmswitch.h
262 - $(LD) -r -o $@ $(FILES)
263 + $(LD) $(LD3264) -r -o $@ $(FILES)
266 $(RM) -f $(TARGET) $(FILES)