Add ao_radio_xmit to help test boards without flashing them.
[fw/altos] / ao-bringup / Makefile
diff --git a/ao-bringup/Makefile b/ao-bringup/Makefile
new file mode 100644 (file)
index 0000000..805b255
--- /dev/null
@@ -0,0 +1,50 @@
+CC=sdcc
+DEBUG=--debug
+
+CFLAGS=--model-small --debug -I../src
+
+LDFLAGS=--out-fmt-ihx --code-loc 0xf000 --xram-loc 0xf400 --xram-size 1024 --iram-size 0xff
+
+INC = \
+       ao_bringup.h
+
+BRINGUP_SRC = ao_init.c
+
+BRINGUP_REL=$(BRINGUP_SRC:.c=.rel)
+
+XMIT_SRC = \
+       ao_radio_init.c \
+       ao_radio_xmit.c
+XMIT_REL=$(XMIT_SRC:.c=.rel) $(BRINGUP_REL)
+
+SRC=$(BRINGUP_SRC) $(XMIT_SRC)
+
+ADB=$(SRC:.c=.adb)
+ASM=$(SRC:.c=.asm)
+LNK=$(SRC:.c=.lnk)
+LST=$(SRC:.c=.lst)
+REL=$(SRC:.c=.rel)
+RST=$(SRC:.c=.rst)
+SYM=$(SRC:.c=.sym)
+
+PROGS=ao_radio_xmit.ihx
+
+PCDB=$(PROGS:.ihx=.cdb)
+PLNK=$(PROGS:.ihx=.lnk)
+PMAP=$(PROGS:.ihx=.map)
+PMEM=$(PROGS:.ihx=.mem)
+PAOM=$(PROGS:.ihx=)
+
+%.rel : %.c
+       $(CC) -c $(CFLAGS) -o$*.rel $<
+
+all: $(PROGS)
+
+ao_radio_xmit.ihx: $(XMIT_REL)
+       $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(XMIT_REL)
+
+clean:
+       rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
+       rm -f $(PROGS) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
+
+install: