-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
178 lines (165 loc) · 4.71 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
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
175
176
177
178
#
# $Id$
#
# This Makefile is intended to automate certain useful tasks
# for developers.
# It is NOT intended to be used to build the CTP2 executable
#
# Provided targets are:
# bootstrap
# Will create autoconf-based buildfiles.
# After that, you can run
#
# ./configure && make
#
# to build the targets supported by the autoconf buildsystem.
#
# local
# Will copy relevant files from the source tree to a local installation,
# to allow them to be tested there.
# The location of the local installation is taken from etc/local-install
# (Note that is a local etc directory, not /etc).
# This target uses a shell script, so it will require, for example, cygwin
# to work.
#
# playtest
# Will create a directory called playtest and copy into it all appropriate
# files to constitute a playtest version, ready to be compressed and
# distributed. This starts by deleting the playtest directoy, so
# be sure there is nothing there you wish to preserve!
#
# purge
# Will remove any file generated by autoconf.
# This may not include other files generated during the build
# process (./configure && make)
#
# doc
# Make all the documentation
all:
#################################### \
# This Makefile has no default # \
# or all target. # \
# See the comments in the Makefile # \
# for a description of its use. # \
####################################
bootstrap-anet: ctp2_code/libs/anet ctp2_code/libs/anet/Makefile
$(MAKE) -C $< bootstrap
bootstrap: bootstrap-anet
@echo "Bootstraping Civilization Call to Power 2"
@echo " "
@echo "This is no official release by activision."
@echo " "
aclocal -I ctp2_code/os/autoconf -I ctp2_code/libs/anet/macros
autoheader
libtoolize --force --copy
automake --foreign --add-missing --copy
autoconf
@echo " "
@echo "Bootstraping complete."
@echo " "
@echo "You may run ./configure and then make to compile CTP2."
local:
bin/copy_to_local.sh
PLAYTEST = playtest
playtest:
$(MAKE) -C doc/user
-rm -rf playtest
mkdir -p $(PLAYTEST)/ctp2_program/ctp/dll/
svn export ctp2_code/ctp/dll $(PLAYTEST)/ctp2_program/ctp/dll --force
cp -uv ctp2_code/ctp/dll/map/*.dll $(PLAYTEST)/ctp2_program/ctp/dll/map/
cp -uv ctp2_code/ctp/anet* $(PLAYTEST)/ctp2_program/ctp/
cp -uv ctp2_code/ctp/ctp2.* $(PLAYTEST)/ctp2_program/ctp/
cp -uv ctp2_code/ctp/zlib1.dll $(PLAYTEST)/ctp2_program/ctp/
cp -uv ctp2_code/ctp/jpeg62.dll $(PLAYTEST)/ctp2_program/ctp/
cp -uv ctp2_code/ctp/libtiff3.dll $(PLAYTEST)/ctp2_program/ctp/
#cp -uv ctp2_code/ctp/appstr.txt $(PLAYTEST)/ctp2_program/ctp/
cp -uv doc/user/playtest/*.txt $(PLAYTEST)/
mkdir -p $(PLAYTEST)/doc
cp -uv doc/user/manual/user_manual.pdf $(PLAYTEST)/doc
svn export ctp2_data $(PLAYTEST)/ctp2_data --force
svn export Scenarios $(PLAYTEST)/Scenarios --force
doc:
$(MAKE) -C doc
.PHONY: all local playtest doc
SRCDIRS=\
ctp2_code \
ctp2_code/ctp \
ctp2_code/gfx \
ctp2_code/gfx/gfx_utils \
ctp2_code/gs \
ctp2_code/gs/database \
ctp2_code/gs/dbgen \
ctp2_code/gs/events \
ctp2_code/gs/fileio \
ctp2_code/gs/gameobj \
ctp2_code/gs/newdb \
ctp2_code/gs/outcom \
ctp2_code/gs/slic \
ctp2_code/gs/utility \
ctp2_code/gs/world \
ctp2_code/mapgen \
ctp2_code/os \
ctp2_code/os/nowin32 \
ctp2_code/sound \
ctp2_code/ui \
ctp2_code/ui/interface
MRPROPER_DIRS=\
autom4te.cache \
ctp2_code/autom4te.cache \
$(foreach srcdir,$(SRCDIRS),\
$(srcdir)/.deps \
$(srcdir)/.lib \
$(srcdir)/_lib \
)
MRPROPER_FILES=\
GNUmakefile \
GNUmakefile.in \
aclocal.m4 \
config.log \
config.status \
configure \
libtool \
ctp2_code/Makefile \
ctp2_code/Makefile.in \
ctp2_code/aclocal.m4 \
ctp2_code/config.log \
ctp2_code/config.status \
ctp2_code/configure \
ctp2_code/libtool \
ctp2_code/gs/dbgen/ctpdb \
ctp2_code/gs/dbgen/ctpdb.exe \
ctp2_code/gs/dbgen/ctpdb_lex.c \
ctp2_code/gs/dbgen/ctpdb_yacc.c \
ctp2_code/gs/dbgen/ctpdb_yacc.h \
ctp2_code/gs/dbgen/lex.yy.c \
ctp2_code/gs/dbgen/y.tab.c \
ctp2_code/gs/dbgen/y.tab.h \
ctp2_code/os/autoconf/config/config.guess \
ctp2_code/os/autoconf/config/config.sub \
ctp2_code/os/autoconf/config/depcomp \
ctp2_code/os/autoconf/config/install-sh \
ctp2_code/os/autoconf/config/ltmain.sh \
ctp2_code/os/autoconf/config/missing \
ctp2_code/os/autoconf/config/mkinstalldirs \
ctp2_code/os/include/config.h \
ctp2_code/os/include/config.h.in \
ctp2_code/os/include/config.h.in~ \
$(foreach srcdir,$(SRCDIRS),\
$(srcdir)/*.la \
$(srcdir)/*.lo \
$(srcdir)/*.o \
$(srcdir)/Makefile \
$(srcdir)/Makefile.in \
$(srcdir)/so_locations \
)
clean:
distclean:
purge: distclean
@for DIR in $(MRPROPER_DIRS) ; do \
echo rm -rf $$DIR ; \
rm -rf $$DIR ; \
done
@for FILE in $(MRPROPER_FILES) ; do \
echo rm -f $$FILE ; \
rm -f $$FILE ; \
done