forked from cnlohr/noeuclid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (31 loc) · 1.14 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
38
39
40
41
all: noeuclid
SRCS=$(wildcard *.cpp)
OBJS=$(subst .cpp,.o,$(SRCS))
OS:=$(shell uname)
CROSS:=0
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
ifneq ($(CROSS),0)
WINCXX:=i686-w64-mingw32-g
else
WINCXX:=g
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 Windows/libtcc1.a
noeuclid.exe: $(SRCS) Windows
$(WINCXX) -m32 $(WINCXXFLAGS) -o $@ $(SRCS) $(WINLDFL)
Windows:
$(MAKE) -C Windows
noeuclid: $(OBJS)
clean:
rm -f $(OBJS) noeuclid noeuclid.exe
.PHONY: clean all Windows