Skip to content

Instantly share code, notes, and snippets.

@skejeton
Created April 20, 2020 12:55
Show Gist options
  • Save skejeton/b698db757b70ec3ac9517052e5b3e281 to your computer and use it in GitHub Desktop.
Save skejeton/b698db757b70ec3ac9517052e5b3e281 to your computer and use it in GitHub Desktop.
OLC Pixel game engine makefile
INCLUDE=.
LIBRARIES=-lX11 -lGL -lpthread -lpng
PROJECT_NAME=myproject
CPP=clang++
CLFAGS=-std=c++14
all: build run
build:
$(CPP) $(CLFAGS) -I$(INCLUDE) ./src/** -o a.out $(LIBRARIES) -lc -lm -lstdc++fs
mv ./a.out ./bin/$(PROJECT_NAME)
chmod +x ./bin/$(PROJECT_NAME)
run:
./bin/$(PROJECT_NAME)
.PHONY: all build run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment