3 # 10.2 Catalogue of Built-In Rules
4 # ================================
7 # 'N.o' is made automatically from 'N.c' with a recipe of the form
8 # '$(CC) $(CPPFLAGS) $(CFLAGS) -c'.
10 # Assembling and preprocessing assembler programs
11 # 'N.o' is made automatically from 'N.s' by running the assembler,
12 # 'as'. The precise recipe is '$(AS) $(ASFLAGS)'.
14 # 'N.s' is made automatically from 'N.S' by running the C
15 # preprocessor, 'cpp'. The precise recipe is '$(CPP) $(CPPFLAGS)'.
18 CPP := arm-none-eabi-cpp
22 AS := arm-none-eabi-as
26 CC := arm-none-eabi-gcc
27 CFLAGS := -march=armv7e-m+fp \
33 -fsingle-precision-constant \
45 LD := arm-none-eabi-ld
50 OC := arm-none-eabi-objcopy
51 OCFLAGS := --output-target=binary
65 rm -f $(bin) $(elf) $(objs)
70 $(OC) $(OCFLAGS) $< $@
72 $(elf) : $(objs) $(lds)
73 $(LD) $(filter %.o,$^) $(LDFLAGS) $(LDLIBS) -o $@