1 vpath % $(TOPDIR)/stm:$(TOPDIR)/product:$(TOPDIR)/drivers:$(TOPDIR)/core:$(TOPDIR)/util:$(TOPDIR)
2 vpath ao-make-product.5c $(TOPDIR)/util
7 objcopy -O ihex $*.elf $@
9 CC=/opt/cortex/bin/arm-none-eabi-gcc
11 SAT_CLIB=$(SAT)/lib/pdclib-cortex-m3.a
12 SAT_CFLAGS=-I$(SAT)/include
15 include $(TOPDIR)/Version
18 AO_CFLAGS=-I. -I$(TOPDIR)/stm -I$(TOPDIR)/core -I$(TOPDIR)/drivers -I$(TOPDIR)/product -I$(TOPDIR)
19 STM_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m3 -mthumb -ffreestanding -nostdlib $(AO_CFLAGS) $(SAT_CFLAGS)
21 LDFLAGS=-L$(TOPDIR)/stm -Wl,-Taltos-loader.ld
26 # The user has explicitly enabled quiet compilation.
28 quiet = @printf " $1 $2 $@\n"; $($1)
30 # Otherwise, print the full command line.
34 $(call quiet,CC) -c $(CFLAGS) -o $@ $<
48 # Common AltOS sources
65 PRODUCT=AltosFlash-$(VERSION)
66 PRODUCT_DEF=-DALTOS_FLASH
69 CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) -g -Os
72 PROG=$(HARDWARE)-$(PROGNAME)-$(VERSION).elf
74 $(PROG): Makefile $(OBJ) altos-loader.ld
75 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(SAT_CLIB) -lgcc
77 ao_product.h: ao-make-product.5c $(TOPDIR)/Version
78 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@