forked from ajhc/demo-cortex-m3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (30 loc) · 1.04 KB
/
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
CC=arm-none-eabi-gcc
AR=arm-none-eabi-ar
###########################################
JHCRTS_SRC = src
vpath %.c $(JHCRTS_SRC)/rts
CFLAGS = -g -O -Wall
CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4 -march=armv7e-m
CFLAGS += -mfpu=fpv4-sp-d16 -mfloat-abi=hard
CFLAGS += -ffreestanding -nostdlib
CFLAGS += -I$(JHCRTS_SRC) -I.
CFLAGS += -std=gnu99
CFLAGS += -DNDEBUG -D_JHC_GC=_JHC_GC_JGC -D_JHC_STANDALONE=0
CFLAGS += -D_LITTLE_ENDIAN
CFLAGS += -D_JHC_ARM_STAY_IN_THUMB_MODE
CFLAGS += -D_JHC_JGC_STACKGROW=16 -D_JHC_JGC_LIMITED_NUM_MEGABLOCK=3
CFLAGS += -D_JHC_JGC_BLOCK_SHIFT=8 -D_JHC_JGC_MEGABLOCK_SHIFT=13
CFLAGS += -D_JHC_JGC_GC_STACK_SHIFT=8 -D_JHC_JGC_LIMITED_NUM_GC_STACK=2
CFLAGS += -D_JHC_JGC_NAIVEGC -D_JHC_JGC_SAVING_MALLOC_HEAP
CFLAGS += -D_JHC_CONC=_JHC_CONC_CUSTOM
SRCS = gc_jgc.c jhc_rts.c stableptr.c rts_support.c conc.c conc_custom.c
OBJS = $(SRCS:.c=.o)
.PHONY: libjhcrts.a
all: libjhcrts.a
%.o : %.c
$(CC) $(CFLAGS) -c -o $@ $^
libjhcrts.a: $(OBJS)
$(AR) -r $@ $(OBJS)
clean:
rm -f $(OBJS) libjhcrts.a
rm -rf $(JHCRTS_SRC)