add opensl to makefile

This commit is contained in:
Gregory 2019-04-06 18:04:46 +03:00
parent 0019ab2915
commit bb9bc8cba1
2 changed files with 17 additions and 6 deletions

View file

@ -51,6 +51,13 @@ LIBFT_INC := -I $(LIBFT_DIR)includes/
LIBFT_LIB := -lft -L $(LIBFT_DIR) LIBFT_LIB := -lft -L $(LIBFT_DIR)
LIBFT = $(LIBFT_DIR)libft.a 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 # project source files
MD5_SRC = ft_md5.c \ MD5_SRC = ft_md5.c \
@ -218,13 +225,14 @@ endif
# linking flags # linking flags
LINK_FLAGS = $(LIBFT_LIB) LINK_FLAGS = $(LIBFT_LIB) \
$(OPENSSL_LIB)
# header flags # header flags
HEADER_FLAGS = -I $(INC_DIR) \ HEADER_FLAGS = -I $(INC_DIR) \
$(MUINUT_INC) \ $(LIBFT_INC) \
$(LIBFT_INC) $(OPENSSL_INC)
# compiler # compiler
@ -232,10 +240,10 @@ CC := clang
# rules # rules
$(NAME): $(LIBFT) $(OBJ) $(NAME): $(OBJ)
$(CC) $(OBJ) $(LINK_FLAGS) -o $(NAME) $(CC) $(OBJ) $(LINK_FLAGS) -o $(NAME)
$(TEST_BIN): $(LIBFT) $(TEST_OBJ) $(TEST_BIN): $(TEST_OBJ)
$(CC) $(TEST_OBJ) $(LINK_FLAGS) -o $(TEST_BIN) $(CC) $(TEST_OBJ) $(LINK_FLAGS) -o $(TEST_BIN)
$(TEST_OBJ) $(OBJ): | $(OBJ_DIR) $(TEST_OBJ) $(OBJ): | $(OBJ_DIR)
@ -243,7 +251,7 @@ $(TEST_OBJ) $(OBJ): | $(OBJ_DIR)
$(OBJ_DIR): $(OBJ_DIR):
mkdir $(OBJ_DIR) mkdir $(OBJ_DIR)
$(OBJ_DIR)%.o: %.c $(HEADERS) $(OBJ_DIR)%.o: %.c $(LIBFT) $(HEADERS)
$(CC) -c $< -o $@ $(CC_FLAGS) $(HEADER_FLAGS) $(CC) -c $< -o $@ $(CC_FLAGS) $(HEADER_FLAGS)
$(LIBFT): $(LIBFT):

View file

@ -183,3 +183,6 @@ pod2htmd.tmp
# Windows manifest files # Windows manifest files
*.manifest *.manifest
doc-nits doc-nits
# build dir
/bld