diff options
| author | Keith Packard <keithp@keithp.com> | 2019-02-18 12:59:05 -0800 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2019-02-18 13:08:23 -0800 |
| commit | 7a89aa1ea7e1b02b5cd310986adf4239ec0ce91d (patch) | |
| tree | 74e5fe54f95ab21e513a1c9a14b8a02c1c8cffea /src/stm/Makefile.defs | |
| parent | 889518aeee080b0f8bb954db86d08105898d8161 (diff) | |
altos: Move common build definitions to src/Makefile.defs
This cleans up the build process for all architectures, providing a
common place to specify vpath, cflags and build rules for various
common files.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/Makefile.defs')
| -rw-r--r-- | src/stm/Makefile.defs | 53 |
1 files changed, 2 insertions, 51 deletions
diff --git a/src/stm/Makefile.defs b/src/stm/Makefile.defs index 2db534c2..26ba5824 100644 --- a/src/stm/Makefile.defs +++ b/src/stm/Makefile.defs @@ -1,56 +1,7 @@ -vpath % ../stm:../product:../drivers:../kernel:../util:../kalman:../aes:../math:../draw:../scheme:.. -vpath make-altitude ../util -vpath make-kalman ../util -vpath kalman.5c ../kalman -vpath kalman_filter.5c ../kalman -vpath load_csv.5c ../kalman -vpath matrix.5c ../kalman -vpath ao-make-product.5c ../util - -.SUFFIXES: .elf .ihx - -.elf.ihx: - $(ELFTOHEX) --output=$@ $*.elf - ifndef TOPDIR TOPDIR=.. endif -ifndef VERSION -include $(TOPDIR)/Version -endif -include $(TOPDIR)/Makedefs - -CC=$(ARM_CC) -LIBS=-L$(NEWLIB_NANO)/arm-none-eabi/lib/thumb/v7-m -lm -lc -lgcc - -WARN_FLAGS=-Wall -Wextra -Werror -Wcast-align \ - -Wpointer-arith \ - -Wstrict-prototypes \ - -Wmissing-prototypes \ - -Wmissing-declarations \ - -Wnested-externs \ - -Wshadow - -AO_CFLAGS=-I. -I../stm -I../kernel -I../drivers -I../math -I../draw \ - -DNEWLIB_INTEGER_PRINTF_SCANF \ - -I../lisp -I.. -isystem $(NEWLIB_NANO)/arm-none-eabi/include - -STM_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m3 -mthumb -Wcast-align \ - -ffreestanding -nostdlib $(AO_CFLAGS) $(WARN_FLAGS) - -LDFLAGS=-L../stm -Wl,-Taltos.ld -nostartfiles -Wl,-Map=$(PROGNAME).map - -NICKLE=nickle -ELFTOHEX=$(TOPDIR)/../ao-tools/ao-elftohex/ao-elftohex - -V=0 -# The user has explicitly enabled quiet compilation. -ifeq ($(V),0) -quiet = @printf " $1 $2 $@\n"; $($1) -endif -# Otherwise, print the full command line. -quiet ?= $($1) +include $(TOPDIR)/stm/Makefile-stm.defs -.c.o: - $(call quiet,CC) -c $(CFLAGS) -o $@ $< +LDFLAGS=$(CFLAGS) -L$(TOPDIR)/stm -Wl,-Taltos.ld -n |
