forked from cnlohr/noeuclid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (27 loc) · 1.19 KB
/
Makefile
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
29
30
31
32
33
34
35
36
37
all: noeuclid
SRCS=$(wildcard *.cpp)
OBJS=$(subst .cpp,.o,$(SRCS))
OS:=$(shell uname)
LDFLAGS:=$(LDFLAGS) -lsfml-graphics -lsfml-window -lsfml-system
CXXFLAGS:=$(CXXFLAGS) -std=c++11 -DGLEW_STATIC -DGL_GLEXT_PROTOTYPES -g -Wall -O2
LDFLAGS:=$(LDFLAGS) -g -Wall
LINK.o = $(LINK.cc)
ifeq ($(OS),Darwin)
LDFLAGS:=$(LDFLAGS) -I/usr/local/include/ -L /usr/local/lib/
CXXFLAGS:=$(CXXFLAGS) -I/usr/local/include/
LDLIBS:=$(LDFLAGS) $(LDLIBS) -framework GLUT -framework OpenGL -framework Cocoa -lGLEW -ltcc -ldl
else
LDLIBS:=$(LDFLAGS) $(LDLIBS) -lGLEW -lGLU -lGL -ltcc -ldl
endif
WINCXXFLAGS:=-DGLEXT -std=c++11 -g -O2 -IWindows -IWindows/SFML-2.2/include -DGLEW_STATIC -DDrawText=DrawText
WINLDFL:=Windows/libtcc.a -LWindows/SFML-2.2/lib -lglew -lsfml-graphics -lsfml-window -lsfml-system -lopengl32 -lkernel32 -lm -lgdiplus -lole32 -lglu32 -lopengl32 ./libtcc1.a
noeuclid.exe : $(SRCS) Windows/SFML-2.2
i686-w64-mingw32-g++ -m32 $(WINCXXFLAGS) -o $@ $(SRCS) $(WINLDFL)
Windows/SFML-2.2:
cd Windows
wget http://www.sfml-dev.org/files/SFML-2.2-windows-gcc-4.9.2-mingw-32-bit.zip
unzip SFML-2.2-windows-gcc-4.9.2-mingw-32-bit.zip
cd ..
noeuclid: $(OBJS)
clean:
rm -f $(OBJS) noeuclid noeuclid.exe