nuklear/demo/sfml_opengl2/Makefile

34 lines
817 B
Makefile
Raw Normal View History

# Install
CC = g++
BIN = demo
# Flags
CFLAGS += -s -O2
SRC = main.cpp
OBJ = $(SRC:.cpp=.o)
ifeq ($(OS),Windows_NT)
# Edit the line below to point to your SFML folder on Windows
SFML_DIR = C:/Users/Ricky/MinGW-Libs/SFML
BIN := $(BIN).exe
LIBS = -lmingw32 -DSFML_STATIC -lsfml-window-s -lsfml-system-s -lopengl32 -lwinmm -lgdi32
else
2017-11-12 03:39:23 -08:00
# Edit the line below to point to your SFML folder on Linux/MacOS
SFML_DIR = /home/ricky/Libraries/SFML
2017-11-12 03:39:23 -08:00
UNAME_S := $(shell uname -s)
2017-11-12 03:49:15 -08:00
ifeq ($(UNAME_S),Darwin)
LIBS = -lsfml-window -lsfml-system -pthread -framework OpenGL
else
2017-11-12 03:39:23 -08:00
LIBS = -DSFML_STATIC -lsfml-window-s -lsfml-system-s -pthread -ludev -lGL -lX11 -lXrandr
2017-11-12 03:49:15 -08:00
endif
endif
SFML_INC = -I $(SFML_DIR)/include
SFML_LIB = -L $(SFML_DIR)/lib
$(BIN):
$(CC) $(SRC) $(CFLAGS) -o $(BIN) $(SFML_INC) $(SFML_LIB) $(LIBS)