]> begriffs open source - libtap/blob - INSTALL
Add color text
[libtap] / INSTALL
1 To install libtap on a unix-like system:
2
3     $ make
4     $ make check
5     $ make install
6
7 Note that `make check` runs a perl unit test. It makes use of
8 diff(1), so if you run it, make sure you have those tools installed
9 first. To compile with gcc -ansi, run
10
11     $ make ANSI=1
12
13 To install to a different directory than /usr/local, supply the
14 PREFIX variable to make:
15
16     $ make PREFIX=/usr install
17
18 On Windows, the library can be created by first setting up
19 the correct development environment variables. Usually this
20 is done by running vcvars32.bat included in the visual studio
21 distribution. You should also install gnu make which can be
22 found at http://gnuwin32.sourceforge.net/packages/make.htm.
23 And you should have perl to run the tests although this isn't
24 absolutely necessary. Once this is done, you should be able to
25 run the following:
26
27     > make -f Makefile.win
28     > make check
29
30 If you want to use it directly in another project, you can copy tap.c
31 and tap.h there and it shouldn't have a problem compiling.
32
33     $ ls
34     tap.c tap.h test.c
35     $ cat test.c
36     #include "tap.h"
37     int main () {
38         plan(1);
39         ok(50 + 5, "foo %s", "bar");
40         done_testing();
41     }
42     $ gcc test.c tap.c
43     $ a.out
44     1..1
45     ok 1 - foo bar
46