-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (23 loc) · 898 Bytes
/
Makefile
File metadata and controls
28 lines (23 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# You will need SDL2 (http://www.libsdl.org):
# Linux: apt-get install libsdl2-dev
# Mac OS X: brew install sdl2
# MSYS2: pacman -S mingw-w64-i686-SDL
#
#CXX = g++
#CXX = clang++
UNAME_S := $(shell uname -s)
EXE := test
ifeq ($(UNAME_S), Linux) #LINUX
LIBS = -lvdb -lGL -ldl `sdl2-config --libs`
CXXFLAGS = -I../include/ `sdl2-config --cflags` -L../lib/ -Wall -Wformat
endif
ifeq ($(UNAME_S), Darwin) #APPLE
LIBS = -lvdb -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo `sdl2-config --libs`
CXXFLAGS = -I../include/ -I/usr/local/include `sdl2-config --cflags` -L../lib/ -Wall -Wformat
endif
ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
LIBS = -lvdb -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2`
CXXFLAGS = -I../include/ `pkg-config --cflags sdl2` -L../lib/ -Wall -Wformat
endif
all: test.cpp
$(CXX) test.cpp $(CXXFLAGS) $(LIBS) -o $(EXE)