Last active
April 24, 2018 18:04
-
-
Save alifarazz/48646e35c72ff626b040c19012b74158 to your computer and use it in GitHub Desktop.
Makefile for personal OpenGL develpment.
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
# compiler | |
CC=clang++ | |
# linker | |
LD=$(CC) | |
# optimisation | |
OPT=-ggdb | |
# warnings | |
WARN=-Wall -Wextra | |
# standards | |
STD=c++14 | |
# pthread | |
# PTHREAD=-pthread | |
PTHREAD= | |
TARGET = sibil | |
CCFLAGS = $(WARN) $(PTHREAD) -std="$(STD)" -stdlib=libstdc++ $(OPT) -pipe `pkg-config --cflags glfw3 glew glm` -I/usr/include/FreeImage | |
LDFLAGS = $(PTHREAD) `pkg-config --libs glfw3 glew glm` -lfreeimage # -export-dynamic | |
SRCS = $(wildcard *.cpp) | |
OBJECTS = $(patsubst %.cpp, %.o, $(SRCS)) | |
.PHONY: default all clean | |
default: $(TARGET) | |
all: default | |
%.o: %.cpp | |
$(CC) $(CCFLAGS) -c $< -o $@ | |
.PRECIOUS: $(TARGET) $(OBJECTS) | |
$(TARGET): $(OBJECTS) | |
$(LD) $(OBJECTS) $(LDFLAGS) -o $@ | |
clean: | |
$(RM) *.o | |
$(RM) $(TARGET) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment