##########################################################################
#                             RasMol 2.7.2.1                             #
#                                                                        #
#                                 RasMol                                 #
#                 Molecular Graphics Visualisation Tool                  #
#                              14 April 2001                             #
#                                                                        #
#                   Based on RasMol 2.6 by Roger Sayle                   #
# Biomolecular Structures Group, Glaxo Wellcome Research & Development,  #
#                      Stevenage, Hertfordshire, UK                      #
#         Version 2.6, August 1995, Version 2.6.4, December 1998         #
#                   Copyright (C) Roger Sayle 1992-1999                  #
#                                                                        #
#                          and Based on Mods by                          #
#Author             Version, Date             Copyright                  #
#Arne Mueller       RasMol 2.6x1   May 98     (C) Arne Mueller 1998      #
#Gary Grossman and  RasMol 2.5-ucb Nov 95     (C) UC Regents/ModularCHEM #
#Marco Molinaro     RasMol 2.6-ucb Nov 96         Consortium 1995, 1996  #
#                                                                        #
#Philippe Valadon   RasTop 1.3     Aug 00     (C) Philippe Valadon 2000  #
#                                                                        #
#Herbert J.         RasMol 2.7.0   Mar 99     (C) Herbert J. Bernstein   # 
#Bernstein          RasMol 2.7.1   Jun 99         1998-2001              #
#                   RasMol 2.7.1.1 Jan 01                                #
#                   RasMol 2.7.2   Aug 00                                #
#                   RasMol 2.7.2.1 Apr 01                                #
#                                                                        #
#                    and Incorporating Translations by                   #
#  Author                               Item                     Language#
#  Isabel Servn Martnez,                                               #
#  Jos Miguel Fernndez Fernndez      2.6   Manual              Spanish#
#  Jos Miguel Fernndez Fernndez      2.7.1 Manual              Spanish#
#  Fernando Gabriel Ranea               2.7.1 menus and messages  Spanish#
#  Jean-Pierre Demailly                 2.7.1 menus and messages  French #
#  Giuseppe Martini, Giovanni Paolella, 2.7.1 menus and messages         #
#  A. Davassi, M. Masullo, C. Liotto    2.7.1 help file           Italian#
#                                                                        #
#                             This Release by                            #
# Herbert J. Bernstein, Bernstein + Sons, P.O. Box 177, Bellport, NY, USA#
#                       yaya@bernstein-plus-sons.com                     #
#               Copyright(C) Herbert J. Bernstein 1998-2001              #
#                                                                        #
# Please read the file NOTICE for important notices which apply to this  #
# package. If you are not going to make changes to RasMol, you are not   # 
# only permitted to freely make copies and distribute them, you are      # 
# encouraged to do so, provided you do the following:                    #
#   * 1. Either include the complete documentation, especially the file  #
#     NOTICE, with what you distribute or provide a clear indication     #
#     where people can get a copy of the documentation; and              #
#   * 2. Please give credit where credit is due citing the version and   # 
#     original authors properly; and                                     #  
#   * 3. Please do not give anyone the impression that the original      #   
#     authors are providing a warranty of any kind.                      #
#                                                                        #
# If you would like to use major pieces of RasMol in some other program, #
# make modifications to RasMol, or in some other way make what a lawyer  #
# would call a "derived work", you are not only permitted to do so, you  #
# are encouraged to do so. In addition to the things we discussed above, #
# please do the following:                                               #
#   * 4. Please explain in your documentation how what you did differs   #
#     from this version of RasMol; and                                   #
#   * 5. Please make your modified source code available.                #
#                                                                        #
# This version of RasMol is not in the public domain, but it is given    #
# freely to the community in the hopes of advancing science. If you make #
# changes, please make them in a responsible manner, and please offer us #
# the opportunity to include those changes in future versions of RasMol. #
##########################################################################
#
# Imakefile
# RasMol2 Molecular Graphics
# Roger Sayle, June 1994
# Version 2.6.4
# Roger Sayle, December 1998
#
# Version 2.6.9
# Herbert J. Bernstein, March 1999
# yaya@bernstein-plus-sons.com

# Version 2.7.2.1+
# Herbert J. Bernstein, April 2002
# yaya@Bernstein-plus-sons.com

# USER DEFINITIONS
#
#  At this point, you may define the cpp macro PIXELDEPTH as 8, 16 or 32

#ifdef PIXELDEPTH
#if PIXELDEPTH==8
  DEPTHDEF = -DEIGHTBIT
#endif
#if PIXELDEPTH==16
  DEPTHDEF = -DSIXTEENBIT
#endif
#if PIXELDEPTH==32
  DEPTHDEF = -DTHIRTYTWOBIT
#endif
#else
DEPTHDEF = -DTHIRTYTWOBIT
# DEPTHDEF = -DSIXTEENBIT
# DEPTHDEF = -DEIGHTBIT
#endif

# RasMol's on-line help direcory
#   e.g. /usr/local/lib/rasmol/rasmol.hlp
RASMOLDIR = $(USRLIBDIR)/rasmol/



DEFINES = -DRASMOLDIR=\"$(RASMOLDIR)\" $(DEPTHDEF) -D_USE_RASMOL_H_

SRCS = rasmol.c rasmol.h molecule.c molecule.h abstree.c abstree.h \
       cmndline.c cmndline.h command.c command.h tokens.h transfor.c \
       transfor.h render.c render.h x11win.c graphics.h pixutils.c \
       pixutils.h font.h outfile.c outfile.h script.c script.h infile.c \
       infile.h repres.c repres.h tokens.c cif_fract.c cif_fract.h cif.c \
       cif.h cif_ctonum.c cif_ctonum.h cif_stx.c \
       multiple.h multiple.c vector.h vector.c \
       wbrotate.c wbrotate.c langsel.h langsel.c

OBJS = rasmol.o molecule.o abstree.o cmndline.o command.o transfor.o \
       render.o repres.o  x11win.o pixutils.o outfile.o script.o \
       infile.o tokens.o  cif_fract.o cif.o cif_ctonum.o cif_stx.o \
       multiple.o vector.o wbrotate.o langsel.o

# Previous Risc/Os definition
# LDLIBS = -lm -lXinput $(XLIB)

# Additional RS6000 AIX MITSHM Library
# LDLIBS = -lm -lXi -lXextSam $(XLIB)

LDLIBS = -lm -lXi $(XLIB) $(EXTRA_LIBRARIES)



#
# Architecture Specific Rules
#
#    If running under HPUX, define the appropriate variant
#    with #define
#

#ifdef HPArchitecture
CCOPTIONS = -Ae
CDEBUGFLAGS = +O2 +Onolimit

#ifdef HPUX_PARISC_32
CCOPTIONS = -Ae +DA2.0 +DS2.0
#endif

#ifdef HPUX_PARISC_64
CCOPTIONS = -Ae +DA2.0W +DS2.0 -D_LONGLONG
#endif

#ifdef HPUX_IA64_32
CCOPTIONS = -Ae +DD32 +DSmckinley
#endif

#ifdef HPUX_IA64_64
CCOPTIONS = -Ae +DD64 +DSmckinley -D_LONGLONG
#endif
#endif

ComplexProgramTarget(rasmol)
MakeDirectories(install,$(RASMOLDIR))
InstallNonExec(../doc/rasmol.hlp,$(RASMOLDIR))
InstallNonExec(../data/1crn.pdb,$(RASMOLDIR))
InstallNonExec(../data/3cro.pdb,$(RASMOLDIR))

rasmol.man::	../doc/rasmol.1
		ln -s ../doc/rasmol.1 rasmol.man

../doc/rasmol.1:	../doc/rasmol.1.gz
		gunzip  <../doc/rasmol.1.gz > ../doc/rasmol.1
