3 CFLAGS = -Wall -I/usr/src/linux/include
10 CROSS_OBJCOPY = $(ARCH)-objcopy
11 CROSS_OPTS = -mcpu=arm7tdmi-s
12 CROSS_CFLAGS = $(CROSS_OPTS) -Wall -Os
13 CROSS_ASLAGS = $(CROSS_OPTS) --gstabs
14 CROSS_RAM_LDFLAGS = -Tlpc2220_ram.ld -nostartfiles -nostdlib
15 CROSS_ROM_LDFLAGS = -Tlpc2220_rom.ld -nostartfiles -nostdlib
18 HOST_TARGET = lpcload fwdump font2b
19 CROSS_TARGET = fwbc.hex fwflash.hex betty.hex
22 BETTY_DEPS = system.o uart.o buttons.o spi.o display.o flash.o functions.o
23 BETTY_DEPS += interrupts.o #pffs.o
26 all: $(HOST_TARGET) $(CROSS_TARGET)
30 ln -sfv ../../api/bmp/bmp.{c,h} .
35 $(CC) -c $(CFLAGS) -o $@ $<
40 arm: arm_clean $(CROSS_TARGET)
44 $(CROSS_CC) -c $(CROSS_CFLAGS) -o $@ $<
48 $(CROSS_AS) $(CROSS_ASLAGS) -o $@ $<
51 %.elf: %.o startup.o interrupts.o
52 $(CROSS_LD) $(CROSS_RAM_LDFLAGS) startup.o interrupts.o -o $@ $<
55 betty.elf: betty.o startup.o $(BETTY_DEPS)
56 #$(CROSS_LD) $(CROSS_ROM_LDFLAGS) startup.o $(BETTY_DEPS) -o $@ $<
57 $(CROSS_LD) $(CROSS_RAM_LDFLAGS) startup.o $(BETTY_DEPS) -o $@ $<
61 $(CROSS_OBJCOPY) -O ihex $< $@
69 rm -vf *.o *.hex *.elf