From ceeaa9c2a41b521ee3c4dbc3d96bb4bccc3d1964 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Sun, 19 Feb 2012 19:43:53 +0100 Subject: [PATCH] xbee: add a standalone makefile this project is not in libcmdline framework anymore. Signed-off-by: Olivier Matz --- Makefile | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 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) + -- 2.39.5