summarylogtreecommitdiffstats
path: root/libarmavlink-Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'libarmavlink-Makefile')
-rw-r--r--libarmavlink-Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/libarmavlink-Makefile b/libarmavlink-Makefile
new file mode 100644
index 000000000000..c0d514104599
--- /dev/null
+++ b/libarmavlink-Makefile
@@ -0,0 +1,28 @@
+CC = gcc
+CFLAGS = -fPIC -Wall -Wextra -O2 -g -IIncludes -Igenerated -DHAVE_CONFIG_H
+LDFLAGS = -shared
+RM = rm -f
+TARGET_LIB = libarmavlink.so
+
+SRCS = Sources/ARMAVLINK_FileGenerator.c \
+ Sources/ARMAVLINK_FileParser.c \
+ Sources/ARMAVLINK_ListUtils.c \
+ Sources/ARMAVLINK_Manager.c \
+ Sources/ARMAVLINK_MissionItemUtils.c \
+ gen/Sources/ARMAVLINK_Error.c
+OBJS = $(SRCS:.c=.o)
+
+.PHONY: all
+all: ${TARGET_LIB}
+
+$(TARGET_LIB): $(OBJS)
+ $(CC) ${LDFLAGS} -o $@ $^
+
+$(SRCS:.c=.d):%.d:%.c
+ $(CC) $(CFLAGS) -MM $< >$@
+
+include $(SRCS:.c=.d)
+
+.PHONY: clean
+clean:
+ -${RM} ${TARGET_LIB} ${OBJS} $(SRCS:.c=.d)