fpic object files

This commit is contained in:
Gregory 2019-04-24 21:03:47 +03:00
parent b00d4f01cc
commit d74a637ebb

View file

@ -118,7 +118,7 @@ CC := clang
# rules # rules
$(NAME): $(OBJ) $(NAME): $(OBJ)
$(CC) -shared -fpic $(OBJ) -o $(NAME) $(LINK_FLAGS) $(CC) -shared $(OBJ) -o $(NAME) $(LINK_FLAGS)
$(TEST_BIN): $(TEST_OBJ) $(TEST_BIN): $(TEST_OBJ)
$(CC) $(TEST_OBJ) $(LINK_FLAGS) -o $(TEST_BIN) $(CC) $(TEST_OBJ) $(LINK_FLAGS) -o $(TEST_BIN)
@ -129,7 +129,7 @@ $(OBJ_DIR):
mkdir $(OBJ_DIR) mkdir $(OBJ_DIR)
$(OBJ_DIR)%.o: %.c $(LIBFT) $(HEADERS) $(OBJ_DIR)%.o: %.c $(LIBFT) $(HEADERS)
$(CC) -c $< -o $@ $(CC_FLAGS) $(HEADER_FLAGS) $(CC) -fpic -c $< -o $@ $(CC_FLAGS) $(HEADER_FLAGS)
$(LIBFT): $(LIBFT):
$(MAKE) -C $(LIBFT_DIR) $(MAKE) -C $(LIBFT_DIR)