]> begriffs open source - libtap/blob - INSTALL
Add autotools support
[libtap] / INSTALL
1 To install libtap on a unix-like system you have two ways:
2
3 Use Makefile:
4
5     $ make -fMakefile.simple
6     $ make -fMakefile.simple check
7     $ make -fMakefile.siple install
8
9 To compile with gcc -ansi, run
10
11     $ make ANSI=1 -fMakefile.simple
12
13 Use autotools:
14
15         $ autoreconf -i
16         $ ./configure
17         $ make
18         $ make install
19
20 On Windows, the library can be created by first setting up
21 the correct development environment variables. Usually this
22 is done by running vcvars32.bat included in the visual studio
23 distribution. You should also install gnu make which can be
24 found at http://gnuwin32.sourceforge.net/packages/make.htm.
25 And you should have perl to run the tests although this isnt
26 absolutely necessary. Once this is done, you should be able to
27 run the following:
28
29     > make -f Makefile.win
30     > make check
31
32 Alternatively, you might want to use the visual studio project file
33 included by Alexander Kahl (e-user).
34
35 If you want to use it directly in another project, you can copy tap.c
36 and tap.h there and it shouldn't have a problem compiling.
37
38     $ ls
39     tap.c tap.h test.c
40     $ cat test.c
41     #include "tap.h"
42     int main () {
43         plan(1);
44         ok(50 + 5, "foo %s", "bar");
45         done_testing();
46     }
47     $ gcc test.c tap.c
48     $ a.out
49     1..1
50     ok 1 - foo bar
51