Created
August 27, 2019 17:04
-
-
Save cacharle/9cb62da4129518d8efc69b9c2821643f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAME = name | |
CC = gcc | |
CCFLAGS = -Wall -Wextra | |
LDFLAGS = | |
HEADER = header.h | |
SRC = main.c | |
OBJ = $(SRC:.c=.o) | |
RM = rm -f | |
.PHONY: all | |
all: $(NAME) | |
$(NAME): $(OBJ) $(HEADER) | |
$(CC) $(LDFLAGS) $(CCFLAGS) -o $@ $(OBJ) | |
%.o: %.c | |
$(CC) $(LDFLAGS) $(CCFLAGS) -c -o $@ $< | |
.PHONY: clean | |
clean: | |
$(RM) $(OBJ) | |
.PHONY: fclean | |
fclean: clean | |
$(RM) $(NAME) | |
.PHONY: re | |
re: fclean all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment