Created
November 14, 2016 09:23
-
-
Save rbarzic/3d41b5ae51874d78ec527d1da20fd542 to your computer and use it in GitHub Desktop.
Minimalist Makefile
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
CPP = g++ | |
CPPFLAGS = -Wall -pedantic -O2 -g -c | |
SOURCES := ${wildcard *.cpp} | |
OBJECTS := ${SOURCES:.cpp=.o} | |
.PHONY: all clean | |
.SUFFIXES: .cpp .o | |
all: main | |
main: $(OBJECTS) | |
.cpp.o: | |
$(CPP) $(CPPFLAGS) $< -o $@ | |
clean: | |
-rm -fv *.o |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment