Skip to content

Commit 45a91d5

Browse files
author
Thumperrr
committed
Merge remote-tracking branch 'origin/dirty' into dirty
2 parents 0b8ca71 + 3e18057 commit 45a91d5

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

Makefile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
UNAME = $(shell uname -s)
2+
3+
COMPILER_Linux = g++
4+
CXX_FLAGS_Linux = -Wall -std=c++11
5+
DEBUG_LIBS_Linux = -lsfml-system-d -lsfml-window-d -lsfml-graphics-d
6+
RELEASE_LIBS_Linux = -lsfml-system -lsfml-window -lsfml-graphics
7+
8+
COMPILER_Darwin = clang++
9+
CXX_FLAGS_Darwin = -Wall -std=c++11 -stdlib=libc++
10+
DEBUG_LIBS_Darwin = -framework SFML -framework sfml-system -framework sfml-window -framework sfml-graphics
11+
RELEASE_LIBS_Darwin = $(DEBUG_LIBS)
12+
13+
COMPILER = $(COMPILER_$(UNAME))
14+
CXX_FLAGS = $(CXX_FLAGS_$(UNAME))
15+
DEBUG_LIBS = $(DEBUG_LIBS_$(UNAME))
16+
RELEASE_LIBS = $(RELEASE_LIBS_$(UNAME))
17+
18+
DEBUG_PREPROCESSOR = -D_DEBUG
19+
RELEASE_PREPROCESSOR = -D_RELEASE
20+
21+
EXECUTABLE = chesspp
22+
TARGETDIR = ../bin
23+
TARGET = $(TARGETDIR)/$(EXECUTABLE)
24+
SOURCE = $(shell cd src ; ls *.cpp) $(shell cd src ; ls board/*.cpp)
25+
26+
all: debug
27+
28+
debug: CXX_PREPROCESSOR=$(DEBUG_PREPROCESSOR)
29+
debug: LIBS=$(DEBUG_LIBS)
30+
debug: main
31+
32+
release: CXX_PREPROCESSOR=$(RELEASE_PREPROCESSOR)
33+
release: LIBS=$(RELEASE_LIBS)
34+
release: main
35+
36+
main: | bin
37+
cd src; \
38+
$(COMPILER) $(CXX_FLAGS) $(CXX_PREPROCESSOR) -o $(TARGET) $(SOURCE) $(LIBS)
39+
40+
bin:
41+
mkdir bin
42+

0 commit comments

Comments
 (0)