From: Olivier Matz Date: Sun, 19 Feb 2012 18:43:53 +0000 (+0100) Subject: xbee: add a standalone makefile X-Git-Url: http://git.droids-corp.org/?p=protos%2Fxbee.git;a=commitdiff_plain;h=ceeaa9c2a41b521ee3c4dbc3d96bb4bccc3d1964 xbee: add a standalone makefile this project is not in libcmdline framework anymore. Signed-off-by: Olivier Matz --- 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) +