Rev 534 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
455 | decky | 1 | .PHONY: build clean |
162 | decky | 2 | |
455 | decky | 3 | CFLAGS = -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -I../include |
881 | decky | 4 | DEFS = -DKERNEL_LOAD_ADDRESS=0x800000 -DKERNEL_SIZE=40960 |
1 | jermar | 5 | |
881 | decky | 6 | SOURCES = \ |
7 | main.c \ |
||
8 | ofw.c \ |
||
9 | printf.c \ |
||
10 | boot.S |
||
11 | |||
12 | OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
||
13 | |||
1 | jermar | 14 | build: boot.bin |
376 | jermar | 15 | cp boot.bin ../../../load.bin |
1 | jermar | 16 | |
881 | decky | 17 | boot.bin: $(OBJECTS) |
18 | $(LD) -no-check-sections -N -T _link.ld $(OBJECTS) -o $@ |
||
1 | jermar | 19 | |
881 | decky | 20 | %.o: %.S |
21 | $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
||
1 | jermar | 22 | |
881 | decky | 23 | %.o: %.c |
24 | $(CC) $(DEFS) $(CFLAGS) -c $< -o $@ |
||
210 | decky | 25 | |
1 | jermar | 26 | clean: |
881 | decky | 27 | -rm -f $(OBJECTS) boot.bin ../../../load.bin |