Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@cormobro
Created January 8, 2020 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cormobro/79c7e4fc1f8fd1f3c2fb1d2beb3933cb to your computer and use it in GitHub Desktop.
Save cormobro/79c7e4fc1f8fd1f3c2fb1d2beb3933cb to your computer and use it in GitHub Desktop.
makefile felix
NAME=libft.a
CC=gcc
CFLAGS=-Wall -Wextra -Werror
RM=rm -f
LDLIBS=-lft
HDDIRS=-I includes/
SRC=ft_memset.c ft_bzero.c ft_memcpy.c ft_memccpy.c ft_memmove.c \
OBJ=$(SRC:.c=.o)
$(NAME):
$(CC) $(CFLAGS) -c $(SRC) $(HDDIRS)
ar rc $(NAME) $(OBJ)
ranlib $(NAME)
all: $(NAME)
clean:
$(RM) $(OBJ)
fclean: clean
$(RM) $(NAME)
re: fclean all
.PHONY: clean fclean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment