Created
October 23, 2012 16:27
-
-
Save stephenLee/3939889 to your computer and use it in GitHub Desktop.
Tiny Makefile template for c/c++
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
# define variable, use using $() | |
# -g add debug information to the executable file | |
# -Wall turns on most, but not all, compiler warnings | |
CC = g++ | |
CFLAGS = -g -Wall | |
file: file.o | |
$(CC) $(CFLAGS) -o file file.o | |
file.o: file.cpp | |
$(CC) $(CFLAGS) -c file.cpp | |
clean: | |
rm -f file *.o |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment