2017-03-01 03:32:55 +03:00
|
|
|
# Install
|
|
|
|
CC = g++
|
|
|
|
BIN = demo
|
2017-02-18 01:54:24 +03:00
|
|
|
|
2017-03-01 03:32:55 +03:00
|
|
|
# Flags
|
2017-12-31 19:12:41 +03:00
|
|
|
CFLAGS += -s -O2
|
2017-02-18 01:54:24 +03:00
|
|
|
|
2017-03-01 03:32:55 +03:00
|
|
|
SRC = main.cpp
|
|
|
|
OBJ = $(SRC:.cpp=.o)
|
2017-02-18 01:54:24 +03:00
|
|
|
|
2017-03-01 03:32:55 +03:00
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
# Edit the line below to point to your SFML/GLAD folder on Windows
|
|
|
|
SFML_DIR = C:/Users/Ricky/MinGW-Libs/SFML
|
|
|
|
GLAD_DIR = C:/Users/Ricky/MinGW-Libs/GLAD
|
2017-02-18 01:54:24 +03:00
|
|
|
|
2017-03-01 03:32:55 +03:00
|
|
|
BIN := $(BIN).exe
|
|
|
|
LIBS = -lmingw32 -DSFML_STATIC -lsfml-window-s -lsfml-system-s -lopengl32 -lwinmm -lgdi32
|
|
|
|
else
|
2017-11-12 14:39:23 +03:00
|
|
|
# Edit the line below to point to your SFML/GLAD folder on Linux/MacOS
|
2017-03-01 03:32:55 +03:00
|
|
|
SFML_DIR = /home/ricky/Libraries/SFML
|
|
|
|
GLAD_DIR = /home/ricky/Libraries/GLAD
|
|
|
|
|
2017-11-12 14:39:23 +03:00
|
|
|
UNAME_S := $(shell uname -s)
|
2017-11-12 14:47:13 +03:00
|
|
|
ifeq ($(UNAME_S),Darwin)
|
|
|
|
LIBS = -lsfml-window -lsfml-system -pthread -framework OpenGL
|
|
|
|
else
|
|
|
|
LIBS = -DSFML_STATIC -lsfml-window-s -lsfml-system-s -pthread -ludev -lGL -lX11 -lXrandr
|
|
|
|
endif
|
2017-03-01 03:32:55 +03:00
|
|
|
endif
|
|
|
|
|
|
|
|
SFML_INC = -I $(SFML_DIR)/include
|
|
|
|
SFML_LIB = -L $(SFML_DIR)/lib
|
|
|
|
GLAD_INC = -I $(GLAD_DIR)/include
|
|
|
|
GLAD_SRC = $(GLAD_DIR)/src/glad.c
|
|
|
|
|
|
|
|
$(BIN):
|
|
|
|
$(CC) $(GLAD_SRC) $(SRC) $(CFLAGS) $(GLAD_INC) $(SFML_INC) $(SFML_LIB) $(SFML_EXT) -o $(BIN) $(LIBS)
|