Created
March 30, 2017 00:54
-
-
Save animatedlew/93b9563d6bd6ddf0633d98c3c7ad19c3 to your computer and use it in GitHub Desktop.
An SFML Makefile for Unix systems
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
BIN = bin | |
SRC = src | |
INC = include | |
LIBS = -lsfml-graphics -lsfml-window -lsfml-system | |
FLAGS = -std=c++14 -Wall | |
OBJ = Game.o ParticleSystem.o Ship.o Utils.o main.o | |
TARGET = $(BIN)/game | |
CC = g++ | |
DEPS = $(patsubst %, $(BIN)/%, $(OBJ)) | |
default: $(TARGET) | |
$(BIN)/%.o: $(SRC)/%.cpp | |
$(CC) $(FLAGS) -I$(INC) -c $^ -o $@ | |
$(TARGET): $(DEPS) | |
$(CC) $(DEPS) $(LIBS) $(FLAGS) -o $@ | |
.PHONY: clean | |
clean: | |
-rm -f $(DEPS) $(BIN)/$(TARGET) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I love you