1# /****************************************************************
2# Copyright (C) 1997-2001 Lucent Technologies
3# All Rights Reserved
4#
5# Permission to use, copy, modify, and distribute this software and
6# its documentation for any purpose and without fee is hereby
7# granted, provided that the above copyright notice appear in all
8# copies and that both that the copyright notice and this
9# permission notice and warranty disclaimer appear in supporting
10# documentation, and that the name of Lucent or any of its entities
11# not be used in advertising or publicity pertaining to
12# distribution of the software without specific, written prior
13# permission.
14#
15# LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
17# IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
18# SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
20# IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
21# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
22# THIS SOFTWARE.
23# ****************************************************************/
24
25# For making amplsolv.lib with Symantec 7.x .
26
27# Invoke with "make -f makefile.sy" .
28
29# This is for NT console applications; for DOS,
30# change "-mn" to "-mx" in the CFLAGS assignment,
31# change "-DWIN32" to "-DNO_FUNCADD" in the funcadd1.obj rule below,
32# and change fpinitmt.obj to fpinit.obj in the "a =..." assignment.
33
34CC = sc
35CFLAGS = -s -mn -DSYMANTEC
36
37.c.obj:
38	$(CC) -c $(CFLAGS) $*.c
39
40all: arith.h stdio1.h amplsolv.lib funcadd0.obj
41
42a = \
43	asldate.obj \
44	atof.obj \
45	auxinfo.obj \
46	avldelete.obj \
47	avltree.obj \
48	b_search.obj \
49	basename.obj \
50	bscanf.obj \
51	com2eval.obj \
52	comeval.obj \
53	con1ival.obj \
54	con2ival.obj \
55	con2val.obj \
56	conadj.obj \
57	conpval.obj \
58	conscale.obj \
59	conval.obj \
60	derprop.obj \
61	details.obj \
62	dtoa1.obj \
63	duthes.obj \
64	dynlink.obj \
65	f_read.obj \
66	fg_read.obj \
67	fg_write.obj \
68	fgh_read.obj \
69	fpecatch.obj \
70	fpinitmt.obj \
71	fullhes.obj \
72	func_add.obj \
73	funcadd1.obj \
74	g_fmt.obj \
75	genrowno.obj \
76	getenv.obj \
77	getstub.obj \
78	htcl.obj \
79	jac0dim.obj \
80	jac2dim.obj \
81	jacdim.obj \
82	jacinc.obj \
83	jacinc1.obj \
84	mach.obj \
85	mainexit.obj \
86	mip_pri.obj \
87	misc.obj \
88	mypow.obj \
89	names.obj \
90	nl_obj.obj \
91	nqpcheck.obj \
92	obj2val.obj \
93	obj_prec.obj \
94	objconst.obj \
95	objval.obj \
96	objval_.obj \
97	op_type.obj \
98	pfg_read.obj \
99	pfghread.obj \
100	printf.obj \
101	pshvprod.obj \
102	punknown.obj \
103	qp_read.obj \
104	qpcheck.obj \
105	qsortv.obj \
106	readsol.obj \
107	repwhere.obj \
108	rops.obj \
109	rops2.obj \
110	sigcatch.obj \
111	sos_add.obj \
112	sphes.obj \
113	sscanf.obj \
114	stderr.obj \
115	studchk0.obj \
116	suf_sos.obj \
117	value.obj \
118	writesol.obj \
119	wrtsol_.obj \
120	ws_desc.obj \
121	wsu_desc.obj \
122	x2check.obj \
123	xectim.obj \
124	xp1known.obj \
125	xp2known.obj
126
127amplsolv.lib: $a
128	lib /B /C amplsolv.lib @amplsolv.sy
129
130xectim.obj: xectim.c
131	$(CC) -c $(CFLAGS) -D__STDC__ -DNO_RUSAGE xectim.c
132
133Aslh = arith.h asl.h funcadd.h stdio1.h
134auxinfo.obj: funcadd.h stdio1.h
135mach.obj: arith.h
136avldelete.obj avltree.obj bscanf.obj conscale.obj derprop.obj dynlink.obj func_add.obj\
137 funcadd.obj funcadd1.obj funcaddk.obj funcaddr.obj funcadd0.obj g_fmt.obj\
138 genrowno.obj jac0dim.obj jacdim.obj jac2dim.obj jacinc.obj jacinc1.obj names.obj\
139 obj_prec.obj objval_.obj repwhere.obj sigcatch.obj sjac0dim.obj studchk0.obj:\
140 $(Aslh)
141avldelete.obj avltree.obj: avltree.h
142xp1known.obj: asl_pfg.h psinfo.h nlp.h $(Aslh)
143duthes.obj fullhes.obj htcl.obj sphes.obj: asl_pfgh.h psinfo.h nlp2.h $(Aslh)
144getstub.obj value.obj writesol.obj wrtsol_.obj: getstub.h $(Aslh)
145com2eval.obj con2ival.obj con2val.obj obj2val.obj\
146 x2check.obj: jac2dim.h nlp2.h $(Aslh)
147conpval.obj pshvprod.obj xp2known.obj:\
148	jacpdim.h asl_pfgh.h psinfo.h nlp2.h $(Aslh)
149comeval.obj con1ival.obj conval.obj mip_pri.obj objval.obj qpcheck.obj\
150 readsol.obj: nlp.h $(Aslh)
151misc.obj nl_obj.obj sos_add.obj suf_sos.obj:\
152	nlp.h nlp2.h asl_pfg.h asl_pfgh.h psinfo.h $(Aslh)
153op_type.obj: op_type.hd op_typeb.hd
154fgh_read.obj: jac2dim.h opnos.hd op_type.hd dvalue.hd nlp2.h $(Aslh)
155rops.obj: nlp.h errchk.h $(Aslh)
156rops2.obj: nlp2.h errchk.h $(Aslh)
157conadj.obj fg_write.obj qp_read.obj: nlp.h r_opn.hd $(Aslh)
158f_read.obj fg_read.obj: nlp.h r_opn.hd dvalue.hd $(Aslh)
159objconst.obj: r_opn0.hd nlp.h nlp2.h asl_pfg.h asl_pfgh.h psinfo.h $(Aslh)
160pfg_read.obj: asl_pfg.h r_opn0.hd dvalue.hd nlp.h psinfo.h $(Aslh)
161pfghread.obj: jacpdim.h asl_pfgh.h opnos.hd r_opn0.hd dvalue.hd\
162	psinfo.h nlp2.h $(Aslh)
163nqpcheck.obj: nlp.h r_qp.hd $(Aslh)
164printf.obj punknown.obj sscanf.obj: stdio1.h
165dtoa1.obj: dtoa.c arith.h stdio1.h
166
167# Use CFLAGS in compiling arithchk.c in case something in CFLAGS affects
168# the number of bits in integral data types.  (It's probably best not to
169# add such options to CFLAGS.)
170
171arith.h: arithchk.c
172	comptry.bat $(CC) $(CFLAGS) -DWRITE_ARITH_H -DNO_FPINIT arithchk.c
173	arithchk
174	del arithchk.exe
175	del arithchk.obj
176
177stdio1.h: stdio1.h0
178	copy stdio1.h0 stdio1.h
179
180funcadd1.obj: funcadd1.c
181	$(CC) -c $(CFLAGS) -DWIN32 funcadd1.c
182
183stderr.obj: stderr.c
184	$(CC) -c $(CFLAGS) -DSTDERR=stdout stderr.c
185
186details.c: details.c0
187	echo create details.c by suitably editing details.c0
188