aboutsummaryrefslogtreecommitdiff
path: root/BUILD.txt
blob: 27f8ff3a2c86ad75567b6cfaf3cff7a04ff071d8 (plain)
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
Build dependencies:

- A Linux, BSD, or POSIX-like shell and environment. Mac OSX should
  work, and so should Cygwin or MSYS on Windows.

- A C compiler. The default is your system's "cc"; override the Makefile's
  CC variable if you need to (see "Variables" section below).

- Perl 5.x. Pretty much any version will do.

- rst2man. Only needed for regenerating the man pages.

- make. This can be GNU, BSD, makepp, or probably any other standard-ish
  make (anyone still using Solaris?).

The build deps aren't required at runtime. The executables only use
the standard C library (e.g. libc.so.6 on Linux), and can be statically
linked if you want (try 'LDFLAGS="-static"').

Building:

If you're experienced at building software from source, src/Makefile
should be self-explanatory.

If you're not experienced, you can start by extracting the source:

  tar xvf unalf-<ver>.tar.gz  # replace <ver> with the actual version!

Next, compile the software:

  make

If you're on Slackware:

  sudo make install    # or, as root, just 'make install'

This will install the binaries, man pages, and docs in locations
appropriate for Slackware Linux (since that's what the author uses).

If you're on a Debian or Ubuntu derivative, use:

  sudo make install MANDIR=/usr/share/man DOCDIR=/usr/share/doc/unalf

If you're on some other OS (Red Hat, *BSD, OSX, etc), ask someone
who actually uses that OS if you're not sure where things should be
installed to.

If you prefer /usr/local:

  sudo make install PREFIX=/usr/local MANDIR=/usr/local/share/man DOCDIR=/usr/local/share/doc/unalf

Variables:

You can set variables on the make command line. Example:

  make CC=clang COPT=-Os   # use a different compiler, optimize for size

See the top of src/Makefile for details on what variables exist and what
they're used for (not going to duplicate the list here).