Created
August 4, 2014 13:24
-
-
Save pav67/73f3fe9063e286831961 to your computer and use it in GitHub Desktop.
Makefile
This file contains hidden or 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
GCC=gcc | |
RM=rm | |
SRC=$(wildcard *.c) | |
OBJ=$(SRC:.c=.o) | |
FLAGS= | |
EXEC=main | |
all : $(EXEC) | |
%.o : %.c | |
$(GCC) -c $^ -o $@ | |
$(EXEC) : $(OBJ) | |
$(GCC) $^ -o $@ $(FLAGS) | |
.PHONY: clean | |
clean : | |
$(RM) *.o | |
$(RM) $(EXEC) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment