2 # Makefile for antiword (Linux version)
9 INSTALL_PROGRAM = $(INSTALL)
10 INSTALL_DATA = $(INSTALL)
12 # must be equal to DEBUG or NDEBUG
14 # Optimization: -O<n> or debugging: -g
19 CFLAGS = -Wall -pedantic $(OPT) -D$(DB)
23 main_u.o asc85enc.o blocklist.o chartrans.o datalist.o depot.o\
24 dib2eps.o doclist.o fail.o finddata.o findtext.o fmt_text.o fontlist.o\
25 fonts.o fonts_u.o hdrftrlist.o imgexam.o imgtrans.o jpeg2eps.o\
26 listlist.o misc.o notes.o options.o out2window.o output.o pdf.o\
27 pictlist.o png2eps.o postscript.o prop0.o prop2.o prop6.o prop8.o\
28 properties.o propmod.o rowlist.o sectlist.o stylelist.o stylesheet.o\
29 summary.o tabstop.o text.o unix.o utf8.o word2text.o worddos.o\
30 wordlib.o wordmac.o wordole.o wordwin.o xmalloc.o xml.o
36 LOCAL_INSTALL_DIR = $(HOME)/bin
37 LOCAL_RESOURCES_DIR = $(HOME)/.antiword
39 GLOBAL_INSTALL_DIR = /usr/local/bin
40 GLOBAL_RESOURCES_DIR = /usr/share/antiword
45 mkdir -p $(LOCAL_INSTALL_DIR)
46 cp -pf $(PROGS) $(LOCAL_INSTALL_DIR)
47 mkdir -p $(LOCAL_RESOURCES_DIR)
48 # cp -pf Resources/* $(LOCAL_RESOURCES_DIR)
50 # NOTE: you might have to be root to do this
52 # @[ `id -u` -eq 0 ] || (echo "You must be root to do this" && false)
53 mkdir -p $(DESTDIR)$(GLOBAL_INSTALL_DIR)
54 $(INSTALL_PROGRAM) $(PROGS) $(DESTDIR)$(GLOBAL_INSTALL_DIR)
55 cd $(DESTDIR)$(GLOBAL_INSTALL_DIR); chmod 755 $(PROGS)
56 mkdir -p $(DESTDIR)$(GLOBAL_RESOURCES_DIR)
57 chmod 755 $(DESTDIR)$(GLOBAL_RESOURCES_DIR)
58 $(INSTALL_DATA) Resources/*.txt $(DESTDIR)$(GLOBAL_RESOURCES_DIR)
59 $(INSTALL_DATA) Resources/fontnames $(DESTDIR)$(GLOBAL_RESOURCES_DIR)
60 cd $(DESTDIR)$(GLOBAL_RESOURCES_DIR); chmod 644 *.txt fontnames
62 # NOTE: you might have to be root to do this
64 # @[ `id -u` -eq 0 ] || (echo "You must be root to do this" && false)
65 cd $(DESTDIR)$(GLOBAL_INSTALL_DIR); rm -f $(PROGS)
66 -rmdir $(DESTDIR)$(GLOBAL_INSTALL_DIR)
67 cd $(DESTDIR)$(GLOBAL_RESOURCES_DIR); rm -f *.txt fontnames
68 -rmdir $(DESTDIR)$(GLOBAL_RESOURCES_DIR)
76 $(LD) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@
79 kantiword: Unix-only/KDE3-only/kantiword.sh
81 echo "#!/bin/bash" > $@
89 postscript.o: version.h
93 fontinfo.h: Unix-only/fontinfo.h
96 Unix-only/fontinfo.h: Unix-only/fontinfo.pl
97 Unix-only/fontinfo.pl > Unix-only/fontinfo.h