1 | # |
---|
2 | # Makefile for gsftopk. |
---|
3 | # |
---|
4 | |
---|
5 | ### Please set the following paths. |
---|
6 | TEXMF=/usr/local/lib/texmf |
---|
7 | |
---|
8 | # The following three should be as in dvips. |
---|
9 | HEADERDIR=$(TEXMF)/dvips |
---|
10 | HEADERPATH=.:$(HEADERDIR) |
---|
11 | CONFIGPATH=.:$(TEXMF)/dvips |
---|
12 | |
---|
13 | # The following should be as in TeX. |
---|
14 | TEXFONTS_DEFAULT=.:$(TEXMF)/fonts/tfm// |
---|
15 | |
---|
16 | # Where to put things. |
---|
17 | BINDIR=$(TEXMF)/bin |
---|
18 | MANDIR=$(TEXMF)/man/man1 |
---|
19 | |
---|
20 | # (Optional) The fully-qualified path of Ghostscript. |
---|
21 | # GSPATH=-DGS=\"/usr/local/gnu/bin/gs\" |
---|
22 | |
---|
23 | # (Optional) Other definitions |
---|
24 | # OLD_DVIPS - define if you have an old version of dvips that uses psfonts.map |
---|
25 | # entries of the form |
---|
26 | # Symbol-Slanted "/Symbol .167 SlantFont" |
---|
27 | # as opposed to |
---|
28 | # Symbol-Slanted Symbol ".167 SlantFont" |
---|
29 | # DEFS= |
---|
30 | |
---|
31 | ### End of user-edited part. |
---|
32 | |
---|
33 | # CC=gcc |
---|
34 | # LINT=gcc -c -Wall -Wshadow -Wpointer-arith -Dlint |
---|
35 | # also maybe -Wcast-qual -Wwrite-strings |
---|
36 | RM=rm -f |
---|
37 | INSTPGMMODE=755 |
---|
38 | INSTDATMODE=644 |
---|
39 | INSTMANMODE=644 |
---|
40 | |
---|
41 | CFLAGS=-O -DCONFIGPATH=\"$(CONFIGPATH)\" -DHEADERPATH=\"$(HEADERPATH)\" \ |
---|
42 | -DTEXFONTS_DEFAULT=\"$(TEXFONTS_DEFAULT)\" $(GSPATH) $(DEFS) |
---|
43 | |
---|
44 | default: gsftopk gsftopk.1 |
---|
45 | |
---|
46 | hpux: |
---|
47 | $(MAKE) CC='c89 -D_POSIX_SOURCE' |
---|
48 | |
---|
49 | gsftopk: gsftopk.c config.h |
---|
50 | $(CC) -o gsftopk $(CFLAGS) gsftopk.c |
---|
51 | |
---|
52 | config.h: Configure |
---|
53 | ./Configure $(CC) $(CFLAGS) |
---|
54 | |
---|
55 | gsftopk.1: gsftopk1.sed sedscript |
---|
56 | sed -f sedscript <gsftopk1.sed >$@ |
---|
57 | |
---|
58 | sedscript: mksedscript Makefile |
---|
59 | chmod u+x mksedscript |
---|
60 | ./mksedscript $(DEFS) >$@ |
---|
61 | |
---|
62 | install: gsftopk gsftopk.1 |
---|
63 | cp gsftopk $(BINDIR) |
---|
64 | chmod $(INSTPGMMODE) $(BINDIR)/gsftopk |
---|
65 | cp render.ps $(HEADERDIR) |
---|
66 | chmod $(INSTDATMODE) $(HEADERDIR)/render.ps |
---|
67 | cp gsftopk.1 $(MANDIR) |
---|
68 | chmod $(INSTMANMODE) $(MANDIR)/gsftopk.1 |
---|
69 | |
---|
70 | uninstall: |
---|
71 | -$(RM) $(BINDIR)/gsftopk $(HEADERDIR)/render.ps $(MANDIR)/gsftopk.1 |
---|
72 | |
---|
73 | lint: |
---|
74 | $(LINT) $(CFLAGS) gsftopk.c |
---|
75 | |
---|
76 | TAGS: $(srcs) |
---|
77 | etags $(srcs) |
---|
78 | |
---|
79 | clean: |
---|
80 | -$(RM) *.o gsftopk gsftopk.1 sedscript core *~ |
---|
81 | |
---|
82 | mostlyclean: clean |
---|
83 | |
---|
84 | distclean: clean |
---|
85 | -$(RM) config.h |
---|
86 | |
---|
87 | veryclean: distclean |
---|
88 | -$(RM) TAGS |
---|
89 | |
---|
90 | realclean: distclean |
---|
91 | -$(RM) TAGS |
---|