summaryrefslogtreecommitdiff
path: root/src/megametrum-v0.1/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/megametrum-v0.1/Makefile')
-rw-r--r--src/megametrum-v0.1/Makefile70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/megametrum-v0.1/Makefile b/src/megametrum-v0.1/Makefile
new file mode 100644
index 00000000..4f5e9244
--- /dev/null
+++ b/src/megametrum-v0.1/Makefile
@@ -0,0 +1,70 @@
+#
+# AltOS build
+#
+#
+
+include ../stm/Makefile.defs
+
+INC = \
+ ao.h \
+ ao_arch.h \
+ ao_pins.h \
+ altitude.h \
+ ao_kalman.h \
+ ao_product.h
+
+#
+# Common AltOS sources
+#
+ALTOS_SRC = \
+ ao_interrupt.c \
+ ao_product.c \
+ ao_romconfig.c \
+ ao_cmd.c \
+ ao_task.c \
+ ao_led.c \
+ ao_stdio.c \
+ ao_panic.c \
+ ao_timer.c \
+ ao_mutex.c \
+ ao_serial_stm.c \
+ ao_gps_skytraq.c
+
+PRODUCT=MegaMetrum-v0.1
+PRODUCT_DEF=-DMEGAMETRUM
+IDPRODUCT=0x000a
+
+CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS)
+
+PROG=megametrum-v0.1
+
+SRC=$(ALTOS_SRC) ao_megametrum.c
+OBJ=$(SRC:.c=.o)
+
+all: $(PROG)
+
+LDFLAGS=-L../stm -Wl,-Taltos.ld
+
+$(PROG): Makefile $(OBJ)
+ $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(SAT_CLIB) -lgcc
+
+../altitude.h: make-altitude
+ nickle $< > $@
+
+$(OBJ): $(INC)
+
+ao_product.h: ao-make-product.5c ../Version
+ $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
+
+ao_product.rel: ao_product.c ao_product.h
+ $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<
+
+distclean: clean
+
+clean:
+ rm -f $(OBJ)
+ rm -f ao_product.h
+
+install:
+
+uninstall: