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