forked from M2IHP13-admin/JonesForth-arm
-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathMakefile
41 lines (32 loc) · 879 Bytes
/
Makefile
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
39
40
41
#
# Makefile for pijFORTHos -- Raspberry Pi JonesFORTH Operating System
#
AS= $(CROSS)as
CC= $(CROSS)gcc -g -Wall -O2 -nostdlib -nostartfiles -ffreestanding
LD= $(CROSS)ld
OBJDUMP = $(CROSS)objdump
OBJCOPY = $(CROSS)objcopy
KOBJS= start.o jonesforth.o raspberry.o timer.o serial.o xmodem.o
all: kernel.img
start.o: start.s
$(AS) start.s -o start.o
jonesforth.o: jonesforth.s
$(AS) jonesforth.s -o jonesforth.o
#raspberry.o: raspberry.c
# $(CC) -c raspberry.c -o raspberry.o
kernel.img: loadmap $(KOBJS)
$(LD) $(KOBJS) -T loadmap -o pijFORTHos.elf
$(OBJDUMP) -D pijFORTHos.elf > pijFORTHos.list
$(OBJCOPY) pijFORTHos.elf -O ihex pijFORTHos.hex
$(OBJCOPY) --only-keep-debug pijFORTHos.elf kernel.sym
$(OBJCOPY) pijFORTHos.elf -O binary kernel.img
.c.o:
$(CC) -c $<
clean:
rm -f *.o
rm -f *.bin
rm -f *.hex
rm -f *.elf
rm -f *.list
rm -f *.img
rm -f *~ core