Debian Codegraph @

texk/cjkutils/cjkutils-src/hbf2gf/Makefile.gnu

raw
1 # This file is part of the CJK package Version 4.8.5 (16-Oct-2021)
2
3 # Copyright (C) 1994-2021 Werner Lemberg <[email protected]>
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program in doc/COPYING; if not, write to the Free
17 # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
18 # MA 02110-1301 USA
19
20 # GNU Makefile for hbf2gf
21
22 .PHONY: default all debug documentation clean \
23 do_all
24
25 .CAUTIOUS: hbf2gf.c
26
27 default:
28 @echo " say "
29 @echo ". "
30 @echo " make TARGET OS=SYSTEM "
31 @echo ". "
32 @echo " SYSTEM can be one of the following: "
33 @echo ". "
34 @echo " os2 bound (emx) "
35 @echo " dos (djgpp) "
36 @echo ". "
37 @echo " TARGET can be one of the following: "
38 @echo ". "
39 @echo " all debug "
40 @echo " documentation (needs cweave package)"
41 @echo " clean "
42
43 ifdef OS
44
45 # default values (bound executables built with emx)
46 FS = msdos
47 CC = gcc -Wall -O -DHAVE_EMTEXDIR
48 LIB =
49 O = .o
50 EXE = .exe
51 RM = del
52
53 ifeq ($(OS),os2)
54 FS = msdos
55 CC = gcc -Wall -Zomf -Zmtd -O -DHAVE_EMTEXDIR
56 LIB = hbf2gf.def
57 O = .obj
58 EXE = .exe
59 RM = del
60 endif
61
62 ifeq ($(OS),dos)
63 FS = msdos
64 CC = gcc -Wall -O -DHAVE_EMTEXDIR
65 LIB =
66 O = .o
67 EXE = .exe
68 RM = del
69 endif
70
71
72 %$O: %.c
73 $(CC) $(CFLAGS) -c -D$(FS) -o $@ $<
74
75 %.c: %.w %.ch
76 $(CTANGLE) $^ $@
77 %.c: %.w
78 $(CTANGLE) $<
79
80 %.tex: %.w %.ch
81 $(CWEAVE) +ai $^ $@
82 %.tex: %.w
83 $(CWEAVE) +ai $<
84
85 %.dvi: %.tex
86 $(TEX) $*
87
88
89 all:
90 $(MAKE) -f Makefile.gnu do_all CFLAGS=-s
91
92 debug:
93 $(MAKE) -f Makefile.gnu do_all CFLAGS=-g
94
95 # this builds the .dvi-file
96 documentation: hbf2gf.dvi
97
98 # remove the unnecessary files;
99 clean:
100 -$(RM) *.scn
101 -$(RM) *.toc
102 -$(RM) *.idx
103 -$(RM) *.log
104 -$(RM) *.o
105
106
107 do_all: hbf2gf$(EXE)
108
109 hbf2gf$(EXE): hbf2gf$O hbf$O emdir$O emtexdir$O
110 ifeq ($(OS),dos)
111 $(CC) $(CFLAGS) -o $(basename $@) $^
112 strip $(basename $@)
113 coff2exe $(basename $@)
114 -del $(basename $@)
115 else
116 $(CC) $(CFLAGS) -o $@ $^ $(LIB)
117 endif
118
119 hbf$O: hbf.c hbf.h
120 emdir$O: emdir.c emdir.h
121 emtexdir$O: emtexdir.c emtexdir.h emdir.h
122
123 else # ifdef OS
124
125 all debug documentation clean: default
126
127 endif