Skip to content

Instantly share code, notes, and snippets.

@animatedlew
Created March 30, 2017 00:54
Show Gist options
  • Save animatedlew/93b9563d6bd6ddf0633d98c3c7ad19c3 to your computer and use it in GitHub Desktop.
Save animatedlew/93b9563d6bd6ddf0633d98c3c7ad19c3 to your computer and use it in GitHub Desktop.
An SFML Makefile for Unix systems
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)
@GTsianakas
Copy link

I love you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment