• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Received: from 128.84.254.220 by ee.lbl.gov for <vern@ee.lbl.gov> (8.6.8.1/1.43r)
2	id PAA27266; Mon, 18 Apr 1994 15:08:26 -0700
3Received: from CLOYD.CS.CORNELL.EDU by thialfi.cs.cornell.edu (5.67/I-1.99E)
4	id AA28742; Mon, 18 Apr 94 18:08:14 -0400
5Received: from iraun1.ira.uka.de by cloyd.cs.cornell.edu (5.67/I-1.99D)
6	id AA19613; Mon, 18 Apr 94 18:08:19 -0400
7Received: from t500i2.telematik.informatik. (actually t500i2.telematik.informatik.uni-karlsruhe.de)
8          by iraun1.ira.uka.de with SMTP (PP); Tue, 19 Apr 1994 00:07:55 +0200
9Received: by t500i2.telematik.informatik.uni-karlsruhe.de (5.57/Ultrix3.0-C)
10          id AA10269; Tue, 19 Apr 94 00:09:14 +0200
11From: beigl@t500i2.telematik.informatik.uni-karlsruhe.de (Michael Beigl)
12Message-Id: <9404182209.AA10269@t500i2.telematik.informatik.uni-karlsruhe.de>
13Subject: Makefile-TurboC
14To: vern@cs.cornell.edu
15Date: Tue, 19 Apr 1994 00:09:13 +0200 (MET DST)
16X-Mailer: ELM [version 2.4 PL22]
17Mime-Version: 1.0
18Content-Type: text/plain; charset=US-ASCII
19Content-Transfer-Encoding: 7bit
20Content-Length: 2739
21
22Hello
23
24Here are some additional adjustments to my Makefile. I was using "pure" DOS
25and an old Turbo C++ 1.0 version, so I had some problems with systemtools
26like mv etc. and problems with variables in my Makefile.
27
28Now follows my Makefile
29############################################################################
30# make file for "flex" tool
31
32# @(#) $Header: Makefile,v 2.3 89/06/20 17:27:12 vern Exp $ (LBL)
33
34# Porting considerations:
35#
36#    For BSD machines:
37#  CFLAGS =
38#  LDFLAGS = -s
39#  LINK = $(CC) $(CFLAGS) -o flex $(LDFLAGS) $(FLEXOBJS)
40#  SKELETON_DIR = .
41#  SKELETON_FILE = flex.skel
42#  SKELFLAGS = -DDEFAULT_SKELETON_FILE=\"$(SKELETON_DIR)/$(SKELETON_FILE)\"
43#  O = o
44#  YTAB = y.tab
45#  FLEX = ./flex
46#
47#    For System V Unix or Vax/VMS machines, merely add:
48#  CFLAGS = -DSYS_V
49#
50#    For MS-DOS, Turbo C:
51CC = tcc
52# -2+ 286 Options
53CFLAGS = -DSYS_V -DMS_DOS -O -G -Z -ml -v -2
54# /3 enable 32 bit processing
55# /ye expanded memory swapping
56# /yx extended memory swapping
57LINK = tlink @flex.lnk/c/x/v/3/ye
58SKELETON_DIR = .
59SKELETON_FILE = flex.skl
60SKELFLAGS = -DDEFAULT_SKELETON_FILE="$(SKELETON_DIR)/$(SKELETON_FILE)"
61O = obj
62EXE = .exe
63YTAB = y_tab
64FLEX = flex
65YACC = /yacc/byacc
66
67#
68# the first time around use "make first_flex"
69#
70
71FLEX_FLAGS =
72
73FLEXOBJS = \
74	ccl.$O \
75	dfa.$O \
76	ecs.$O \
77	gen.$O \
78	main.$O \
79	misc.$O \
80	nfa.$O \
81	parse.$O \
82	scan.$O \
83	sym.$O \
84	tblcmp.$O \
85	yylex.$O
86
87FLEX_C_SOURCES = \
88	ccl.c \
89	dfa.c \
90	ecs.c \
91	gen.c \
92	main.c \
93	misc.c \
94	nfa.c \
95	parse.c \
96	scan.c \
97	sym.c \
98	tblcmp.c \
99	yylex.c
100
101FLEX_C_SOURCES_1 = \
102	ccl.c \
103	dfa.c \
104	ecs.c \
105	gen.c \
106	main.c \
107	misc.c
108
109FLEX_C_SOURCES_2 = \
110	nfa.c \
111	parse.c \
112	scan.c \
113	sym.c \
114	tblcmp.c \
115	yylex.c
116
117flex.exe: $(FLEXOBJS)
118	$(LINK)
119
120
121flex: $(FLEX_C_SOURCES)
122	$(CC) $(CFLAGS) -c $(SKELFLAGS) $(FLEX_C_SOURCES_1)
123	$(CC) $(CFLAGS) -c $(SKELFLAGS) $(FLEX_C_SOURCES_2)
124	$(LINK)
125
126
127first_flex:
128	copy initscan.c scan.c
129	$(MAKE) flex
130
131parse.h parse.c: parse.y
132	$(YACC) -d parse.y
133	@rename $(YTAB).c parse.c
134	@rename $(YTAB).h parse.h
135
136scan.c: scan.l
137	$(FLEX) -ist $(FLEX_FLAGS) scan.l >scan.c
138
139scan.$O: scan.c parse.h
140
141main.$O: main.c
142	$(CC) $(CFLAGS) -c $(SKELFLAGS) main.c
143
144flex.man: flex.1
145	nroff -man flex.1 >flex.man
146
147lint: $(FLEX_C_SOURCES)
148	lint $(FLEX_C_SOURCES) > flex.lint
149
150distrib:
151	rename scan.c initscan.c
152	attrib +R -A -H -S initscan.c
153	$(MAKE) clean
154
155clean:
156	del *.obj
157	del *.lint
158	del core
159	del errs
160	del flex.exe
161	del parse.c
162	del parse.h
163	del flex.man
164	del tags
165
166tags:
167	ctags $(FLEX_C_SOURCES)
168
169vms:	flex.man
170	$(MAKE) distrib
171
172test:
173	$(FLEX) -ist $(FLEX_FLAGS) scan.l | diff scan.c -
174
175############################################################################
176
177I think this Makefile will help some other simple DOS user
178
179	M. Beigl
180