Subversion Repositories HelenOS

Rev

Rev 1962 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
420 jermar 1
BINUTILS_DIR=/usr/local/sparc64/bin
2
TARGET=sparc64-linux-gnu
418 jermar 3
 
420 jermar 4
.PHONY: nothing build
5
 
418 jermar 6
nothing:
7
 
420 jermar 8
build: boot.bin
9
	cp boot.bin ../../../load.bin
418 jermar 10
 
420 jermar 11
CC=$(BINUTILS_DIR)/$(TARGET)-gcc
12
AS=$(BINUTILS_DIR)/$(TARGET)-as
13
LD=$(BINUTILS_DIR)/$(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 -s
18
 
19
boot.bin: boot.aout
20
	dd if=/dev/zero of=$@ bs=512 count=16
21
	dd if=boot.aout of=$@ bs=512 seek=1 conv=notrunc
22
 
23
boot.aout: boot.o
24
	$(LD) $(LFLAGS) boot.o -o $@
25
 
26
boot.o: boot.S
27
	$(CC) $(CFLAGS) -c boot.S -o $@
28
 
418 jermar 29
clean:
420 jermar 30
	-rm *.o *.bin *.aout