~foura/uxn900

ref: d2a2bcc652c7280b4c71b0a0dd48e55199f5337e uxn900/Makefile -rw-r--r-- 753 bytes
d2a2bcc6james palmer misc: move include dir out of src 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.POSIX:
.PHONY: all clean nuke

CC      = arm-none-eabi-gcc
OBJCOPY = arm-none-eabi-objcopy
MKIMAGE = mkimage

CFLAGS = -Wall -pedantic -Og -g -mcpu=cortex-a8 -Iinc -nostdlib -ffreestanding
OFILES = \
	src/l.o \
	src/main.o \
	src/timer.o \
	src/uxn.o \
	src/bus/i2c.o \
	src/dev/console.o \
	src/dev/controller.o \
	src/dev/datetime.o \
	src/dev/nil.o \
	src/dev/screen.o \
	src/dev/system.o

all: uxnemu.uimage
uxnemu.uimage: $(OFILES)
	$(CC) $(CFLAGS) -T src/link.ld $(OFILES) -o uxnemu.elf -lgcc
	$(OBJCOPY) uxnemu.elf -O binary uxnemu.bin
	$(MKIMAGE) -A arm -T standalone -d uxnemu.bin -a 0x80200000 -n uxnemu -C none $@

clean:
	rm -f $(OFILES)

nuke: clean
	rm -f uxnemu.*	

.S.o:
	$(CC) $(CFLAGS) -c $< -o $@

.c.o:
	$(CC) $(CFLAGS) -c $< -o $@