projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d676022
)
Use i386-elf-* tools by default.
author
Ben Pfaff
<blp@cs.stanford.edu>
Mon, 13 Sep 2004 22:56:14 +0000
(22:56 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Mon, 13 Sep 2004 22:56:14 +0000
(22:56 +0000)
src/Makefile.build
patch
|
blob
|
history
diff --git
a/src/Makefile.build
b/src/Makefile.build
index 017267f688b14a356d5c8556ecae12956efd29c6..43273a7f54fa743e6e9cfca2d1b6e1141eb31c2c 100644
(file)
--- a/
src/Makefile.build
+++ b/
src/Makefile.build
@@
-4,7
+4,15
@@
include ../Makefile.vars
SHELL = /bin/sh
SHELL = /bin/sh
-CC = gcc
+# Utilities.
+# On a system where i386-elf is native (e.g. on an x86 GNU/Linux
+# machine) you want to set BINUTIL_PREFIX to expand to null, as shown
+# in the line that's commented out.
+BINUTIL_PREFIX = i386-elf-
+#BINUTIL_PREFIX =
+CC = $(BINUTIL_PREFIX)gcc
+LD = $(BINUTIL_PREFIX)ld
+OBJCOPY = $(BINUTIL_PREFIX)objcopy
VPATH = ../..
VPATH = ../..
@@
-75,10
+83,10
@@
threads/kernel.lds.s: CPPFLAGS += -P -C
threads/kernel.lds.s: threads/kernel.lds.S threads/loader.h
kernel.o: threads/kernel.lds.s $(OBJECTS)
threads/kernel.lds.s: threads/kernel.lds.S threads/loader.h
kernel.o: threads/kernel.lds.s $(OBJECTS)
-
ld
-T $< -o $@ $(OBJECTS) `$(CC) -print-libgcc-file-name`
+
$(LD)
-T $< -o $@ $(OBJECTS) `$(CC) -print-libgcc-file-name`
kernel.bin: kernel.o
kernel.bin: kernel.o
-
objcopy
-O binary -R .note -R .comment -S $< $@.tmp
+
$(OBJCOPY)
-O binary -R .note -R .comment -S $< $@.tmp
../../pad 4096 < $@.tmp > $@
rm $@.tmp
../../pad 4096 < $@.tmp > $@
rm $@.tmp
@@
-86,7
+94,7
@@
threads/loader.o: threads/loader.S kernel.bin
$(CC) -c $< -o $@ $(ASFLAGS) -DKERNEL_LOAD_PAGES=`perl -e 'print +(-s "kernel.bin") / 4096;'`
loader.bin: threads/loader.o
$(CC) -c $< -o $@ $(ASFLAGS) -DKERNEL_LOAD_PAGES=`perl -e 'print +(-s "kernel.bin") / 4096;'`
loader.bin: threads/loader.o
-
ld
-N -e start -Ttext 0x7c00 --oformat binary -o $@ $<
+
$(LD)
-N -e start -Ttext 0x7c00 --oformat binary -o $@ $<
os.dsk: loader.bin kernel.bin
cat $^ > $@
os.dsk: loader.bin kernel.bin
cat $^ > $@