From 9f25faad5fe732e498942818dc45de78ce7f3766 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Tue, 17 Dec 2013 21:03:39 +0100 Subject: 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. --- Makefile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 -- cgit v1.2.3