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 Microsoft Visual C++ . 26 27# Invoke with "nmake -f makefile.vc" . 28 29CC = cl 30CFLAGS = -nologo -Ot1 -MT 31# For DEC Alpha processors, use 32# CFLAGS = -nologo -QAieee -Ot1 -DNo_Control87 33# The math libraries associated with some (older?) versions of VC++ 34# return NaN for, e.g., trig functions of large numbers. If you have 35# such a library, add -DNANCHECK to the CFLAGS assignment. 36 37# For use with lcc (http://www.cs.virginia.edu/~lcc-win32/), use 38# CC = lc 39# CFLAGS = -O -DNON_STDIO 40# and change fpinitmt.obj to fpinit.obj below and in amplsolv.lbc 41# (or change amplsolv.lbc to amplsolv.lcc below and obtain amplsolv.lcc 42# from amplsolv.lbc by changing fpinitmt.obj to fpinit.obj). 43 44# This makefile creates a Win32 amplsolv.lib that provides for catching 45# "signals" from a scrolling-window shell, sw.exe, that is available in 46# netlib's "ampl/student/mswin" directory. 47# For this purpose, most objects can be compiled in "single-threaded" 48# mode, while fpinitmt.obj, which catches the "signals", is 49# automatically compiled as a multi-threaded object. To link a solver 50# with amplsolv.lib compiled in this way, it is necessary to link with 51# the multi-threaded C library while suppressing automatic linking with 52# the non-threaded library, by adding 53# libcmt.lib /link /NODEFAULTLIB:libc.lib 54# to the end of the solver linking command. This is illustrated in the 55# solvers/*/makefile.vc files, such as solvers/examples/makefile.vc, 56# solvers/minos/makefile.vc, and solvers/donlp2/makefile.vc. 57 58.c.obj: 59 $(CC) -c $(CFLAGS) $*.c 60 61all: arith.h stdio1.h amplsolv.lib funcadd0.obj 62 63a = \ 64 asldate.obj \ 65 atof.obj \ 66 auxinfo.obj \ 67 avldelete.obj \ 68 avltree.obj \ 69 b_search.obj \ 70 basename.obj \ 71 bscanf.obj \ 72 com2eval.obj \ 73 comeval.obj \ 74 con1ival.obj \ 75 con2ival.obj \ 76 con2val.obj \ 77 conadj.obj \ 78 conpval.obj \ 79 conscale.obj \ 80 conval.obj \ 81 derprop.obj \ 82 details.obj \ 83 dtoa1.obj \ 84 duthes.obj \ 85 dynlink.obj \ 86 f_read.obj \ 87 fg_read.obj \ 88 fg_write.obj \ 89 fgh_read.obj \ 90 fpecatch.obj \ 91 fpinitmt.obj \ 92 fullhes.obj \ 93 func_add.obj \ 94 funcadd1.obj \ 95 g_fmt.obj \ 96 genrowno.obj \ 97 getenv.obj \ 98 getstub.obj \ 99 htcl.obj \ 100 jac0dim.obj \ 101 jac2dim.obj \ 102 jacdim.obj \ 103 jacinc.obj \ 104 jacinc1.obj \ 105 mach.obj \ 106 mainexit.obj \ 107 mip_pri.obj \ 108 misc.obj \ 109 mypow.obj \ 110 names.obj \ 111 nl_obj.obj \ 112 nqpcheck.obj \ 113 obj2val.obj \ 114 obj_prec.obj \ 115 objconst.obj \ 116 objval.obj \ 117 objval_.obj \ 118 op_type.obj \ 119 pfg_read.obj \ 120 pfghread.obj \ 121 printf.obj \ 122 pshvprod.obj \ 123 punknown.obj \ 124 qp_read.obj \ 125 qpcheck.obj \ 126 qsortv.obj \ 127 readsol.obj \ 128 repwhere.obj \ 129 rops.obj \ 130 rops2.obj \ 131 sigcatch.obj \ 132 sos_add.obj \ 133 sphes.obj \ 134 sscanf.obj \ 135 stderr.obj \ 136 studchk0.obj \ 137 suf_sos.obj \ 138 value.obj \ 139 writesol.obj \ 140 wrtsol_.obj \ 141 ws_desc.obj \ 142 wsu_desc.obj \ 143 x2check.obj \ 144 xectim.obj \ 145 xp1known.obj \ 146 xp2known.obj 147 148amplsolv.lib: $a 149 lib -out:amplsolv.lib @amplsolv.lbc 150 151Aslh = arith.h asl.h funcadd.h stdio1.h 152auxinfo.obj: funcadd.h stdio1.h 153mach.obj: arith.h 154avldelete.obj avltree.obj bscanf.obj conscale.obj derprop.obj dynlink.obj func_add.obj\ 155 funcadd.obj funcadd1.obj funcaddk.obj funcaddr.obj funcadd0.obj g_fmt.obj\ 156 genrowno.obj jac0dim.obj jacdim.obj jac2dim.obj jacinc.obj jacinc1.obj names.obj\ 157 obj_prec.obj objval_.obj repwhere.obj sigcatch.obj sjac0dim.obj studchk0.obj:\ 158 $(Aslh) 159avldelete.obj avltree.obj: avltree.h 160xp1known.obj: asl_pfg.h psinfo.h nlp.h $(Aslh) 161duthes.obj fullhes.obj htcl.obj sphes.obj: asl_pfgh.h psinfo.h nlp2.h $(Aslh) 162getstub.obj value.obj writesol.obj wrtsol_.obj: getstub.h $(Aslh) 163com2eval.obj con2ival.obj con2val.obj obj2val.obj\ 164 x2check.obj: jac2dim.h nlp2.h $(Aslh) 165conpval.obj pshvprod.obj xp2known.obj:\ 166 jacpdim.h asl_pfgh.h psinfo.h nlp2.h $(Aslh) 167comeval.obj con1ival.obj conval.obj mip_pri.obj objval.obj qpcheck.obj\ 168 readsol.obj: nlp.h $(Aslh) 169misc.obj nl_obj.obj sos_add.obj suf_sos.obj:\ 170 nlp.h nlp2.h asl_pfg.h asl_pfgh.h psinfo.h $(Aslh) 171op_type.obj: op_type.hd op_typeb.hd 172fgh_read.obj: jac2dim.h opnos.hd op_type.hd dvalue.hd nlp2.h $(Aslh) 173rops.obj: nlp.h errchk.h $(Aslh) 174rops2.obj: nlp2.h errchk.h $(Aslh) 175conadj.obj fg_write.obj qp_read.obj: nlp.h r_opn.hd $(Aslh) 176f_read.obj fg_read.obj: nlp.h r_opn.hd dvalue.hd $(Aslh) 177objconst.obj: r_opn0.hd nlp.h nlp2.h asl_pfg.h asl_pfgh.h psinfo.h $(Aslh) 178pfg_read.obj: asl_pfg.h r_opn0.hd dvalue.hd nlp.h psinfo.h $(Aslh) 179pfghread.obj: jacpdim.h asl_pfgh.h opnos.hd r_opn0.hd dvalue.hd\ 180 psinfo.h nlp2.h $(Aslh) 181nqpcheck.obj: nlp.h r_qp.hd $(Aslh) 182printf.obj punknown.obj sscanf.obj: stdio1.h 183dtoa1.obj: dtoa.c arith.h stdio1.h 184 185# Use CFLAGS in compiling arithchk.c in case something in CFLAGS affects 186# the number of bits in integral data types. (It's probably best not to 187# add such options to CFLAGS.) 188 189XBINLIBS = 190 191# If your compiler requires libraries that it does not supply automatically 192# (i.e., if your compiler is broken, as reportedly Microsoft's VC++ 7 is: 193# it is said to need "XBINLIBS = bufferoverflowu.lib"), modify the above 194# XBINLIB assignment suitably, or invoke 195# "nmake ... XBINLIBS=..." 196 197arith.h: arithchk.c 198 comptry.bat $(CC) $(CFLAGS) -DNO_FPINIT arithchk.c $(XBINLIBS) 199 arithchk >arith.h 200 del arithchk.exe 201 del arithchk.obj 202 203stdio1.h: stdio1.h0 204 copy stdio1.h0 stdio1.h 205 206stderr.obj: stderr.c 207 $(CC) -c $(CFLAGS) -DSTDERR=stdout stderr.c 208 209details.c: details.c0 210 echo create details.c by suitably editing details.c0 211 212# For MS VC++ 6.0, details.c should contain 213# char sysdetails_ASL[] = "MS VC++ 6.0"; 214