--- /dev/null
+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)
+