# Makefile for Linux systems ## ampltabl.dll is for table handlers to be imported ## automatically at the start of AMPL's execution. ## It can also provide user-defined functions. ## Table handlers can also appear in shared libraries ## (DLLs) read with AMPL's "load" and "reload" commands. .SUFFIXES: .c .o # $S = ampl/solvers directory S = ../solvers CC = cc CFLAGS = -I$S -O2 -fPIC .c.o: $(CC) -c $(CFLAGS) $*.c all: simpbit.dll fullbit.dll simpbit.dll: simpbit.o $(CC) -shared -o simpbit.dll simpbit.o fullbit.dll: fullbit.o $(CC) -shared -o fullbit.dll fullbit.o ## To create ampltabl.dll rather than simpbit.dll, change ## "-o simpbit.dll" to "-o ampltabl.dll". ## Under some versions of Linux (e.g., SuSE 6.3), the search path ## for ampltabl.dll is affected by $LD_LIBRARY_PATH. clean: rm -f *.o *.dll # make xsum.out to check for transmission errors. # This assumes you have the xsum program, whose source # you can get from netlib, e.g., by asking # netlib@research.bell-labs.com to # send xsum.c from f2c/src x = \ README \ TABLES.RME \ amplodbc.c \ ampltabl.def \ calories.tab \ diet.mod \ diet2a.dat \ diettab.x \ diettabw.x \ dietwrit.x \ foods.tab \ fullbit.c \ makefile.linux \ makefile.sgi \ makefile.vc \ nutrients.tab \ simpbit.c xsum.out: $x xsum $x >xsum1.out cmp xsum0.out xsum1.out && mv xsum1.out xsum.out || diff xsum[01].out