]> Pileus Git - ~andy/fetchmail/blob - trio/Makefile
Import Trio 1.10 into fetchmail's trunk.
[~andy/fetchmail] / trio / Makefile
1 # Generated automatically from Makefile.in by configure.
2 CC      = gcc
3 CFLAGS  = -g -O2 -DDEBUG
4 OBJS    = triostr.o trio.o trionan.o
5 TARGETLIB       = libtrio.a
6 TARGETINCS      = trio.h triop.h triodef.h trionan.h triostr.h
7 LDFLAGS = -L. -ltrio -lm
8 AR      = ar
9 RANLIB  = ranlib
10 ERASE   = rm -f
11 MKDIR   = mkdir -p
12 GENDOC  = doxygen
13
14 PURIFY = purify
15 PURIFYOPTIONS = -chain-length=16 -first-only=YES
16
17 # Installation settings
18 INSTALL         = /usr/bin/install -c
19 INSTALL_DATA    = ${INSTALL} -m 644
20 prefix          = /usr/local
21 exec_prefix     = ${prefix}
22 includedir      = ${prefix}/include
23 libdir          = ${exec_prefix}/lib
24
25 all: $(TARGETLIB) $(TARGET) regression
26
27 test:
28         ./regression
29
30 install:        $(TARGETLIB)
31         $(MKDIR) $(libdir)
32         $(MKDIR) $(includedir)
33         $(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB)
34         for i in $(TARGET_INCS);do \
35         (set -x;$(INSTALL_DATA) $$i $(includedir)); \
36         done
37
38 pure: $(TOBJS) $(OBJS)
39         $(PURIFY) $(PURIFYOPTIONS) $(CC) $(CFLAGS) $^ $(LDFLAGS)
40
41 regression: regression.o $(TARGETLIB)
42         $(CC) $(CFLAGS) regression.o $(LDFLAGS) -o $@
43
44 example: example.o $(TARGETLIB)
45         $(CC) $(CFLAGS) example.o $(LDFLAGS) -o $@
46
47 compare: compare.o $(TARGETLIB)
48         $(CC) $(CFLAGS) compare.o $(LDFLAGS) -o $@
49
50 userdef: userdef.o $(TARGETLIB)
51         $(CC) $(CFLAGS) userdef.o $(LDFLAGS) -o $@
52
53 $(TARGETLIB): $(OBJS)
54         $(AR) ruv $(TARGETLIB) $(OBJS)
55         $(RANLIB) $(TARGETLIB)
56
57 doc::
58         $(GENDOC) doc/trio.cfg
59
60 clean:
61         $(ERASE) *~ core regression example $(TOBJS) $(OBJS) $(TARGET) $(TARGETLIB) example.o regression.o