# Makefile.complete # # MolScript v2.0, complete implementation # # For Linux (Redhat 4.2) # 6-Jan-1998 contributed by Ethan Merritt # # # If your computer system lacks one or more of the required libraries, # then you will have to comment out the relevant symbol definitions # below. If none of them are installed, use Makefile.basic instead. # # The following combinations are possible: # # included implementations required systems and libraries # OpenGL + EPS + SGI + JPEG + PNG OpenGL + GLUT + X + JPEG + PNG + ZLIB # OpenGL + EPS + SGI + JPEG OpenGL + GLUT + X + JPEG # OpenGL + EPS + SGI + PNG OpenGL + GLUT + X + PNG + ZLIB # OpenGL + EPS + SGI OpenGL + GLUT + X # OpenGL OpenGL + GLUT # # 'X' is the X window system on UNIX computer systems. # # Note that the OpenGL implementation itself does not require X, it # requires only GLUT. The GLUT library has also been implemented for # Win95 and WinNT. # # See the documentation for more information. ### ------ global freeware/shareware directory ------ ### Can be set in your .cshrc, otherwise set it here. FREEWAREDIR = /usr/local ### ------ clib directory ------ ### Can be set in your .cshrc, otherwise set it here. CLIBDIR = ../clib ### ------ OpenGL and GLUT for X ------ ### Must be modified for Win95 and WinNT. ###GLUTDIR = $(FREEWAREDIR)/glut ### ### ------ Linux (Redhat 4.2) -------- ### Ethan A Merritt Dec 1997 ### ### The required shared libs for Mesa and Glut are: ### GLU = /usr/X11/lib/libMesaGLU.so ### GL = /usr/X11/lib/libMesaGL.so ### GLUTLINK = $(GLLIBDIR) -lglut $(GLU) $(GL) -lXmu -lXext -lXi -lX11 ### GLLIBDIR = -L/usr/X11/lib GLUTLINK = $(GLLIBDIR) -lglut -lMesaGLU -lMesaGL -lXmu -lXext -lXi -lX11 OPENGLFLAG = -DOPENGL_SUPPORT -I/usr/X11 -I/usr/X11/include OPENGLOBJ = opengl.o ### ------ Image files requiring only OpenGL and X ------ IMAGEFLAG = -DIMAGE_SUPPORT IMAGEOBJ = image.o eps_img.o sgi_img.o ### ------ JPEG image file ------ ### Requires the JPEG library. ###JPEGDIR = $(FREEWAREDIR)/jpeg JPEGLINK = -ljpeg JPEGFLAG = -DJPEG_SUPPORT JPEGOBJ = jpeg_img.o ### ------ PNG image file ------ ### Requires the PNG library and the zlib library. ###ZLIBDIR = $(FREEWAREDIR)/zlib ZLIBLINK = -lz ###PNGDIR = $(FREEWAREDIR)/libpng ###PNGLINK = -lpng ###PNGFLAG = -DPNG_SUPPORT ###PNGOBJ = png_img.o ### ------ SGI IRIX's cc compiler ------ ###CC = cc ### optimization flags: ###COPT = -O -mips4 ###COPT = -O2 -mips2 ###COPT = -O1 -mips2 ### correctness flags: ###CCHECK = -ansi -fullwarn -DSELECT_DEBUG ###CCHECK = -ansi -fullwarn -DNDEBUG ###CCHECK = -ansi -fullwarn ### ------ GNU's cc compiler ------ CC = gcc ### optimization flags: COPT = -g ### correctness flags: CCHECK = -DNDEBUG ### ------ general cc compile flags ------ CFLAGS = $(COPT) $(CCHECK) -I$(CLIBDIR) $(OPENGLFLAG) $(IMAGEFLAG) \ $(JPEGFLAG) $(PNGFLAG) $(TIFFFLAG) ### ------ GNU's bison ------ ### Required instead of the ordinary yacc. YACC = bison YFLAGS = -d YLIB = #------------------------------------------------------------ OBJ = molscript.tab.o global.o lex.o col.o utils.o select.o \ state.o graphics.o segment.o coord.o xform.o \ postscript.o raster3d.o vrml.o \ $(OPENGLOBJ) $(IMAGEOBJ) $(JPEGOBJ) $(PNGOBJ) $(TIFFOBJ) #------------------------------------------------------------ all: molscript molauto #------------------------------------------------------------ clean: rm -f molscript molauto *.o core #------------------------------------------------------------ molscript: $(OBJ) $(CLIBDIR)/clib.a $(CC) -o molscript $(OBJ) $(YLIB) $(CLIBDIR)/clib.a \ $(GLUTLINK) $(JPEGLINK) $(PNGLINK) \ $(TIFFLINK) $(ZLIBLINK) -lm molscript.tab.o: molscript.tab.c molscript.tab.h ### $(CC) $(COPT) -I$(CLIBDIR) -c molscript.tab.c molscript.tab.c molscript.tab.h: molscript.y $(YACC) $(YFLAGS) molscript.y global.o: global.c global.h utils.h lex.h state.h graphics.h \ postscript.h raster3d.h vrml.h lex.o: lex.c lex.h utils.h global.h molscript.tab.h col.o: col.c col.h utils.h global.h lex.h state.h utils.o: utils.c utils.h global.h select.o: select.c select.h coord.h utils.h global.h state.h state.o: state.c state.h col.h utils.h global.h select.h graphics.o: graphics.c graphics.h coord.h state.h utils.h global.h \ lex.h select.h xform.h segment.h postscript.h raster3d.h vrml.h segment.o: segment.c segment.h utils.h coord.o: coord.c coord.h utils.h global.h lex.h select.h xform.o: xform.c xform.h utils.h global.h select.h postscript.o: postscript.c postscript.h coord.h utils.h global.h \ graphics.h segment.h state.h raster3d.o: raster3d.c raster3d.h coord.h utils.h global.h graphics.h \ segment.h state.h vrml.o: vrml.c vrml.h col.h coord.h utils.h global.h graphics.h segment.h \ state.h opengl.o: opengl.c opengl.h col.h coord.h utils.h global.h graphics.h \ segment.h state.h lex.h select.h image.o: image.c image.h utils.h global.h graphics.h opengl.h eps_img.o: eps_img.c eps_img.h utils.h global.h graphics.h opengl.h sgi_img.o: sgi_img.c sgi_img.h utils.h global.h graphics.h \ image.h opengl.h jpeg_img.o: jpeg_img.c jpeg_img.h utils.h global.h graphics.h \ image.h opengl.h png_img.o: png_img.c png_img.h utils.h global.h graphics.h \ image.h opengl.h #------------------------------------------------------------ molauto: molauto.o $(CC) -o molauto molauto.o $(CLIBDIR)/clib.a -lm molauto.o: molauto.c $(CLIBDIR)/clib.a