Created
December 24, 2016 11:14
-
-
Save nongiach/71042fb2296d005e20305003d3737577 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
CC = gcc | |
CFLAGS += -W -Wall -Wextra | |
ifdef deb | |
CFLAGS += -g -Ddeb= | |
endif | |
LDFLAGS += | |
NAME = a.out | |
SRC = main.c | |
OBJ = $(SRC:%.c=obj/%.o) | |
all: $(NAME) | |
obj/%.o : %.c | |
mkdir -p obj | |
$(CC) -c $(CFLAGS) $< -o $@ $(LDFLAGS) | |
$(NAME):$(OBJ) | |
$(CC) -o $(NAME) $(LDFLAGS) $(OBJ) | |
clean: | |
$(RM) $(OBJ) | |
$(RM) -r obj | |
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