-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathMakefile.conf
174 lines (140 loc) · 4.84 KB
/
Makefile.conf
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
! Makefile.conf
! Makefile template for Scid for Unix operating systems.
!
! This file is NOT an actual Makefile; it is a template file used by
! the configure program to produce the actual Makefile for Scid with
! approriate settings for your system. Just type "./configure" in the
! current directory to run the configuration program.
!
! All lines starting with "!" (such as these) are removed, and certain
! variables enclosed in "@" symbols (such as @TCL_VERSION@) are set.
!
##### Makefile for Scid for Unix operating systems.
### Compiler: Most Unix systems use g++ for compiling and linking.
#
COMPILE = @COMPILE@
LINK = @LINK@
INSTALL = @INSTALL@
# BINDIR: where the Scid programs are copied for "make install".
#
BINDIR = @BINDIR@
# SHAREDIR: where scid.eco is copied for "make install".
#
SHAREDIR = @SHAREDIR@
### TCL_VERSION: Set this according to the version of Tcl/Tk you have
# installed that you want Scid to use: 8.0, 8.1, 8.2, 8.3, etc.
#
TCL_VERSION = @TCL_VERSION@
# TCL_INCLUDE, TCL_LIBRARY: these are the compiler options
# needed for linking Scid with Tcl/Tk. The program "./configure"
# will try to determine them automatically, but if it cannot, you
# can use the examples below for help in setting these variables.
#
# @CONFIG_RESULT@
#
TCL_INCLUDE = @TCL_INCLUDE@
TCL_LIBRARY = @TCL_LIBRARY@
########################################
### Compiler options:
### SCIDFLAGS: Scid customization flags.
#
SCIDFLAGS = @SCIDFLAGS@
### OPTIMIZE: Optimization options for C++ compiler.
# -O3 is the most optimization for g++. I have found -O2 to do
# just as well, but someone reported a noticeable difference in speed
# between -O3 and -O2 so the default here is -O3.
# On some systems, adding "-fno-rtti" and "-fno-exceptions" produces
# smaller, faster programs since Scid does not use those C++ features.
#
OPTIMIZE = @OPTIMIZE@ @THREADS@
### DEBUG: Debug flags. Use "-g" to include debugging information and
# "-DNDEBUG" to disable debugging information and assertions.
#
DEBUG = @DEBUG@
### WARNINGS: I always compile with all warnings on (-Wall), and all the
# files should compile warning-free using g++.
#
WARNINGS = @WARNINGS@
### PROFILE: Set this to "-pg" for profiling in g++ and gcc.
#
PROFILE = @PROFILE@
### CPP_FLAGS: Flags for C++ compilation.
#
CPP_FLAGS = $(CXXFLAGS) $(CPPFLAGS) $(PROFILE) $(OPTIMIZE) $(WARNINGS) $(DEBUG) $(SCIDFLAGS) $(TB)
############################################################
#
# You should not need to edit anything below this line.
#
############################################################
### EXECS: executable programs compiled from C++ files.
#
EXECS= scid
### SCIDOBJS:
SCIDCPP= $(wildcard src/*.cpp)
SCIDOBJS= $(SCIDCPP:.cpp=.o)
POLYGLOT= $(wildcard src/polyglot/*.cpp)
XOBJS= $(POLYGLOT:.cpp=.o)
DEPENDS = ${SCIDOBJS:.o=.d} ${XOBJS:.o=.d}
### OBJS: Will be "$(SCIDOBJS)", "$(POLYGLOTOBJS)"
OBJS= @OBJS@
### SCRIPTS:
# Small extra programs. Most are written in Tcl using tkscid, but
# a few contributed ones may be in Python or other languages.
#
SCRIPTS= sc_epgn.tcl sc_spell.tcl sc_eco.tcl sc_import.tcl sc_remote.tk scidpgn.tcl spliteco.tcl spf2spi.tcl
####################
### Type "make" or "make all" to make all programs:
#
all: scid all_engines
all_engines: phalanx-scid
scid: $(OBJS) $(XOBJS)
$(LINK) $(CPP_FLAGS) $(XOBJS) $(OBJS) $(TCL_LIBRARY) -o $(EXECS)
phalanx-scid:
cd engines/phalanx-scid/ && $(MAKE) && cd ../../
### To copy all executables to $BINDIR, with read and execute permission
# for all users, and put extra files in $SHAREDIR, type "make install".
#
install: $(INSTALL)
install_shared: scid
install -m 755 -d "$(SHAREDIR)"
cp scid "$(SHAREDIR)"
cp *.eco "$(SHAREDIR)"
cp -r bitmaps "$(SHAREDIR)"
cp -r bitmaps2 "$(SHAREDIR)"
cp -r books "$(SHAREDIR)"
cp -r html "$(SHAREDIR)"
cp -r img "$(SHAREDIR)"
cp -r scripts "$(SHAREDIR)"
cp -r sounds "$(SHAREDIR)"
cp -r tcl "$(SHAREDIR)"
install_scid: install_shared
install -m 755 -d "$(BINDIR)"
ln -sf "$(SHAREDIR)/scid" "$(BINDIR)/scid"
@for script in $(SCRIPTS); do \
cp "scripts/$$script" "$(BINDIR)"; \
chmod +x "$(BINDIR)/$$script"; \
done
install_engines: all_engines
install -m 755 -d "$(SHAREDIR)/engines"
install -m 755 -d "$(SHAREDIR)/engines/phalanx-scid"
install ./engines/phalanx-scid/phalanx-scid "$(SHAREDIR)/engines/phalanx-scid"
uninstall:
cd $(BINDIR) && rm -f $(EXECS) $(SCRIPTS)
rm -rf $(SHAREDIR)
### To remove object and executable files: type "make clean".
#
clean:
rm -f scidlet scidlet.d src/*.o src/polyglot/*.o $(EXECS) scid $(SCRIPTS)
rm -f src/*.d src/polyglot/*.d
cd engines/phalanx-scid/ && make clean && cd ../../
rm -Rf dist
### To make the executable files smaller: type "make strip".
#
strip:
strip $(EXECS)
### Generic rule for .cpp files:
#
src/%.o: src/%.cpp
$(COMPILE) $(CPP_FLAGS) $(TCL_INCLUDE) -o $@ -c $<
-include ${DEPENDS}
### End of Makefile