-
Notifications
You must be signed in to change notification settings - Fork 16
/
compiling.txt
154 lines (103 loc) · 4.38 KB
/
compiling.txt
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
Compiling Instructions
======================
The methods for compiling Angband vary by platform and by build system. If
you get Angband working on a different platform or build system please let us
know so we can add to this file.
BUILDING ON Mac OS X
====================
Native builds
-------------
To build the new Cocoa front-end:
cd src
make -f Makefile.cocoa
To build the legacy Carbon front-end (which is deprecated):
cd src
make -f Makefile.osx
BUILDING ON LINUX / *NIX
========================
Native builds
-------------
Linux builds using autotools. There are several different front ends that you
can optionally build (GCU, SDL, X11, and GTK) using arguments to configure
such as --enable-sdl, --disable-gtk, etc. Each front end has different
dependencies (e.g. ncurses, SDL libraries, etc).
To build Angband to be run in-place:
./autogen.sh
./configure --with-no-install [other options as needed]
make
To build Angband to be installed in some other location:
./autogen.sh
./configure --prefix /path/to [other options as needed ]
make
make install
On some BSDs, you may need to copy install-sh into lib/ and various
subdirectories of lib/ in order to install correctly.
Cross-building for Windows with Mingw
-------------------------------------
Many developers (as well as the auto-builder) build Angband for Windows using
Mingw on Linux. This requires that the necessary Mingw packages are all
installed.
This type of build now also uses autotools, so you must configure it to
cross-compile, e.g.
./autogen.sh
./configure --enable-win --disable-curses --build=i686-pc-linux-gnu --host=i586-mingw32msvc
Mingw installs commands like 'i586-mingw32msvc-gcc'. The value of --host
should be that same command with the '-gcc' removed. Instead of i586 you may
see i686, amd64, etc. The value of --build should be the host you're building
on. (See http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/
autoconf-2.68/html_node/Specifying-Target-Triplets.html#Specifying%20Names for
gory details of how these triplets are arrived at)
TODO: you will probably need to manually disable curses, or the host curses
installation will be found, and will not be able to link properly. More
checking of permissible combinations to configure is necessary
BUILDING ON WINDOWS
===================
Using MinGW
-----------
This build now also uses autotools, so should be very similar to the Linux
build:
./autogen.sh
./configure --enable-win
make
The install target almost certainly won't work
Following build, to get the program to run, you need to copy the executable
from the src directory into the top-level dir, and copy 2 DLLs (libpng12.dll
and zlib1.dll) from src/win/dll to the top-level dir
Using Cygwin (with MinGW)
-------------------------
Use this option if you want to build a native Windows executable that
can run with or without Cygwin.
Use the Cygwin setup.exe to install the mingw-gcc-core package and any
dependencies suggested by the installer.
Run these commands:
./autogen.sh
./configure --enable-win --with-no-install --host=i686-pc-mingw32
make
As with the "Using MinGW" process, you need to copy the executable and
DLLs to the top-level dir.
If you want to build the Unix version of Angband that uses X11 or
Curses and run it under Cygwin, then follow the native build
instructions (./autogen.sh; ./configure; make; make install).
Using eclipse (Indigo) on Windows (with MinGW)
----------------------------------------------
For eclipse with EGit, select File | Import..., Git | Projects from Git, Next >
Clone your/the upstream repo, or Add your existing cloned repo, Next >
Select "Use the New Projects Wizard", Finish
In the New Project Wizard, select C/C++ | Makefile Project with Existing Code, Next >
Give the project a name (Angband),
navigate to the repo you cloned in "Existing Code Location",
Select "C", but not "C++"
Choose "MinGW GCC" Toolchain, Finish
Once the project is set up, r-click | Properties
go to C/C++ Build | Toolchain Editor, select "Gnu Make Builder" instead of
"CDT Internal Builder"
go to C/C++ Build, uncheck "Generate Makefiles automatically"
You still need to run ./autogen.sh and ./configure manually, outside eclipse
(see above)
Using Visual Studio
-------------------
Blue Baron has detailed instructions for setting this up at:
src/win/angband_visual_studio_step_by_step.txt
Using Dev-C++
-------------
TODO