xref: /freebsd/contrib/unifdef/INSTALL (revision fb3ef04d2028110f06d68b09009f1f2ca0f4128e)
1*fb3ef04dSDag-Erling Smørgravunifdef installation instructions
2*fb3ef04dSDag-Erling Smørgrav---------------------------------
3*fb3ef04dSDag-Erling Smørgrav
4*fb3ef04dSDag-Erling SmørgravDependencies:
5*fb3ef04dSDag-Erling Smørgrav * unifdef is mostly ANSI C, with a few unixisms
6*fb3ef04dSDag-Erling Smørgrav * unifdefall is a Unix shell script
7*fb3ef04dSDag-Erling Smørgrav * the manual uses the nroff mdoc macros
8*fb3ef04dSDag-Erling Smørgrav * the support and test scripts are Unix shell scripts
9*fb3ef04dSDag-Erling Smørgrav
10*fb3ef04dSDag-Erling SmørgravTo build on Unix, type `make`. You can adjust the compilation options
11*fb3ef04dSDag-Erling Smørgravusing the POSIX standard CFLAGS and LDFLAGS make variables.
12*fb3ef04dSDag-Erling Smørgrav
13*fb3ef04dSDag-Erling SmørgravTo install in your home directory, type `make install`
14*fb3ef04dSDag-Erling Smørgravor to install in /usr type `make prefix=/usr install`.
15*fb3ef04dSDag-Erling SmørgravSee the start of the Makefile for the install location
16*fb3ef04dSDag-Erling Smørgravvariables.
17*fb3ef04dSDag-Erling Smørgrav
18*fb3ef04dSDag-Erling SmørgravThe win32 subdirectory contains build files for MinGW and Visual
19*fb3ef04dSDag-Erling SmørgravStudio 2010 which make use of the FreeBSD code plus some other
20*fb3ef04dSDag-Erling Smørgravportability wrappers.
21*fb3ef04dSDag-Erling Smørgrav
22*fb3ef04dSDag-Erling SmørgravTo build with MinGW, type `mingw32-make -f win32/Makefile.mingw`.
23*fb3ef04dSDag-Erling Smørgrav
24*fb3ef04dSDag-Erling SmørgravUnlike the Unix Makefile, the Windows builds do not automatically
25*fb3ef04dSDag-Erling Smørgravcreate or update version.h. The release tar and zip files include a
26*fb3ef04dSDag-Erling Smørgravpre-generated version.h but the git repository does not. To build from
27*fb3ef04dSDag-Erling Smørgrava git clone you need a Unix shell environment, which you can get as
28*fb3ef04dSDag-Erling Smørgravpart of GitHub for Windows - http://windows.github.com/
29*fb3ef04dSDag-Erling SmørgravTo update version.h, right-click on the fanf2/unifdef repository and
30*fb3ef04dSDag-Erling Smørgravselect "open a shell here", then type `sh scripts\reversion.sh`.
31*fb3ef04dSDag-Erling Smørgrav
32*fb3ef04dSDag-Erling SmørgravWe assume Unix provides the BSD err.h functions and C99 stdbool.h. The
33*fb3ef04dSDag-Erling SmørgravFreeBSD subdirectory has copies of err.c and getopt.c for systems such
34*fb3ef04dSDag-Erling Smørgravas Windows that don't have them built in.
35*fb3ef04dSDag-Erling Smørgrav
36*fb3ef04dSDag-Erling Smørgrav- end -
37