aboutsummaryrefslogtreecommitdiff
path: root/projects/cli-test/Makefile
diff options
context:
space:
mode:
authorFredrik Thulin <fredrik@thulin.net>2016-05-13 12:52:38 +0200
committerFredrik Thulin <fredrik@thulin.net>2016-05-13 12:58:54 +0200
commitc670d7b194eea62d6fd6f9de0ae4025abe076ad4 (patch)
tree7a7411ea6cc794eadfc5156b4484a377bdf15d38 /projects/cli-test/Makefile
parentdb5b2075d6cf51a819c669ca48dc24cd578a625f (diff)
Add test program for libcli based CLI.
Diffstat (limited to 'projects/cli-test/Makefile')
-rw-r--r--projects/cli-test/Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/projects/cli-test/Makefile b/projects/cli-test/Makefile
new file mode 100644
index 0000000..1f1f890
--- /dev/null
+++ b/projects/cli-test/Makefile
@@ -0,0 +1,21 @@
+TEST = cli-test
+
+CFLAGS += -I$(LIBCLI_DIR)
+LIBS += $(LIBCLI_DIR)/libcli.a
+
+all: $(TEST:=.elf)
+
+%.elf: %.o $(BOARD_OBJS) $(LIBS)
+ $(CC) $(CFLAGS) $^ -o $@ -T$(LDSCRIPT) -g -Wl,-Map=$*.map
+ $(OBJCOPY) -O ihex $*.elf $*.hex
+ $(OBJCOPY) -O binary $*.elf $*.bin
+ $(OBJDUMP) -St $*.elf >$*.lst
+ $(SIZE) $*.elf
+
+clean:
+ rm -f *.o
+ rm -f *.elf
+ rm -f *.hex
+ rm -f *.bin
+ rm -f *.map
+ rm -f *.lst