summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-03-23 00:43:17 -0700
committerKeith Packard <keithp@keithp.com>2012-03-28 21:37:04 -0700
commitc27e211796a64b6bbacfe6a1516e9872fdb0853e (patch)
treedab59a4900d86c6cb196445b2086ab339fb05f13
parentd7ddfd4e6d75e50ca64a342181f5c52e9f4919af (diff)
Use new Makefile.defs in stm-demo
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--src/stm-demo/Makefile43
1 files changed, 6 insertions, 37 deletions
diff --git a/src/stm-demo/Makefile b/src/stm-demo/Makefile
index ecdf6b7f..f2e6618e 100644
--- a/src/stm-demo/Makefile
+++ b/src/stm-demo/Makefile
@@ -2,32 +2,16 @@
# AltOS build
#
#
-vpath % ..:../core:../product:../drivers:../stm
-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
-
-#PROGRAMMER=stk500v2 -P usb
-#PROGRAMMER=usbtiny
-#LOADCMD=avrdude
-#LOADARG=-p $(DUDECPUTYPE) -c $(PROGRAMMER) -e -U flash:w:
-CC=arm-none-eabi-gcc
-#OBJCOPY=avr-objcopy
-
-ifndef VERSION
-include ../Version
-endif
+
+include ../stm/Makefile.defs
INC = \
ao.h \
ao_arch.h \
ao_pins.h \
altitude.h \
- ao_kalman.h
+ ao_kalman.h \
+ ao_product.h
#
# Common AltOS sources
@@ -49,33 +33,20 @@ ALTOS_SRC = \
PRODUCT=StmDemo-v0.0
PRODUCT_DEF=-DSTM_DEMO
IDPRODUCT=0x000a
-CPU=cortex-m3
-CFLAGS = $(PRODUCT_DEF) -I. -I../stm -I../core -I..
-CFLAGS += -g -std=gnu99 -O0 -mlittle-endian -mcpu=cortex-m3 -mthumb -ffreestanding -nostdlib -I../stm $(CINC)
-NICKLE=nickle
+CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS)
PROG=stm-demo
SRC=$(ALTOS_SRC) ao_demo.c
OBJ=$(SRC:.c=.o)
-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)
-
all: $(PROG)
-CLIB=/home/keithp/sat/lib/pdclib.a
-CINC=-I/home/keithp/sat/include
LDFLAGS=-L../stm -Wl,-Taltos.ld
$(PROG): Makefile $(OBJ)
- $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(CLIB) -lgcc
+ $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(SAT_CLIB) -lgcc
../altitude.h: make-altitude
nickle $< > $@
@@ -97,5 +68,3 @@ clean:
install:
uninstall:
-
-$(OBJ): ao.h ao_product.h \ No newline at end of file