Created
September 22, 2015 23:04
-
-
Save AndyNovo/233c419686f0b96b3bf8 to your computer and use it in GitHub Desktop.
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
CC=g++ | |
CFLAGS=-c -Wall | |
LDFLAGS= | |
SOURCES=main.cpp hello.cpp factorial.cpp | |
OBJECTS=$(SOURCES:.cpp=.o) | |
EXECUTABLE=hello | |
all: $(SOURCES) $(EXECUTABLE) | |
$(EXECUTABLE): $(OBJECTS) | |
$(CC) $(LDFLAGS) $(OBJECTS) -o $@ | |
.cpp.o: | |
$(CC) $(CFLAGS) $< -o $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Stolen from http://mrbook.org/blog/tutorials/make/