summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2013-12-17 21:03:39 +0100
committerOlivier Gayot <duskcoder@gmail.com>2014-01-18 13:43:46 +0100
commit9f25faad5fe732e498942818dc45de78ce7f3766 (patch)
treeab8a1c13ed05c02a732601d13b1f95b5f2c4e791 /Makefile
parent6d88b62a73c7c4985d07317e3fe00f84743c4700 (diff)
rb: add a first version of the library
first working version of the library. the binary stuff is included. we can write to and read from a ring buffer.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..62eefa6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,34 @@
+CC ?= gcc
+CFLAGS += -W -Wall -std=c99 -Wextra
+CFLAGS += -I./
+CFLAGS += -D _GNU_SOURCE
+NAME = librb.a
+SRC = src/rb.c
+
+AR = ar rc
+
+all: depend $(NAME)
+
+depend: .depend
+
+.depend: $(SRC)
+ @$(RM) .depend
+ @$(CC) $(CFLAGS) -MM $^ > .depend
+
+include .depend
+
+OBJ = $(SRC:.c=.o)
+
+$(NAME): $(OBJ)
+ $(AR) $(NAME) $(OBJ)
+ ranlib $(NAME)
+
+clean:
+ $(RM) $(OBJ)
+
+fclean: clean
+ $(RM) $(NAME)
+
+re: fclean all
+
+.PHONY: all depend clean fclean all re