aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..5d7f370
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+NAME= libtrand.a
+CC= gcc
+SRC= trand.c
+OBJ= $(SRC:.c=.o)
+CFLAG= -c -Wextra -Werror
+
+DEF_THREAD=19
+
+all: $(NAME)
+
+$(NAME): $(OBJ)
+ ar -rc $(NAME) $(OBJ)
+
+%.o: %.c
+ $(CC) $(CFLAG) -D DEF_THREAD=$(DEF_THREAD) $?
+
+clean:
+ rm -f $(OBJ)
+fclean:
+ rm -f $(OBJ) $(NAME)
+
+re : fclean all
+