Subversion Repositories HelenOS-historic

Rev

Rev 342 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
162 decky 1
PPC_BINUTILS_DIR=/usr/local/ppc/bin
2
PPC_TARGET=ppc-linux-gnu
3
 
1 jermar 4
.PHONY: nothing build
5
 
6
nothing:
7
 
8
build: boot.bin
376 jermar 9
	cp boot.bin ../../../load.bin
1 jermar 10
 
210 decky 11
CC=$(PPC_BINUTILS_DIR)/$(PPC_TARGET)-gcc
162 decky 12
AS=$(PPC_BINUTILS_DIR)/$(PPC_TARGET)-as
13
LD=$(PPC_BINUTILS_DIR)/$(PPC_TARGET)-ld
1 jermar 14
 
210 decky 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
1 jermar 18
 
210 decky 19
boot.bin: boot.o main.o
20
	$(LD) $(LFLAGS) boot.o main.o -o $@
1 jermar 21
 
210 decky 22
boot.o: boot.S
23
	$(CC) $(CFLAGS) -c boot.S -o $@
1 jermar 24
 
210 decky 25
main.o: main.c
26
	$(CC) $(CFLAGS) -c main.c -o $@
27
 
1 jermar 28
clean:
29
	-rm *.o *.bin