comparison src/Makefile.am @ 118:0f1492b7fe8b

patch from Fridrich Strba for building on mingw and general cleanup of autoconf files add processing for pst files of type 0x0f start adding support for properly building and installing libpst.so and the header files required to use it. remove version.h since the version number is now in config.h more const correctness issues regarding getopt()
author Carl Byington <carl@five-ten-sg.com>
date Sat, 31 Jan 2009 12:12:36 -0800
parents ff1743cbe4aa
children f50f4321aa2d
comparison
equal deleted inserted replaced
117:0a3d854b53f6 118:0f1492b7fe8b
1 hfiles = $(wildcard *.h) 1 if OS_WIN32
2 ICONVLIB = -liconv
3 else
4 ICONVLIB =
5 endif
6
7 if STATIC_TOOLS
8 PSTLIB=@PST_OBJDIR@/libpst.a
9 else
10 PSTLIB=libpst.la
11 endif
12
13 common_header = common.h \
14 define.h \
15 libpst.h \
16 libstrfunc.h \
17 lzfu.h \
18 timeconv.h \
19 vbuf.h
20
21 common_source = debug.c \
22 libpst.c \
23 libstrfunc.c \
24 lzfu.c \
25 timeconv.c \
26 vbuf.c
27
28 if NEED_XGETOPT
29 common_source += XGetopt.c
30 endif
31
32 noinst_PROGRAMS = deltasearch dumpblocks getidblock
2 bin_PROGRAMS = lspst readpst readpstlog pst2ldif 33 bin_PROGRAMS = lspst readpst readpstlog pst2ldif
3 if BUILD_DII 34 if BUILD_DII
4 bin_PROGRAMS += pst2dii 35 bin_PROGRAMS += pst2dii
5 endif 36 endif
6 noinst_PROGRAMS = deltasearch dumpblocks getidblock 37 lspst_SOURCES = lspst.c $(common_header)
38 readpst_SOURCES = readpst.c $(common_header)
39 readpstlog_SOURCES = readpstlog.c $(common_header)
40 pst2ldif_SOURCES = pst2ldif.cpp $(common_header)
41 pst2dii_SOURCES = pst2dii.cpp $(common_header)
42 deltasearch_SOURCES = deltasearch.cpp $(common_header)
43 dumpblocks_SOURCES = dumpblocks.c $(common_header)
44 getidblock_SOURCES = getidblock.c $(common_header)
7 45
8 lspst_SOURCES = $(hfiles) lspst.c libpst.c timeconv.c libstrfunc.c debug.c vbuf.c 46 lspst_CFLAGS = $(AM_CFLAGS)
9 readpst_SOURCES = $(hfiles) readpst.c libpst.c timeconv.c libstrfunc.c debug.c lzfu.c vbuf.c 47 readpst_CFLAGS = $(AM_CFLAGS)
10 readpstlog_SOURCES = $(hfiles) readpstlog.c debug.c 48 readpstlog_CFLAGS = $(AM_CFLAGS)
11 pst2ldif_SOURCES = $(hfiles) pst2ldif.cpp libpst.c timeconv.c libstrfunc.c debug.c lzfu.c vbuf.c 49 pst2ldif_CFLAGS = $(AM_CFLAGS)
12 pst2dii_SOURCES = $(hfiles) pst2dii.cpp libpst.c timeconv.c libstrfunc.c debug.c lzfu.c vbuf.c 50 pst2dii_CFLAGS = $(AM_CFLAGS)
13 deltasearch_SOURCES = deltasearch.cpp debug.c 51 deltasearch_CFLAGS = $(AM_CFLAGS)
14 dumpblocks_SOURCES = dumpblocks.c debug.c libpst.c libstrfunc.c timeconv.c vbuf.c 52 dumpblocks_CFLAGS = $(AM_CFLAGS)
15 getidblock_SOURCES = getidblock.c debug.c libpst.c libstrfunc.c timeconv.c vbuf.c 53 getidblock_CFLAGS = $(AM_CFLAGS)
16 54
17 if BUILD_LIBPST_SHARED 55 if STATIC_TOOLS
18 lspst_CFLAGS = $(AM_CFLAGS) 56 noinst_LTLIBRARIES = libpst.la
19 readpst_CFLAGS = $(AM_CFLAGS) 57 else
20 readpstlog_CFLAGS = $(AM_CFLAGS) 58 lib_LTLIBRARIES = libpst.la
21 pst2ldif_CFLAGS = $(AM_CFLAGS) 59 libpstincludedir = $(includedir)/libpst
22 pst2dii_CFLAGS = $(AM_CFLAGS) 60 libpstinclude_HEADERS = \
23 deltasearch_CFLAGS = $(AM_CFLAGS) 61 common.h \
24 dumpblocks_CFLAGS = $(AM_CFLAGS) 62 define.h \
25 getidblock_CFLAGS = $(AM_CFLAGS) 63 libpst.h \
26 lib_LTLIBRARIES = libpst.la 64 libstrfunc.h\
27 libpst_la_SOURCES = common.h \ 65 timeconv.h \
28 debug.c \ 66 vbuf.h
29 libpst.c \ 67 libpst_la_LDFLAGS = -no-undefined -version-info 1:0:0
30 libpst.h \
31 libstrfunc.c \
32 libstrfunc.h \
33 lspst.c \
34 timeconv.c \
35 timeconv.h \
36 vbuf.c \
37 vbuf.h \
38 version.h
39 libpst_la_LDFLAGS = -no-undefined
40 libpstincludedir = $(includedir)/libpst
41 libpstinclude_HEADERS = common.h \
42 define.h \
43 libpst.h \
44 libstrfunc.h \
45 timeconv.h \
46 vbuf.h \
47 version.h
48 endif 68 endif
49 69
50 if NEED_XGETOPT 70 libpst_la_SOURCES = $(common_source) $(common_header)
51 lspst_SOURCES += XGetopt.c 71 libpst_la_LIBADD = $(ICONVLIB)
52 readpst_SOURCES += XGetopt.c 72
53 readpstlog_SOURCES += XGetopt.c
54 pst2ldif_SOURCES += XGetopt.c
55 pst2dii_SOURCES += XGetopt.c
56 endif
57 73
58 EXTRA_DIST = testdebug.c 74 EXTRA_DIST = testdebug.c
59 75
60 # set the include path found by configure 76 # set the include path found by configure
61 INCLUDES= $(all_includes) 77 INCLUDES= $(all_includes)
62 78
63 # the library search path. 79 # the library search path.
64 lspst_LDFLAGS = $(all_libraries) 80 lspst_LDADD = $(all_libraries) $(PSTLIB) $(ICONVLIB)
65 readpst_LDFLAGS = $(all_libraries) 81 readpst_LDADD = $(all_libraries) $(PSTLIB) $(ICONVLIB)
66 readpstlog_LDFLAGS = $(all_libraries) 82 readpstlog_LDADD = $(all_libraries) $(PSTLIB) $(ICONVLIB)
67 pst2ldif_LDFLAGS = $(all_libraries) 83 pst2ldif_LDADD = $(all_libraries) $(PSTLIB) $(ICONVLIB)
68 pst2dii_LDFLAGS = $(all_libraries) -lgd -lpng -lz -lfreetype -lm 84 pst2dii_LDADD = $(all_libraries) $(PSTLIB) $(ICONVLIB) -lgd
69 85 dumpblocks_LDADD = $(all_libraries) $(PSTLIB) $(ICONVLIB)
86 getidblock_LDADD = $(all_libraries) $(PSTLIB) $(ICONVLIB)
87 deltasearch_LDADD = $(all_libraries) $(PSTLIB) $(ICONVLIB)