xbee: add a standalone makefile
authorOlivier Matz <zer0@droids-corp.org>
Sun, 19 Feb 2012 18:43:53 +0000 (19:43 +0100)
committerOlivier Matz <zer0@droids-corp.org>
Sun, 19 Feb 2012 18:43:53 +0000 (19:43 +0100)
this project is not in libcmdline framework anymore.

Signed-off-by: Olivier Matz <zer0@droids-corp.org>
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..db19a75
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,60 @@
+CC        = $(CROSS)gcc
+AR        = $(CROSS)ar
+RANLIB    = $(CROSS)ranlib
+
+# XXX should be in a config.h of libcmdline
+# configuration for lib, not adviced to modify it except for
+# really small devices, because it changes the API.
+# CFLAGS += -DNO_RDLINE_HISTORY
+# CFLAGS += -DNO_RDLINE_KILL_BUF
+CFLAGS += -DCMDLINE_HAVE_FLOAT
+CFLAGS += -DCMDLINE_HAVE_SOCKET
+
+CFLAGS += -Wall -Werror
+CFLAGS += -O0 -g
+CFLAGS += $(EXTRA_CFLAGS)
+
+PROG = xbee
+
+LDFLAGS += $(EXTRA_LDFLAGS)
+
+LDLIBS = -levent -lcmdline
+
+SRCS  = commands.c
+SRCS += joystick.c
+SRCS += main.c
+SRCS += parse_atcmd.c
+SRCS += parse_monitor.c
+SRCS += parse_neighbor.c
+SRCS += rc_proto.c
+SRCS += xbee_atcmd.c
+SRCS += xbee_buf.c
+SRCS += xbee.c
+SRCS += xbee_neighbor.c
+SRCS += xbee_proto.c
+SRCS += xbee_stats.c
+
+OBJS := $(SRCS:%.c=%.o)
+DEPS := $(SRCS:%.c=%.d)
+
+all: $(PROG)
+
+-include $(DEPS)
+
+$(PROG): $(OBJS)
+       $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
+
+%.o: %.c
+       $(CC) -Wp,-MD,$(@:%.o=%.d) $(CFLAGS) -o $@ -c $<
+
+clean:
+       rm -f $(OBJS) $(DEPS) $(PROG)
+
+install:
+
+uninstall:
+
+.PHONY: all clean
+
+-include $(DEPS)
+