aboutsummaryrefslogtreecommitdiff
path: root/vendor/libftm/Makefile
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-05-09 21:31:30 +0200
committerCharles <sircharlesaze@gmail.com>2020-05-09 21:33:14 +0200
commit0ae5be6c6697f5f5f578a27c5ad9ba845aec43c9 (patch)
tree4cda3590f185cb485bf57e2dbd3d9b8b81dba6d7 /vendor/libftm/Makefile
parent6618fed5933f26d9bee8a42f049115146d4a1113 (diff)
downloadscop-0ae5be6c6697f5f5f578a27c5ad9ba845aec43c9.tar.gz
scop-0ae5be6c6697f5f5f578a27c5ad9ba845aec43c9.tar.bz2
scop-0ae5be6c6697f5f5f578a27c5ad9ba845aec43c9.zip
Added basic vector and matrix library
Diffstat (limited to 'vendor/libftm/Makefile')
-rw-r--r--vendor/libftm/Makefile49
1 files changed, 49 insertions, 0 deletions
diff --git a/vendor/libftm/Makefile b/vendor/libftm/Makefile
new file mode 100644
index 0000000..2348458
--- /dev/null
+++ b/vendor/libftm/Makefile
@@ -0,0 +1,49 @@
+# **************************************************************************** #
+# #
+# ::: :::::::: #
+# Makefile :+: :+: :+: #
+# +:+ +:+ +:+ #
+# By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ #
+# +#+#+#+#+#+ +#+ #
+# Created: 2020/05/09 20:44:53 by charles #+# #+# #
+# Updated: 2020/05/09 21:20:08 by charles ### ########.fr #
+# #
+# **************************************************************************** #
+
+LIB = ar rcs
+RM = rm -f
+
+SRC_DIR = src
+INC_DIR = inc
+OBJ_DIR = obj
+
+CC = gcc
+OFLAG ?= -O0
+CCFLAGS = $(OFLAG) -I$(INC_DIR) -Wall -Wextra -Werror
+
+NAME = libft.a
+
+SRC = $(shell find $(SRC_DIR) -type f -name '*.c')
+INC = $(shell find $(INC_DIR) -type f -name '*.h')
+OBJ = $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
+
+OBJ_SUB_DIR = $(shell find $(SRC_DIR) -type d | sed 's/$(SRC_DIR)/$(OBJ_DIR)/')
+
+all: prebuild $(NAME)
+
+prebuild:
+ mkdir -p $(OBJ_DIR) $(OBJ_SUB_DIR)
+
+$(NAME): $(OBJ) $(INC)
+ $(LIB) $@ $(OBJ)
+
+$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
+ $(CC) $(CCFLAGS) -c -o $@ $<
+
+clean:
+ $(RM) $(OBJ)
+
+fclean: clean
+ $(RM) $(NAME)
+
+re: fclean all