Created
March 15, 2011 20:26
-
-
Save robgolding/871391 to your computer and use it in GitHub Desktop.
A simple Makefile for the G52CFJ coursework
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
CXX = g++ | |
CXXFLAGS = -g $$(sdl-config --cflags --libs) -lSDL_image -lSDL_ttf | |
SOURCES = \ | |
BaseEngine.cpp \ | |
BouncingBall.cpp \ | |
BouncingBallMain.cpp \ | |
DisplayableObject.cpp | |
OBJECTS=$(SOURCES:.cpp=.o) | |
EXECUTABLE=game | |
all: $(EXECUTABLE) | |
$(EXECUTABLE): $(OBJECTS) | |
$(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) | |
clean: | |
rm -f $(OBJECTS) $(EXECUTABLE) | |
%.o: %.cpp %.h | |
$(CXX) $(CXXFLAGS) -c -o $@ $< | |
run: $(EXECUTABLE) | |
./$(EXECUTABLE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment