5
|
1 #!/usr/bin/make -f
|
0
|
2
|
5
|
3 CFLAGS ?= -g -Wall
|
|
4 PREFIX ?= /usr/local
|
|
5 INSTALL ?= install
|
0
|
6
|
5
|
7 #---------------- Do not modify below this point ------------------
|
0
|
8
|
5
|
9 INSTALL_DIR := $(INSTALL) -p -d -o root -g root -m 0755
|
|
10 INSTALL_FILE := $(INSTALL) -p -o root -g root -m 0644
|
|
11 INSTALL_PROGRAM := $(INSTALL) -p -o root -g root -m 0755 # -s
|
|
12 INSTALL_SCRIPT := $(INSTALL) -p -o root -g root -m 0755
|
|
13
|
|
14 VERSION = $(shell cat VERSION)
|
0
|
15
|
5
|
16 DOCS := AUTHORS ChangeLog CREDITS FILE-FORMAT FILE-FORMAT.html LICENSE TODO \
|
|
17 VERSION
|
0
|
18
|
5
|
19 DISTFILES := $(DOCS) Makefile setup1.vdproj XGetopt.c XGetopt.h common.h \
|
|
20 debug.c define.h dumpblocks.c getidblock.c libpst.c libpst.h \
|
|
21 libstrfunc.c libstrfunc.h lspst.c lzfu.c lzfu.h moz-script \
|
|
22 readlog.vcproj readpst.1 readpst.c readpstlog.1 readpstlog.c \
|
11
|
23 testdebug.c timeconv.c timeconv.h w32pst.sln w32pst.vcproj \
|
|
24 nick2ldif.cpp pst2ldif.cpp
|
0
|
25
|
5
|
26 PROGS := lspst readpst readpstlog pst2ldif nick2ldif
|
|
27 ALL_PROGS := $(PROGS) dumpblocks getidblock testdebug
|
2
|
28
|
5
|
29 all: $(PROGS)
|
0
|
30
|
5
|
31 XGetopt.o: XGetopt.h
|
|
32 debug.o: define.h
|
|
33 dumpblocks.o: define.h
|
|
34 getidblock.o: XGetopt.h define.h libpst.h
|
|
35 libpst.o: define.h libstrfunc.h libpst.h timeconv.h
|
|
36 libstrfunc.o: libstrfunc.h
|
|
37 lspst.o: libpst.h timeconv.h
|
|
38 lzfu.o: define.h libpst.h lzfu.h
|
|
39 readpst.o: XGetopt.h libstrfunc.h define.h libpst.h common.h timeconv.h lzfu.h
|
|
40 pst2ldif.o: XGetopt.h libstrfunc.h define.h libpst.h common.h timeconv.h lzfu.h
|
|
41 nick2ldif.o: XGetopt.h libstrfunc.h define.h libpst.h common.h timeconv.h lzfu.h
|
|
42 readpstlog.o: XGetopt.h define.h
|
|
43 testdebug.o: define.h
|
|
44 timeconv.o: timeconv.h common.h
|
0
|
45
|
5
|
46 readpst: readpst.o libpst.o timeconv.o libstrfunc.o debug.o lzfu.o
|
|
47 lspst: debug.o libpst.o libstrfunc.o lspst.o timeconv.o
|
|
48 getidblock: getidblock.o libpst.o debug.o libstrfunc.o
|
|
49 testdebug: testdebug.o debug.o
|
|
50 readpstlog: readpstlog.o debug.o
|
|
51 dumpblocks: dumpblocks.o libpst.o debug.o libstrfunc.o
|
0
|
52
|
8
|
53 pst2ldif: pst2ldif.o libpst.o timeconv.o libstrfunc.o debug.o lzfu.o
|
|
54 g++ ${CFLAGS} pst2ldif.cpp -o pst2ldif libpst.o timeconv.o libstrfunc.o debug.o lzfu.o
|
|
55
|
7
|
56 nick2ldif: nick2ldif.o libpst.o timeconv.o libstrfunc.o debug.o lzfu.o
|
|
57 g++ ${CFLAGS} nick2ldif.cpp -o nick2ldif libpst.o timeconv.o libstrfunc.o debug.o lzfu.o
|
|
58
|
2
|
59 clean:
|
5
|
60 rm -f core *.o readpst.log $(ALL_PROGS) *~ MANIFEST
|
0
|
61
|
5
|
62 distclean: clean
|
|
63 rm -f libpst-*.tar.gz
|
0
|
64
|
|
65 install: all
|
5
|
66 $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/bin
|
|
67 $(INSTALL_PROGRAM) readpst{,log} $(DESTDIR)$(PREFIX)/bin
|
|
68 $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/man/man1
|
|
69 $(INSTALL_FILE) readpst{,log}.1 $(DESTDIR)$(PREFIX)/share/man/man1/
|
|
70 $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/doc/libpst
|
|
71 $(INSTALL_FILE) $(DOCS) $(DESTDIR)$(PREFIX)/share/doc/libpst/
|
|
72
|
0
|
73 uninstall:
|
5
|
74 -rm -f $(DESTDIR)$(PREFIX)/bin/readpst{,log}
|
|
75 -rm -f $(DESTDIR)$(PREFIX)/share/man/man1/readpst{,log}.1
|
|
76
|
|
77 # stolen from ESR's Software Release Practices HOWTO available at:
|
|
78 # http://en.tldp.org/HOWTO/Software-Release-Practice-HOWTO/distpractice.html
|
|
79 MANIFEST: Makefile
|
|
80 @ls $(DISTFILES) | sed s:^:libpst-$(VERSION)/: >MANIFEST
|
|
81 tarball libpst-$(VERSION).tar.gz: MANIFEST $(DISTFILES)
|
|
82 @(cd ..; ln -s libpst libpst-$(VERSION))
|
|
83 (cd ..; tar -czvf libpst/libpst-$(VERSION).tar.gz `cat libpst/MANIFEST`)
|
|
84 @(cd ..; rm libpst-$(VERSION))
|
|
85 @rm -f MANIFEST
|
|
86
|
|
87 .PHONY: clean distclean uninstall install tarball
|