summaryrefslogtreecommitdiff
path: root/obsolete/support/detex/os2/makefile.os2
blob: daf50a0b7b5084940c9522b8e3d0ca84f6b11bea (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
# Makefile for "detex" (tested with dmake 3.8)                 22 July 1993
#
# - for GNU gcc (emx 0.8g kit) under OS/2 (32-bit)
# - for Microsoft C 6.00 under OS/2 or MSDOS (16-bit)

# To use, enter "{d,n}make -f makefile.os2" (this makefile depends on its
# name being "makefile.os2").

default:
	@echo Enter "$(MAKE) -f makefile.os2 emx"
	@echo Enter "$(MAKE) -f makefile.os2 emxbnd"
	@echo    or "$(MAKE) -f makefile.os2 msc"
	@echo    or "$(MAKE) -f makefile.os2 mscbnd"

# See the original Makefile for a complete list of options.
#
# Add -DMAXPATHLEN=<length> if it is not defined in /usr/include/sys/param.h
#
#MAXPATHLEN = -DMAXPATHLEN=1024
#
# Add -DNO_MALLOC_DECL if your system does not like the malloc() declaration
# in detex.l (reported by pinard@iro.umontreal.ca)
#
NO_MALLOC_DECL = -DNO_MALLOC_DECL
#

emx:
	$(MAKE) -f makefile.os2 all \
	CC="gcc -Zomf -Zmtd" O=".obj" \
	CF="" \
	LDFLAGS="" \
	LDFLAGS2="" \
	DEF="detex-32.def"

emxbnd:
	$(MAKE) -f makefile.os2 all \
	CC="gcc" O=".o" \
	CF="" \
	LDFLAGS="" \
	LDFLAGS2="" \
	DEF="detex-32.def"

msc:
	$(MAKE) -f makefile.os2 all \
	CC="cl -AS " O=".obj" \
	CF="-D__STDC__ -DMAXPATHLEN=1024" \
	LDFLAGS="-Lp" \
	LDFLAGS2="setargv.obj -link /NOE" \
	DEF="detex.def"

mscbnd:
	$(MAKE) -f makefile.os2 all \
	CC="cl -AS " O=".obj" \
	CF="-D__STDC__ -DMAXPATHLEN=1024" \
	LDFLAGS="-Lp -Fb" \
	LDFLAGS2="setargv.obj -link /NOE" \
	DEF="detex.def"


CFLAGS = $(CF) -DOS2 -DHAVE_STRING_H $(NO_MALLOC_DECL) -DNOFILE=99

.c$O :
	$(CC) $(CFLAGS) -c $<

all : detex.exe

detex.exe : detex$O $(DEF)
		$(CC) $(LDFLAGS) -o $@ $< $(LDFLAGS2)


# Use your favorite lexical scanner
#
# flex buffered input causes problems--see flexdoc.man.
LEX	= lex
LEX_YY = lex.yy
#LEX	= flex
#LEX_YY = lexyy

#LFLAGS	= -8 -C

CP = cp
FMT_CMD = groff -man

# lexout.c obtained from lex output on sparc. 

#detex.c:
#	sed -f states.sed detex.l | ${LEX} ${LFLAGS}
#	mv $(LEX_YY).c detex.c

detex.c : lexout.c
	$(CP) $< $@

man-page:
	$(FMT_CMD) detex.1l

detex$O : detex.h