Skip to content

Instantly share code, notes, and snippets.

@demicuz
Created October 15, 2021 11:53
Show Gist options
  • Save demicuz/14f6a4e78776e12b82da4faccfd1473f to your computer and use it in GitHub Desktop.
Save demicuz/14f6a4e78776e12b82da4faccfd1473f to your computer and use it in GitHub Desktop.
CC = gcc
# CFLAGS = -Wall -Werror -Wextra
CFLAGS =
NAME = runner
# HDIR = ./include/
S = $(wildcard *.c */*.c)
H = $(wildcard *.h */*.h)
O = $(S:.c=.o)
RM = rm -rf
.PHONY: all clean fclean re
all: $(NAME)
$(NAME): $(O)
@$(CC) $(CFLAGS) -o $(NAME) $(O)
.c.o:
@$(CC) $(CFLAGS) -c $< -o $@ #-I $(HDIR)
clean:
@$(RM) $(O)
fclean: clean
@$(RM) $(NAME)
re: fclean all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment