~foura/uxn900

ref: 01584dc45ac5efb9e54fb6231a21bdd4fdf2e65c uxn900/Makefile -rw-r--r-- 731 bytes
01584dc4james palmer controller: use volume keys as a and b buttons. 6 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
.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 -Isrc/inc -nostdlib -ffreestanding
OFILES = \
	src/i2c.o \
	src/l.o \
	src/main.o \
	src/timer.o \
	src/uxn.o \
	src/dev/console.o \
	src/dev/controller.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 $@