HACK
[asbestos.git] / stage1 / Makefile
blobad8e67044dd914efdce5713d058535764a9ffe09
1 # Stage1 Makefile
3 # Copyright (C) 2010-2011 Hector Martin "marcan" <hector@marcansoft.com>
5 # This code is licensed to you under the terms of the GNU GPL, version 2;
6 # see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
8 include ../common/ppu.mak
9 LDFLAGS += -Wl,-T,stage1.ld
10 CFLAGS += -O2 -Wall
12 OBJS = start.o thunks.o usbdev.o
14 all: stage1.bin
16 %.bin: %.elf
17 $(PREFIX)objcopy -O binary $< $@
19 stage1.elf: $(OBJS) stage1.ld
20 $(PREFIX)gcc $(LDFLAGS) -o $@ $(OBJS)
22 %.o: %.S
23 $(PREFIX)gcc $(CFLAGS) -c -o $@ $<
25 %.o: %.c
26 $(PREFIX)gcc $(CFLAGS) -c -o $@ $<
28 clean:
29 rm -f *.o *.elf *.bin