comparison Makefile @ 5:3e9cea0af4a1

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