summaryrefslogtreecommitdiff
path: root/src/lpc/Makefile-lpc.defs
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2019-02-18 12:59:05 -0800
committerKeith Packard <keithp@keithp.com>2019-02-18 13:08:23 -0800
commit7a89aa1ea7e1b02b5cd310986adf4239ec0ce91d (patch)
tree74e5fe54f95ab21e513a1c9a14b8a02c1c8cffea /src/lpc/Makefile-lpc.defs
parent889518aeee080b0f8bb954db86d08105898d8161 (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/lpc/Makefile-lpc.defs')
-rw-r--r--src/lpc/Makefile-lpc.defs52
1 files changed, 4 insertions, 48 deletions
diff --git a/src/lpc/Makefile-lpc.defs b/src/lpc/Makefile-lpc.defs
index 16da583f..8b297351 100644
--- a/src/lpc/Makefile-lpc.defs
+++ b/src/lpc/Makefile-lpc.defs
@@ -2,57 +2,13 @@ ifndef TOPDIR
TOPDIR=..
endif
-include $(TOPDIR)/Makedefs
+include $(TOPDIR)/Makefile.defs
-vpath % $(TOPDIR)/lpc:$(TOPDIR)/product:$(TOPDIR)/drivers:$(TOPDIR)/kernel:$(TOPDIR)/util:$(TOPDIR)/kalman:$(TOPDIR)/aes:$(TOPDIR):$(TOPDIR)/math
-vpath make-altitude $(TOPDIR)/util
-vpath make-kalman $(TOPDIR)/util
-vpath kalman.5c $(TOPDIR)/kalman
-vpath kalman_filter.5c $(TOPDIR)/kalman
-vpath load_csv.5c $(TOPDIR)/kalman
-vpath matrix.5c $(TOPDIR)/kalman
-vpath ao-make-product.5c $(TOPDIR)/util
+vpath % $(TOPDIR)/lpc:$(AO_VPATH)
-.SUFFIXES: .elf .ihx
-
-.elf.ihx:
- $(ELFTOHEX) --output=$@ $*.elf
-
-
-ifndef VERSION
-include $(TOPDIR)/Version
-endif
-
-ELFTOHEX=$(TOPDIR)/../ao-tools/ao-elftohex/ao-elftohex
CC=$(ARM_CC)
-WARN_FLAGS=-Wall -Wextra -Werror -Wcast-align \
- -Wpointer-arith \
- -Wstrict-prototypes \
- -Wmissing-prototypes \
- -Wmissing-declarations \
- -Wnested-externs \
- -Wshadow
-
-AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/kernel -I$(TOPDIR)/drivers \
- -DNEWLIB_INTEGER_PRINTF_SCANF \
- -I$(TOPDIR)/product -I$(TOPDIR) -I$(TOPDIR)/math -I$(TOPDIR) \
- -isystem $(NEWLIB_NANO)/arm-none-eabi/include
-
-LPC_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m0 -mthumb\
- -ffreestanding -nostdlib $(AO_CFLAGS) $(WARN_FLAGS)
-
-NICKLE=nickle
-
LIBS=-L$(NEWLIB_NANO)/arm-none-eabi/lib/thumb/v6-m -lc -lm -lgcc
-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)
-
-.c.o:
- $(call quiet,CC) -c $(CFLAGS) -o $@ $<
+LPC_CFLAGS=-mlittle-endian -mcpu=cortex-m0 -mthumb\
+ -I$(TOPDIR)/lpc $(AO_CFLAGS) $(NEWLIB_CFLAGS)