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 \
|
|
23 testdebug.c timeconv.c timeconv.h w32pst.sln w32pst.vcproj
|
0
|
24
|
5
|
25 PROGS := lspst readpst readpstlog pst2ldif nick2ldif
|
|
26 ALL_PROGS := $(PROGS) dumpblocks getidblock testdebug
|
2
|
27
|
5
|
28 all: $(PROGS)
|
0
|
29
|
5
|
30 XGetopt.o: XGetopt.h
|
|
31 debug.o: define.h
|
|
32 dumpblocks.o: define.h
|
|
33 getidblock.o: XGetopt.h define.h libpst.h
|
|
34 libpst.o: define.h libstrfunc.h libpst.h timeconv.h
|
|
35 libstrfunc.o: libstrfunc.h
|
|
36 lspst.o: libpst.h timeconv.h
|
|
37 lzfu.o: define.h libpst.h lzfu.h
|
|
38 readpst.o: XGetopt.h libstrfunc.h define.h libpst.h common.h timeconv.h lzfu.h
|
|
39 pst2ldif.o: XGetopt.h libstrfunc.h define.h libpst.h common.h timeconv.h lzfu.h
|
|
40 nick2ldif.o: XGetopt.h libstrfunc.h define.h libpst.h common.h timeconv.h lzfu.h
|
|
41 readpstlog.o: XGetopt.h define.h
|
|
42 testdebug.o: define.h
|
|
43 timeconv.o: timeconv.h common.h
|
0
|
44
|
5
|
45 readpst: readpst.o libpst.o timeconv.o libstrfunc.o debug.o lzfu.o
|
|
46 lspst: debug.o libpst.o libstrfunc.o lspst.o timeconv.o
|
|
47 getidblock: getidblock.o libpst.o debug.o libstrfunc.o
|
|
48 testdebug: testdebug.o debug.o
|
|
49 readpstlog: readpstlog.o debug.o
|
|
50 dumpblocks: dumpblocks.o libpst.o debug.o libstrfunc.o
|
0
|
51
|
8
|
52 pst2ldif: pst2ldif.o libpst.o timeconv.o libstrfunc.o debug.o lzfu.o
|
|
53 g++ ${CFLAGS} pst2ldif.cpp -o pst2ldif libpst.o timeconv.o libstrfunc.o debug.o lzfu.o
|
|
54
|
7
|
55 nick2ldif: nick2ldif.o libpst.o timeconv.o libstrfunc.o debug.o lzfu.o
|
|
56 g++ ${CFLAGS} nick2ldif.cpp -o nick2ldif libpst.o timeconv.o libstrfunc.o debug.o lzfu.o
|
|
57
|
2
|
58 clean:
|
5
|
59 rm -f core *.o readpst.log $(ALL_PROGS) *~ MANIFEST
|
0
|
60
|
5
|
61 distclean: clean
|
|
62 rm -f libpst-*.tar.gz
|
0
|
63
|
|
64 install: all
|
5
|
65 $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/bin
|
|
66 $(INSTALL_PROGRAM) readpst{,log} $(DESTDIR)$(PREFIX)/bin
|
|
67 $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/man/man1
|
|
68 $(INSTALL_FILE) readpst{,log}.1 $(DESTDIR)$(PREFIX)/share/man/man1/
|
|
69 $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/doc/libpst
|
|
70 $(INSTALL_FILE) $(DOCS) $(DESTDIR)$(PREFIX)/share/doc/libpst/
|
|
71
|
0
|
72 uninstall:
|
5
|
73 -rm -f $(DESTDIR)$(PREFIX)/bin/readpst{,log}
|
|
74 -rm -f $(DESTDIR)$(PREFIX)/share/man/man1/readpst{,log}.1
|
|
75
|
|
76 # stolen from ESR's Software Release Practices HOWTO available at:
|
|
77 # http://en.tldp.org/HOWTO/Software-Release-Practice-HOWTO/distpractice.html
|
|
78 MANIFEST: Makefile
|
|
79 @ls $(DISTFILES) | sed s:^:libpst-$(VERSION)/: >MANIFEST
|
|
80 tarball libpst-$(VERSION).tar.gz: MANIFEST $(DISTFILES)
|
|
81 @(cd ..; ln -s libpst libpst-$(VERSION))
|
|
82 (cd ..; tar -czvf libpst/libpst-$(VERSION).tar.gz `cat libpst/MANIFEST`)
|
|
83 @(cd ..; rm libpst-$(VERSION))
|
|
84 @rm -f MANIFEST
|
|
85
|
|
86 .PHONY: clean distclean uninstall install tarball
|