Created
October 13, 2015 20:41
-
-
Save lsem/0469f2d2f4e47d51a7d9 to your computer and use it in GitHub Desktop.
Makefile sample
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=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