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