lfn
serial
ticket/834-toolchain-update
topic/fix-logger-deadlock
topic/msim-upgrade
topic/simplify-dev-export
|
Last change
on this file since c9ed176 was c9ed176, checked in by Jakub Jermar <jakub@…>, 21 years ago |
|
Move kernel build files one level up the directory tree.
Fix paths in your testing environment!
|
-
Property mode
set to
100644
|
|
File size:
642 bytes
|
| Line | |
|---|
| 1 | PPC_BINUTILS_DIR=/usr/local/ppc/bin
|
|---|
| 2 | PPC_TARGET=ppc-linux-gnu
|
|---|
| 3 |
|
|---|
| 4 | .PHONY: nothing build
|
|---|
| 5 |
|
|---|
| 6 | nothing:
|
|---|
| 7 |
|
|---|
| 8 | build: boot.bin
|
|---|
| 9 | cp boot.bin ../../../load.bin
|
|---|
| 10 |
|
|---|
| 11 | CC=$(PPC_BINUTILS_DIR)/$(PPC_TARGET)-gcc
|
|---|
| 12 | AS=$(PPC_BINUTILS_DIR)/$(PPC_TARGET)-as
|
|---|
| 13 | LD=$(PPC_BINUTILS_DIR)/$(PPC_TARGET)-ld
|
|---|
| 14 |
|
|---|
| 15 | CPPFLAGS=$(DEFS) -nostdinc -I../include
|
|---|
| 16 | CFLAGS=$(CPPFLAGS) -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O2
|
|---|
| 17 | LFLAGS=-no-check-sections -N -T _link.ld
|
|---|
| 18 |
|
|---|
| 19 | boot.bin: boot.o main.o
|
|---|
| 20 | $(LD) $(LFLAGS) boot.o main.o -o $@
|
|---|
| 21 |
|
|---|
| 22 | boot.o: boot.S
|
|---|
| 23 | $(CC) $(CFLAGS) -c boot.S -o $@
|
|---|
| 24 |
|
|---|
| 25 | main.o: main.c
|
|---|
| 26 | $(CC) $(CFLAGS) -c main.c -o $@
|
|---|
| 27 |
|
|---|
| 28 | clean:
|
|---|
| 29 | -rm *.o *.bin
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.