From bb9bc8cba1f88af3e0dcd84ea2d91db00bcd43ad Mon Sep 17 00:00:00 2001 From: Gregory Date: Sat, 6 Apr 2019 18:04:46 +0300 Subject: [PATCH] add opensl to makefile --- Makefile | 20 ++++++++++++++------ lib/openssl/.gitignore | 3 +++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 2d6bd560..a66bfe65 100644 --- a/Makefile +++ b/Makefile @@ -51,6 +51,13 @@ LIBFT_INC := -I $(LIBFT_DIR)includes/ LIBFT_LIB := -lft -L $(LIBFT_DIR) LIBFT = $(LIBFT_DIR)libft.a +OPENSSL_DIR := $(LIB_DIR)openssl/ +OPENSSL_BLD := $(OPENSSL_DIR)bld/ +OPENSSL_LIB := -lssl -lcrypto -L $(OPENSSL_BLD)lib/ +OPENSSL_INC := -I $(OPENSSL_BLD)include/ +OPENSSL_SSL := $(OPENSSL_BLD)lib/libssl.a +OPENSSL_CRY := $(OPENSSL_BLD)lib/libcrypto.a + # project source files MD5_SRC = ft_md5.c \ @@ -218,13 +225,14 @@ endif # linking flags -LINK_FLAGS = $(LIBFT_LIB) +LINK_FLAGS = $(LIBFT_LIB) \ + $(OPENSSL_LIB) # header flags HEADER_FLAGS = -I $(INC_DIR) \ - $(MUINUT_INC) \ - $(LIBFT_INC) + $(LIBFT_INC) \ + $(OPENSSL_INC) # compiler @@ -232,10 +240,10 @@ CC := clang # rules -$(NAME): $(LIBFT) $(OBJ) +$(NAME): $(OBJ) $(CC) $(OBJ) $(LINK_FLAGS) -o $(NAME) -$(TEST_BIN): $(LIBFT) $(TEST_OBJ) +$(TEST_BIN): $(TEST_OBJ) $(CC) $(TEST_OBJ) $(LINK_FLAGS) -o $(TEST_BIN) $(TEST_OBJ) $(OBJ): | $(OBJ_DIR) @@ -243,7 +251,7 @@ $(TEST_OBJ) $(OBJ): | $(OBJ_DIR) $(OBJ_DIR): mkdir $(OBJ_DIR) -$(OBJ_DIR)%.o: %.c $(HEADERS) +$(OBJ_DIR)%.o: %.c $(LIBFT) $(HEADERS) $(CC) -c $< -o $@ $(CC_FLAGS) $(HEADER_FLAGS) $(LIBFT): diff --git a/lib/openssl/.gitignore b/lib/openssl/.gitignore index 1b0f25cc..fff55988 100644 --- a/lib/openssl/.gitignore +++ b/lib/openssl/.gitignore @@ -183,3 +183,6 @@ pod2htmd.tmp # Windows manifest files *.manifest doc-nits + +# build dir +/bld