Changeset 940 for trunk


Ignore:
Timestamp:
Mar 11, 2008, 3:36:47 PM (16 years ago)
Author:
gah
Message:

More Makefile cleanup

Location:
trunk/vizservers
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/vizservers/configure

    r916 r940  
    669669CXXFLAGS
    670670ac_ct_CXX
    671 SUBDIRS
    672671CXXCPP
    673672GREP
    674673EGREP
     674SUBDIRS
    675675TCL_LIB_DIR
    676676TCL_LIB
     
    32723272
    32733273
    3274 SUBDIRS="nanoscale nanovis pymolproxy"
    3275 
    3276 
    3277 
    3278 # Check whether --with-tcllib was given.
    3279 if test "${with_tcllib+set}" = set; then
    3280   withval=$with_tcllib; with_tcllib=$withval
    3281 else
    3282   with_tcllib=/usr/lib
    3283 fi
    3284 
    3285 
    3286 TCL_LIB_DIR=""
    3287 TCL_LIB=""
    3288 TCL_LIB_VERSION=""
    3289 { echo "$as_me:$LINENO: checking for tcl binary libraries" >&5
    3290 echo $ECHO_N "checking for tcl binary libraries... $ECHO_C" >&6; }
    3291 if test "x$with_tcllib" != "x" ; then
    3292     if test -f "$with_tcllib"
    3293     then
    3294         if test -n `basename $with_tcllib | grep libtcl0-9\.0-9.so`
    3295         then
    3296             TCL_LIB_DIR="$with_tcllib"
    3297         fi
    3298     else
    3299         if test -d "$with_tcllib"
    3300         then
    3301             if test -x "$with_tcllib/`ls $with_tcllib | grep libtcl0-9\.0-9\.so$`"
    3302             then
    3303                 TCL_LIB_DIR="$with_tcllib"
    3304             else
    3305                 { echo "$as_me:$LINENO: result: no" >&5
    3306 echo "${ECHO_T}no" >&6; }
    3307                 { { echo "$as_me:$LINENO: error: cannot find tcl binary libraries, try using --with-tcllib" >&5
    3308 echo "$as_me: error: cannot find tcl binary libraries, try using --with-tcllib" >&2;}
    3309    { (exit 1); exit 1; }; }
    3310             fi
    3311         else
    3312             { echo "$as_me:$LINENO: result: no" >&5
    3313 echo "${ECHO_T}no" >&6; }
    3314             { { echo "$as_me:$LINENO: error: cannot find tcl binary libraries inside $with_tcllib, try using --with-tcllib" >&5
    3315 echo "$as_me: error: cannot find tcl binary libraries inside $with_tcllib, try using --with-tcllib" >&2;}
    3316    { (exit 1); exit 1; }; }
    3317         fi
    3318     fi
    3319 else
    33203274
    33213275ac_ext=cpp
     
    39513905
    39523906
     3907{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
     3908echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
     3909if test "${ac_cv_c_bigendian+set}" = set; then
     3910  echo $ECHO_N "(cached) $ECHO_C" >&6
     3911else
     3912  # See if sys/param.h defines the BYTE_ORDER macro.
     3913cat >conftest.$ac_ext <<_ACEOF
     3914/* confdefs.h.  */
     3915_ACEOF
     3916cat confdefs.h >>conftest.$ac_ext
     3917cat >>conftest.$ac_ext <<_ACEOF
     3918/* end confdefs.h.  */
     3919#include <sys/types.h>
     3920#include <sys/param.h>
     3921
     3922int
     3923main ()
     3924{
     3925#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
     3926        && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
     3927 bogus endian macros
     3928#endif
     3929
     3930  ;
     3931  return 0;
     3932}
     3933_ACEOF
     3934rm -f conftest.$ac_objext
     3935if { (ac_try="$ac_compile"
     3936case "(($ac_try" in
     3937  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3938  *) ac_try_echo=$ac_try;;
     3939esac
     3940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3941  (eval "$ac_compile") 2>conftest.er1
     3942  ac_status=$?
     3943  grep -v '^ *+' conftest.er1 >conftest.err
     3944  rm -f conftest.er1
     3945  cat conftest.err >&5
     3946  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3947  (exit $ac_status); } && {
     3948         test -z "$ac_cxx_werror_flag" ||
     3949         test ! -s conftest.err
     3950       } && test -s conftest.$ac_objext; then
     3951  # It does; now see whether it defined to BIG_ENDIAN or not.
     3952cat >conftest.$ac_ext <<_ACEOF
     3953/* confdefs.h.  */
     3954_ACEOF
     3955cat confdefs.h >>conftest.$ac_ext
     3956cat >>conftest.$ac_ext <<_ACEOF
     3957/* end confdefs.h.  */
     3958#include <sys/types.h>
     3959#include <sys/param.h>
     3960
     3961int
     3962main ()
     3963{
     3964#if BYTE_ORDER != BIG_ENDIAN
     3965 not big endian
     3966#endif
     3967
     3968  ;
     3969  return 0;
     3970}
     3971_ACEOF
     3972rm -f conftest.$ac_objext
     3973if { (ac_try="$ac_compile"
     3974case "(($ac_try" in
     3975  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     3976  *) ac_try_echo=$ac_try;;
     3977esac
     3978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     3979  (eval "$ac_compile") 2>conftest.er1
     3980  ac_status=$?
     3981  grep -v '^ *+' conftest.er1 >conftest.err
     3982  rm -f conftest.er1
     3983  cat conftest.err >&5
     3984  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3985  (exit $ac_status); } && {
     3986         test -z "$ac_cxx_werror_flag" ||
     3987         test ! -s conftest.err
     3988       } && test -s conftest.$ac_objext; then
     3989  ac_cv_c_bigendian=yes
     3990else
     3991  echo "$as_me: failed program was:" >&5
     3992sed 's/^/| /' conftest.$ac_ext >&5
     3993
     3994        ac_cv_c_bigendian=no
     3995fi
     3996
     3997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     3998else
     3999  echo "$as_me: failed program was:" >&5
     4000sed 's/^/| /' conftest.$ac_ext >&5
     4001
     4002        # It does not; compile a test program.
     4003if test "$cross_compiling" = yes; then
     4004  # try to guess the endianness by grepping values into an object file
     4005  ac_cv_c_bigendian=unknown
     4006  cat >conftest.$ac_ext <<_ACEOF
     4007/* confdefs.h.  */
     4008_ACEOF
     4009cat confdefs.h >>conftest.$ac_ext
     4010cat >>conftest.$ac_ext <<_ACEOF
     4011/* end confdefs.h.  */
     4012short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
     4013short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
     4014void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
     4015short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
     4016short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
     4017void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
     4018int
     4019main ()
     4020{
     4021 _ascii (); _ebcdic ();
     4022  ;
     4023  return 0;
     4024}
     4025_ACEOF
     4026rm -f conftest.$ac_objext
     4027if { (ac_try="$ac_compile"
     4028case "(($ac_try" in
     4029  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     4030  *) ac_try_echo=$ac_try;;
     4031esac
     4032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4033  (eval "$ac_compile") 2>conftest.er1
     4034  ac_status=$?
     4035  grep -v '^ *+' conftest.er1 >conftest.err
     4036  rm -f conftest.er1
     4037  cat conftest.err >&5
     4038  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4039  (exit $ac_status); } && {
     4040         test -z "$ac_cxx_werror_flag" ||
     4041         test ! -s conftest.err
     4042       } && test -s conftest.$ac_objext; then
     4043  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
     4044  ac_cv_c_bigendian=yes
     4045fi
     4046if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
     4047  if test "$ac_cv_c_bigendian" = unknown; then
     4048    ac_cv_c_bigendian=no
     4049  else
     4050    # finding both strings is unlikely to happen, but who knows?
     4051    ac_cv_c_bigendian=unknown
     4052  fi
     4053fi
     4054else
     4055  echo "$as_me: failed program was:" >&5
     4056sed 's/^/| /' conftest.$ac_ext >&5
     4057
     4058
     4059fi
     4060
     4061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     4062else
     4063  cat >conftest.$ac_ext <<_ACEOF
     4064/* confdefs.h.  */
     4065_ACEOF
     4066cat confdefs.h >>conftest.$ac_ext
     4067cat >>conftest.$ac_ext <<_ACEOF
     4068/* end confdefs.h.  */
     4069$ac_includes_default
     4070int
     4071main ()
     4072{
     4073
     4074  /* Are we little or big endian?  From Harbison&Steele.  */
     4075  union
     4076  {
     4077    long int l;
     4078    char c[sizeof (long int)];
     4079  } u;
     4080  u.l = 1;
     4081  return u.c[sizeof (long int) - 1] == 1;
     4082
     4083  ;
     4084  return 0;
     4085}
     4086_ACEOF
     4087rm -f conftest$ac_exeext
     4088if { (ac_try="$ac_link"
     4089case "(($ac_try" in
     4090  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     4091  *) ac_try_echo=$ac_try;;
     4092esac
     4093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4094  (eval "$ac_link") 2>&5
     4095  ac_status=$?
     4096  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4097  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
     4098  { (case "(($ac_try" in
     4099  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     4100  *) ac_try_echo=$ac_try;;
     4101esac
     4102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
     4103  (eval "$ac_try") 2>&5
     4104  ac_status=$?
     4105  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4106  (exit $ac_status); }; }; then
     4107  ac_cv_c_bigendian=no
     4108else
     4109  echo "$as_me: program exited with status $ac_status" >&5
     4110echo "$as_me: failed program was:" >&5
     4111sed 's/^/| /' conftest.$ac_ext >&5
     4112
     4113( exit $ac_status )
     4114ac_cv_c_bigendian=yes
     4115fi
     4116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
     4117fi
     4118
     4119
     4120fi
     4121
     4122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     4123fi
     4124{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
     4125echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
     4126case $ac_cv_c_bigendian in
     4127  yes)
     4128
     4129cat >>confdefs.h <<\_ACEOF
     4130#define WORDS_BIGENDIAN 1
     4131_ACEOF
     4132 ;;
     4133  no)
     4134     ;;
     4135  *)
     4136    { { echo "$as_me:$LINENO: error: unknown endianness
     4137presetting ac_cv_c_bigendian=no (or yes) will help" >&5
     4138echo "$as_me: error: unknown endianness
     4139presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
     4140   { (exit 1); exit 1; }; } ;;
     4141esac
     4142
     4143
     4144SUBDIRS="nanoscale nanovis pymolproxy"
     4145
     4146
     4147
     4148# Check whether --with-tcllib was given.
     4149if test "${with_tcllib+set}" = set; then
     4150  withval=$with_tcllib; with_tcllib=$withval
     4151else
     4152  with_tcllib=/usr/lib
     4153fi
     4154
     4155
     4156TCL_LIB_DIR=""
     4157TCL_LIB=""
     4158TCL_LIB_VERSION=""
     4159{ echo "$as_me:$LINENO: checking for tcl binary libraries" >&5
     4160echo $ECHO_N "checking for tcl binary libraries... $ECHO_C" >&6; }
     4161if test "x$with_tcllib" != "x" ; then
     4162    if test -f "$with_tcllib"
     4163    then
     4164        if test -n `basename $with_tcllib | grep libtcl0-9\.0-9.so`
     4165        then
     4166            TCL_LIB_DIR="$with_tcllib"
     4167        fi
     4168    else
     4169        if test -d "$with_tcllib"
     4170        then
     4171            if test -x "$with_tcllib/`ls $with_tcllib | grep libtcl0-9\.0-9\.so$`"
     4172            then
     4173                TCL_LIB_DIR="$with_tcllib"
     4174            else
     4175                { echo "$as_me:$LINENO: result: no" >&5
     4176echo "${ECHO_T}no" >&6; }
     4177                { { echo "$as_me:$LINENO: error: cannot find tcl binary libraries, try using --with-tcllib" >&5
     4178echo "$as_me: error: cannot find tcl binary libraries, try using --with-tcllib" >&2;}
     4179   { (exit 1); exit 1; }; }
     4180            fi
     4181        else
     4182            { echo "$as_me:$LINENO: result: no" >&5
     4183echo "${ECHO_T}no" >&6; }
     4184            { { echo "$as_me:$LINENO: error: cannot find tcl binary libraries inside $with_tcllib, try using --with-tcllib" >&5
     4185echo "$as_me: error: cannot find tcl binary libraries inside $with_tcllib, try using --with-tcllib" >&2;}
     4186   { (exit 1); exit 1; }; }
     4187        fi
     4188    fi
     4189else
    39534190
    39544191for ac_header in tcl.h
     
    45244761
    45254762
    4526 ac_config_files="$ac_config_files Makefile nanoscale/Makefile nanovis/Makefile nanovis/newmat11/Makefile nanovis/R2/src/Makefile nanovis/imgLoaders/Makefile pymolproxy/Makefile start_viz.sh"
     4763ac_config_files="$ac_config_files Makefile nanoscale/Makefile nanovis/Makefile nanovis/newmat11/Makefile nanovis/R2/src/Makefile nanovis/imgLoaders/Makefile nanovis/transfer-function/Makefile pymolproxy/Makefile start_viz.sh"
    45274764
    45284765cat >confcache <<\_ACEOF
     
    51005337    "nanovis/R2/src/Makefile") CONFIG_FILES="$CONFIG_FILES nanovis/R2/src/Makefile" ;;
    51015338    "nanovis/imgLoaders/Makefile") CONFIG_FILES="$CONFIG_FILES nanovis/imgLoaders/Makefile" ;;
     5339    "nanovis/transfer-function/Makefile") CONFIG_FILES="$CONFIG_FILES nanovis/transfer-function/Makefile" ;;
    51025340    "pymolproxy/Makefile") CONFIG_FILES="$CONFIG_FILES pymolproxy/Makefile" ;;
    51035341    "start_viz.sh") CONFIG_FILES="$CONFIG_FILES start_viz.sh" ;;
     
    52165454CXXFLAGS!$CXXFLAGS$ac_delim
    52175455ac_ct_CXX!$ac_ct_CXX$ac_delim
    5218 SUBDIRS!$SUBDIRS$ac_delim
    52195456CXXCPP!$CXXCPP$ac_delim
    52205457GREP!$GREP$ac_delim
    52215458EGREP!$EGREP$ac_delim
     5459SUBDIRS!$SUBDIRS$ac_delim
    52225460TCL_LIB_DIR!$TCL_LIB_DIR$ac_delim
    52235461TCL_LIB!$TCL_LIB$ac_delim
  • trunk/vizservers/configure.in

    r916 r940  
    3434AC_PROG_CXX
    3535AC_LANG_CPLUSPLUS
     36
     37AC_C_BIGENDIAN
    3638
    3739SUBDIRS="nanoscale nanovis pymolproxy"
     
    194196            nanovis/R2/src/Makefile \
    195197            nanovis/imgLoaders/Makefile \
     198            nanovis/transfer-function/Makefile \
    196199            pymolproxy/Makefile \
    197200            start_viz.sh    )
  • trunk/vizservers/nanoscale/Makefile.in

    r750 r940  
    55LDFLAGS         = @LDFLAGS@
    66
     7bindir          = @bindir@
     8datadir         = @datarootdir@
     9exec_prefix     = @exec_prefix@
     10includedir      = @includedir@
     11libdir          = @libdir@
     12mandir          = @mandir@
    713prefix          = @prefix@
    8 exec_prefix     = @exec_prefix@
    9 bindir          = @bindir@
    10 libdir          = @libdir@
    11 includedir      = @includedir@
    12 mandir          = @mandir@
     14srcdir          = @srcdir@
     15
     16VPATH           = $(srcdir)
    1317
    1418INSTALL         = @INSTALL@
    15 INSTALL_PROGRAM = ${INSTALL} -m 755
    16 INSTALL_DATA    = ${INSTALL} -m 644
    17 INSTALL_SCRIPT  = ${INSTALL} -m 644
     19INSTALL_PROGRAM = ${INSTALL} -m 555
     20INSTALL_DATA    = ${INSTALL} -m 444
     21INSTALL_SCRIPT  = ${INSTALL} -m 444
    1822
    1923.PHONY: all install clean distclean
     
    3438distclean: clean
    3539        rm Makefile
     40
  • trunk/vizservers/nanovis/Makefile.in

    r939 r940  
    77.PHONY: all install clean distclean
    88
     9bindir          = @bindir@
     10datadir         = @datarootdir@
     11exec_prefix     = @exec_prefix@
     12includedir      = @includedir@
     13libdir          = @libdir@
     14mandir          = @mandir@
    915prefix          = @prefix@
    10 exec_prefix     = @exec_prefix@
    11 bindir          = @bindir@
    12 libdir          = @libdir@
    1316srcdir          = @srcdir@
    14 includedir      = @includedir@
    15 mandir          = @mandir@
     17
     18VPATH           = $(srcdir)
    1619
    1720INSTALL         = @INSTALL@
    1821#Why are these files installed owner writable?
    19 INSTALL_PROGRAM = ${INSTALL} -m 755
    20 INSTALL_DATA    = ${INSTALL} -m 644
    21 INSTALL_SCRIPT  = ${INSTALL} -m 644
     22INSTALL_PROGRAM = ${INSTALL} -m 555
     23INSTALL_DATA    = ${INSTALL} -m 444
     24INSTALL_SCRIPT  = ${INSTALL} -m 444
    2225RM              = rm -f
    2326
     
    3134IMG_DIR         = ./imgLoaders
    3235IMG_INC_SPEC    = -I$(srcdir)/$(IMG_DIR)
    33 IMG_LIB         = $(IMG_DIR)/libImageLoaders.a
     36IMG_LIB         = $(IMG_DIR)/ImageLoaders.a
    3437IMG_LIB_SPEC    = $(IMG_LIB)
    3538MAT_DIR         = ./newmat11
    3639MAT_INC_SPEC    = -I$(srcdir)/$(MAT_DIR)
    37 MAT_LIB         = $(MAT_DIR)/libnewmat11.a
     40MAT_LIB         = $(MAT_DIR)/newmat11.a
    3841MAT_LIB_SPEC    = $(MAT_LIB)
    3942R2_DIR          = ./R2
    4043R2_INC_SPEC     = -I$(srcdir)/$(R2_DIR)/include
    41 R2_LIB          = $(R2_DIR)/src/libR2.a
     44R2_LIB          = $(R2_DIR)/src/R2.a
    4245R2_LIB_SPEC     = $(R2_LIB)
    4346
     
    4851TF_DIR          = ./transfer-function
    4952TF_INC_SPEC     = -I$(TF_DIR)
    50 TF_LIB          = $(TF_DIR)/libTransferFunction.a
     53TF_LIB          = $(TF_DIR)/transfer-function.a
    5154TF_LIB_SPEC     = $(TF_LIB)
    5255
     
    6265
    6366INCLUDES        = \
    64                 -I. \
     67                -I$(srcdir) \
    6568                $(RP_INC_SPEC) \
    6669                $(GL_INC_SPEC) \
  • trunk/vizservers/nanovis/R2/src/Makefile.in

    r913 r940  
    44.PHONY: all install clean distclean
    55
     6bindir          = @bindir@
     7datadir         = @datarootdir@
     8exec_prefix     = @exec_prefix@
     9includedir      = @includedir@
     10libdir          = @libdir@
     11mandir          = @mandir@
    612prefix          = @prefix@
    7 exec_prefix     = @exec_prefix@
    8 bindir          = @bindir@
    9 libdir          = @libdir@
    1013srcdir          = @srcdir@
    11 includedir      = @includedir@
    12 mandir          = @mandir@
    1314
    1415INSTALL         = @INSTALL@
    15 INSTALL_PROGRAM = ${INSTALL} -m 755
    16 INSTALL_DATA    = ${INSTALL} -m 644
    17 INSTALL_SCRIPT  = ${INSTALL} -m 644
     16INSTALL_PROGRAM = ${INSTALL} -m 555
     17INSTALL_DATA    = ${INSTALL} -m 444
     18INSTALL_SCRIPT  = ${INSTALL} -m 444
    1819RM              = rm -f
    1920AR              = ar rc
    2021RANLIB          = @RANLIB@
    2122CC              = @CC@
     23VPATH           = $(srcdir)
    2224
    2325INCLUDES        = -I$(srcdir)/../include
     
    2830CC_SWITCHES     = $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDES)
    2931
    30 OBJS  = \
    31         R2FilePath.o \
    32         R2Fonts.o \
    33         R2Geometry.o \
    34         R2IndexBuffer.o \
    35         R2Object.o \
    36         R2VertexBuffer.o \
    37         R2string.o
     32OBJS            = \
     33                R2FilePath.o \
     34                R2Fonts.o \
     35                R2Geometry.o \
     36                R2IndexBuffer.o \
     37                R2Object.o \
     38                R2VertexBuffer.o \
     39                R2string.o
    3840
    39 R2LIB = libR2.a
     41R2LIB           = R2.a
    4042
    4143all: $(R2LIB)
  • trunk/vizservers/nanovis/imgLoaders/Makefile.in

    r918 r940  
    44.PHONY: all install clean distclean
    55
     6bindir          = @bindir@
     7datadir         = @datarootdir@
     8exec_prefix     = @exec_prefix@
     9includedir      = @includedir@
     10libdir          = @libdir@
     11mandir          = @mandir@
    612prefix          = @prefix@
    7 exec_prefix     = @exec_prefix@
    8 bindir          = @bindir@
    9 libdir          = @libdir@
    1013srcdir          = @srcdir@
    11 includedir      = @includedir@
    12 mandir          = @mandir@
    1314
    1415INSTALL         = @INSTALL@
    15 INSTALL_PROGRAM = ${INSTALL} -m 755
    16 INSTALL_DATA    = ${INSTALL} -m 644
    17 INSTALL_SCRIPT  = ${INSTALL} -m 644
     16INSTALL_PROGRAM = ${INSTALL} -m 555
     17INSTALL_DATA    = ${INSTALL} -m 444
     18INSTALL_SCRIPT  = ${INSTALL} -m 444
    1819RM              = rm -f
    1920AR              = ar rc
    2021RANLIB          = @RANLIB@
    2122CC              = @CC@
     23VPATH           = $(srcdir)
    2224
    23 INCLUDES = -I$(srcdir)
     25INCLUDES        = -I$(srcdir)
    2426
    25 CFLAGS = @CFLAGS@
    26 EXTRA_CFLAGS = -Wall
    27 DEFINES = @DEFINES@
    28 CC_SWITCHES = $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDES)
     27CFLAGS          = @CFLAGS@
     28EXTRA_CFLAGS    = -Wall
     29DEFINES         = @DEFINES@
     30CC_SWITCHES     = $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDES)
    2931
    30 IMGLIB = libImageLoaders.a
     32IMGLIB          = ImageLoaders.a
    3133
    32 OBJS  = \
    33         BMPImageLoaderImpl.o \
    34         Image.o \
    35         ImageLoader.o \
    36         ImageLoaderFactory.o \
    37         ImageLoaderImpl.o
     34OBJS            = \
     35                BMPImageLoaderImpl.o \
     36                Image.o \
     37                ImageLoader.o \
     38                ImageLoaderFactory.o \
     39                ImageLoaderImpl.o
    3840
    3941all: $(IMGLIB)
  • trunk/vizservers/nanovis/newmat11/Makefile.in

    r913 r940  
    44.PHONY: all install clean distclean
    55
     6bindir          = @bindir@
     7datadir         = @datarootdir@
     8exec_prefix     = @exec_prefix@
     9includedir      = @includedir@
     10libdir          = @libdir@
     11mandir          = @mandir@
    612prefix          = @prefix@
    7 exec_prefix     = @exec_prefix@
    8 bindir          = @bindir@
    9 libdir          = @libdir@
    1013srcdir          = @srcdir@
    11 includedir      = @includedir@
    12 mandir          = @mandir@
    1314
    1415INSTALL         = @INSTALL@
    15 INSTALL_PROGRAM = ${INSTALL} -m 755
    16 INSTALL_DATA    = ${INSTALL} -m 644
    17 INSTALL_SCRIPT  = ${INSTALL} -m 644
     16INSTALL_PROGRAM = ${INSTALL} -m 555
     17INSTALL_DATA    = ${INSTALL} -m 444
     18INSTALL_SCRIPT  = ${INSTALL} -m 444
    1819RM              = rm -f
    1920AR              = ar rc
    2021RANLIB          = @RANLIB@
    2122CC              = @CC@
     23VPATH           = $(srcdir)
    2224
    23 INCLUDES = -I$(srcdir)
     25INCLUDES        = -I$(srcdir)
    2426
    25 CFLAGS = @CFLAGS@
    26 EXTRA_CFLAGS = -Wall
    27 DEFINES = @DEFINES@
    28 CC_SWITCHES = $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDES)
     27CFLAGS          = @CFLAGS@
     28EXTRA_CFLAGS    = -Wall
     29DEFINES         = @DEFINES@
     30CC_SWITCHES     = $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDES)
    2931
    30 MATLIB = libnewmat11.a
     32MATLIB          = newmat11.a
    3133
    32 OBJS  = \
    33         bandmat.o \
    34         cholesky.o \
    35         evalue.o \
    36         fft.o \
    37         hholder.o \
    38         jacobi.o \
    39         myexcept.o \
    40         newfft.o \
    41         newmat1.o \
    42         newmat2.o \
    43         newmat3.o \
    44         newmat4.o \
    45         newmat5.o \
    46         newmat6.o \
    47         newmat7.o \
    48         newmat8.o \
    49         newmat9.o \
    50         newmatex.o \
    51         newmatnl.o \
    52         newmatrm.o \
    53         nm_misc.o \
    54         solution.o \
    55         sort.o \
    56         submat.o \
    57         svd.o
     34OBJS            = \
     35                bandmat.o \
     36                cholesky.o \
     37                evalue.o \
     38                fft.o \
     39                hholder.o \
     40                jacobi.o \
     41                myexcept.o \
     42                newfft.o \
     43                newmat1.o \
     44                newmat2.o \
     45                newmat3.o \
     46                newmat4.o \
     47                newmat5.o \
     48                newmat6.o \
     49                newmat7.o \
     50                newmat8.o \
     51                newmat9.o \
     52                newmatex.o \
     53                newmatnl.o \
     54                newmatrm.o \
     55                nm_misc.o \
     56                solution.o \
     57                sort.o \
     58                submat.o \
     59                svd.o
    5860
    5961all: $(MATLIB)
  • trunk/vizservers/pymolproxy/Makefile.in

    r760 r940  
    1 TARGETS = pymolproxy
    21
    3 CC      = @CC@
    4 CFLAGS  = @CFLAGS@ -I@TCL_INCL_DIR@
    5 LDFLAGS = @LDFLAGS@
    6 # LDFLAGS = $(LDFLAGS)
     2TARGETS         = pymolproxy
    73
     4CC              = @CC@
     5INCLUDES        = -I@TCL_INCL_DIR@
     6CFLAGS          = @CFLAGS@
     7EXTRA_CFLAGS    = -Wall
     8DEFINES         = -DSTANDALONE
     9CC_SWITCHES     = $(CFLAGS) $(EXTRA_CFLAGS) $(DEFINES) $(INCLUDES)
     10
     11bindir          = @bindir@
     12datadir         = @datarootdir@
     13exec_prefix     = @exec_prefix@
     14includedir      = @includedir@
     15libdir          = @libdir@
     16mandir          = @mandir@
    817prefix          = @prefix@
    9 exec_prefix     = @exec_prefix@
    10 bindir          = @bindir@
    11 libdir          = @libdir@
    12 includedir      = @includedir@
    13 mandir          = @mandir@
     18srcdir          = @srcdir@
    1419
     20RP_DIR          = @RP_DIR@
    1521INSTALL         = @INSTALL@
    1622INSTALL_PROGRAM = ${INSTALL} -m 755
    1723INSTALL_DATA    = ${INSTALL} -m 644
    1824INSTALL_SCRIPT  = ${INSTALL} -m 644
     25VPATH           = $(srcdir)
    1926
    2027.PHONY: all install clean distclean
    2128
     29OBJS            = pymolproxy.o
     30LIBS            = -ltcl8.4
     31
    2232all: $(TARGETS)
    2333
    24 pymolproxy: pymolproxy.o
    25         $(CC) $(CFLAGS) $(LDFLAGS) -DSTANDALONE pymolproxy.c -o pymolproxy -ltcl8.4
     34pymolproxy: $(OBJS)
     35        $(CC) $(CC_SWITCHES) -o $@ $^ $(LIBS)
     36
     37.c.o:
     38        $(CC) $(CC_SWITCHES) -o $@ -c $<
    2639
    2740install: pymolproxy
    2841        $(INSTALL_PROGRAM) pymolproxy $(bindir)/pymolproxy
    29         $(INSTALL_PROGRAM) pymol $(bindir)/pymol
    30         cp -rL @RP_DIR@/lib/pymol $(libdir)/pymol
     42        $(INSTALL_PROGRAM) $(srcdir)/pymol $(bindir)/pymol
     43        cp -rL $(RP_DIR)/lib/pymol $(libdir)/pymol
    3144
    3245clean:
  • trunk/vizservers/pymolproxy/pymolproxy.c

    r914 r940  
    112112    assert(buffer != NULL);
    113113    if (length == 0) {
    114         dyBufferFree(buffer);
     114        dyBufferFree(buffer);
    115115    } else if (length > buffer->used) {
    116         char *newdata;
    117        
    118         newdata = realloc(buffer->data, length);
    119         if (newdata != NULL) {
    120             buffer->data = newdata;
    121             buffer->used = length;
    122             buffer->allocated = length;
    123         }
     116        char *newdata;
     117       
     118        newdata = realloc(buffer->data, length);
     119        if (newdata != NULL) {
     120            buffer->data = newdata;
     121            buffer->used = length;
     122            buffer->allocated = length;
     123        }
    124124    } else {
    125         buffer->used = length;
     125        buffer->used = length;
    126126    }
    127127}
     
    167167    int result, total, left;
    168168
    169     for( total = 0, left = size; left > 0; left -= result)
    170         {
    171             result = read(sock,buffer+total,left);
    172 
    173             if (result > 0) {
    174                 total += result;
    175                 continue;
    176             }
    177                
    178             if ((result < 0) && (errno != EAGAIN) && (errno != EINTR))
    179                 {
    180                     trace("pymolproxy: Error reading sock(%d), %d/%s\n",
    181                           sock, errno,strerror(errno));
    182                     break;
    183                 }
    184 
    185             result = 0;
    186         }
    187 
     169    for( total = 0, left = size; left > 0; left -= result) {
     170        result = read(sock,buffer+total,left);
     171       
     172        if (result > 0) {
     173            total += result;
     174            continue;
     175        }
     176       
     177        if ((result < 0) && (errno != EAGAIN) && (errno != EINTR)) {
     178            trace("pymolproxy: Error reading sock(%d), %d/%s\n",
     179                  sock, errno,strerror(errno));
     180            break;
     181        }
     182       
     183        result = 0;
     184    }
    188185    return(total);
    189186}
     187
     188#ifdef notdef
    190189
    191190static int
     
    194193    int bsize;
    195194
    196     while(bytes)
    197         {
    198             if (bytes > size)
    199                 bsize = size;
    200             else
    201                 bsize = bytes;
    202 
    203             bsize = bread(sock,buffer,bsize);
    204        
    205             bytes -= bsize;     
    206         }
     195    while(bytes) {
     196        if (bytes > size)
     197            bsize = size;
     198        else
     199            bsize = bytes;
     200       
     201        bsize = bread(sock,buffer,bsize);
     202       
     203        bytes -= bsize;     
     204    }
    207205}
    208206
    209207#undef timersub
    210 #undef timeradd
    211 
    212208static void
    213209timersub(struct timeval *a, struct timeval *b, struct timeval *result)
     
    222218}
    223219
     220#endif
     221
    224222static void
    225223timersub_ms(struct timeval *a, struct timeval *b, int *result)
     
    238236}
    239237
    240 
     238#undef timeradd
    241239static void
    242 timeradd(struct timeval *a, struct timeval *b, struct timeval *result)
     240timeradd (struct timeval *a, struct timeval *b, struct timeval *result)
    243241{
    244242    result->tv_sec = a->tv_sec + b->tv_sec;
    245243    result->tv_usec = a->tv_usec + b->tv_usec;
    246244
    247     while(result->tv_usec >= 1000000) {
     245    while (result->tv_usec >= 1000000) {
    248246        result->tv_sec += 1;
    249247        result->tv_usec -= 1000000;
     
    293291            break;
    294292                       
    295         if (buffer[pos] == '\n')
    296             {
    297                 pos++;
    298                 break;
    299             }
    300 
     293        if (buffer[pos] == '\n') {
     294            pos++;
     295            break;
     296        }
    301297        pos++;
    302 
    303298    }
    304299
     
    325320            break;
    326321        }
     322        trace("stdout-u>read(%s)", buffer);
    327323        if (strncmp(buffer, string, strlen(string)) == 0) {
    328324            trace("stdout-e> %s",buffer);
     
    331327            break;
    332328        }
    333         trace("stdout-u>(%s)", buffer);
    334329    }
    335330
     
    348343send_expect(PymolProxy *pymol, char *expect, char *cmd)
    349344{
    350     char string[800];
    351 
    352     if (pymol->error)
     345    if (pymol->error) {
    353346        return(TCL_ERROR);
    354 
     347    }
    355348    trace("to-pymol>(%s)", cmd);
    356349    write(pymol->p_stdin, cmd, strlen(cmd));
     
    661654            push = 1;
    662655        else {
    663             cmd = argv[arg];
     656            cmd = argv[arg];
    664657        }
    665658    }
     
    834827LoadPDBCmd(ClientData cdata, Tcl_Interp *interp, int argc, const char *argv[])
    835828{
    836     const char *pdbdata, *pdb, *name;
    837     char *buf;
    838     char buffer[800];
     829    const char *pdbdata, *name;
    839830    PymolProxy *pymol = (PymolProxy *) cdata;
    840831    int state = 1;
    841832    int arg, defer = 0, push = 0, varg = 1;
    842     char filename[] = "/tmp/fileXXXXXX.pdb";
    843 
    844     clear_error(pymol);
    845 
     833
     834    clear_error(pymol);
     835
     836    pdbdata = name = NULL;      /* Suppress compiler warning. */
    846837    for(arg = 1; arg < argc; arg++) {
    847838        if ( strcmp(argv[arg],"-defer") == 0 )
     
    866857    pymol->immediate_update |= push;
    867858
    868 #ifdef notdef
    869859    {
    870         /* Pymol expects to load the pdb from a file.
    871          * Should create a rappture owned directory to write files.
    872          */
    873         int fd;
    874         char fileName[200];
    875 
    876         sprintf(fileName, "/tmp/pymol-%d.pdb", getpid());
    877         fd = open(fileName,O_WRONLY | O_TRUNC | O_CREAT, 0600);
    878         if (fd < 0) {
    879             Tcl_AppendResult(interp, "pymolproxy: error opening \"", fileName,
    880                 "\": ", strerror(errno), (char *)NULL);
    881             pymol->status = TCL_ERROR;
    882             return TCL_ERROR;
    883         }
    884         write(fd, pdbdata, strlen(pdbdata));
    885         close(fd);
    886         sendf(pymol, "load %s, %s, %d\n", fileName, name, state);
    887     }
    888 #else
    889     {
    890         int count;
    891         const char *p;
    892         char *q, *newdata;
    893 
    894         count = 0;
    895         for (p = pdbdata; *p != '\0'; p++) {
    896             if (*p == '\n') {
    897                 count++;
    898             }
    899             count++;
    900         }
    901        
    902         q = newdata = malloc(count + 100);
    903         strcpy(newdata, "cmd.read_pdbstr(\"\"\"\\\n");
    904         q = newdata + strlen(newdata);
    905         for (p = pdbdata; *p != '\0'; p++, q++) {
    906             if (*p == '\n') {
    907                 *q++ = '\\';
    908             }
    909             *q = *p;
    910         }
    911         sprintf(q, "\\\n\"\"\",\"%s\",%d)\n", name, state);
    912         {
    913             char expect[800];
    914 
    915             sprintf(expect, "PyMOL>\"\"\",\"%s\",%d)\n", name, state);
    916             send_expect(pymol, expect, newdata);
    917         }
    918         free(newdata);
    919     }
    920 #endif
     860        int count;
     861        const char *p;
     862        char *q, *newdata;
     863
     864        count = 0;
     865        for (p = pdbdata; *p != '\0'; p++) {
     866            if (*p == '\n') {
     867                count++;
     868            }
     869            count++;
     870        }
     871       
     872        q = newdata = malloc(count + 100);
     873        strcpy(newdata, "cmd.read_pdbstr(\"\"\"\\\n");
     874        q = newdata + strlen(newdata);
     875        for (p = pdbdata; *p != '\0'; p++, q++) {
     876            if (*p == '\n') {
     877                *q++ = '\\';
     878            }
     879            *q = *p;
     880        }
     881        sprintf(q, "\\\n\"\"\",\"%s\",%d)\n", name, state);
     882        {
     883            char expect[800];
     884
     885            sprintf(expect, "PyMOL>\"\"\",\"%s\",%d)\n", name, state);
     886            send_expect(pymol, expect, newdata);
     887        }
     888        free(newdata);
     889    }
    921890    sendf(pymol, "zoom buffer=2\n");
    922891
     
    10911060    int pairOut[2];
    10921061    int pairErr[2];
    1093     char buffer[800];
    10941062    Tcl_Interp *interp;
    10951063    Tcl_DString cmdbuffer;
     
    11251093    pid = fork();
    11261094       
    1127     if (pid < 0)
     1095    if (pid < 0) {
     1096        fprintf(stderr, "can't fork process: %s\n", strerror(errno));
    11281097        return(-3);
    1129 
    1130     if (pid == 0)  /* child process */
    1131         {
    1132             int i, fd;
    1133 
    1134             /* Create a new process group, so we can later kill this process
    1135              * and all its children without affecting the process that created
    1136              * this one
    1137              */
    1138 
    1139             setpgid(pid, 0);
    1140 
    1141             /* Redirect stdin, stdout, and stderr to pipes before execing               */
    1142 
    1143             dup2(pairIn[0] ,0);  // stdin
    1144             dup2(pairOut[1],1);  // stdout
    1145             dup2(pairErr[1],2);  // stderr
    1146 
    1147             for(fd = 3; fd < FD_SETSIZE; fd++)  /* close all other descriptors  */
    1148                 close(fd);
    1149 
    1150             execvp(argv[0], argv);
    1151             trace("pymolproxy: Failed to start pyMol\n");
    1152             exit(-1);
    1153         }
     1098    }
     1099    if (pid == 0) {
     1100        int fd;
     1101
     1102        /* Child process */
     1103       
     1104        /*
     1105         * Create a new process group, so we can later kill this process and
     1106         * all its children without affecting the process that created this
     1107         * one.
     1108         */
     1109        setpgid(pid, 0);
     1110       
     1111        /* Redirect stdin, stdout, and stderr to pipes before execing */
     1112        dup2(pairIn[0] ,0);  // stdin
     1113        dup2(pairOut[1],1);  // stdout
     1114        dup2(pairErr[1],2);  // stderr
     1115       
     1116        for(fd = 3; fd < FD_SETSIZE; fd++)  /* close all other descriptors  */
     1117            close(fd);
     1118       
     1119        execvp(argv[0], argv);
     1120        trace("pymolproxy: Failed to start pyMol %s\n", argv[0]);
     1121        exit(-1);
     1122    }
    11541123       
    11551124    /* close opposite end of pipe, these now belong to the child process        */
     
    11931162    dyBufferInit(&dybuffer2);
    11941163
    1195     Tcl_CreateCommand(interp, "bmp",     BMPCmd,        &pymol, NULL);
    1196     Tcl_CreateCommand(interp, "png",     PNGCmd,        &pymol, NULL);
    1197     Tcl_CreateCommand(interp, "screen",  ViewportCmd,   &pymol, NULL);
    1198     Tcl_CreateCommand(interp, "viewport",ViewportCmd,   &pymol, NULL);
    1199     Tcl_CreateCommand(interp, "rotate",  RotateCmd,     &pymol, NULL);
    1200     Tcl_CreateCommand(interp, "zoom",    ZoomCmd,       &pymol, NULL);
    1201     Tcl_CreateCommand(interp, "loadpdb", LoadPDBCmd,    &pymol, NULL);
     1164    Tcl_CreateCommand(interp, "bmp",     BMPCmd,        &pymol, NULL);
     1165    Tcl_CreateCommand(interp, "png",     PNGCmd,        &pymol, NULL);
     1166    Tcl_CreateCommand(interp, "screen",  ViewportCmd,   &pymol, NULL);
     1167    Tcl_CreateCommand(interp, "viewport",ViewportCmd,   &pymol, NULL);
     1168    Tcl_CreateCommand(interp, "rotate",  RotateCmd,     &pymol, NULL);
     1169    Tcl_CreateCommand(interp, "zoom",    ZoomCmd,       &pymol, NULL);
     1170    Tcl_CreateCommand(interp, "loadpdb", LoadPDBCmd,    &pymol, NULL);
    12021171    Tcl_CreateCommand(interp, "ballnstick",BallNStickCmd, &pymol, NULL);
    1203     Tcl_CreateCommand(interp, "spheres", SpheresCmd,    &pymol, NULL);
    1204     Tcl_CreateCommand(interp, "lines",   LinesCmd,      &pymol, NULL);
    1205     Tcl_CreateCommand(interp, "raw",     RawCmd,        &pymol, NULL);
    1206     Tcl_CreateCommand(interp, "label",   LabelCmd,      &pymol, NULL);
    1207     Tcl_CreateCommand(interp, "reset",   ResetCmd,      &pymol, NULL);
    1208     Tcl_CreateCommand(interp, "rock",    RockCmd,       &pymol, NULL);
    1209     Tcl_CreateCommand(interp, "frame",   FrameCmd,      &pymol, NULL);
    1210     Tcl_CreateCommand(interp, "vmouse",  VMouseCmd,     &pymol, NULL);
    1211     Tcl_CreateCommand(interp, "disable", DisableCmd,    &pymol, NULL);
    1212     Tcl_CreateCommand(interp, "enable",  EnableCmd,     &pymol, NULL);
     1172    Tcl_CreateCommand(interp, "spheres", SpheresCmd,    &pymol, NULL);
     1173    Tcl_CreateCommand(interp, "lines",   LinesCmd,      &pymol, NULL);
     1174    Tcl_CreateCommand(interp, "raw",     RawCmd,        &pymol, NULL);
     1175    Tcl_CreateCommand(interp, "label",   LabelCmd,      &pymol, NULL);
     1176    Tcl_CreateCommand(interp, "reset",   ResetCmd,      &pymol, NULL);
     1177    Tcl_CreateCommand(interp, "rock",    RockCmd,       &pymol, NULL);
     1178    Tcl_CreateCommand(interp, "frame",   FrameCmd,      &pymol, NULL);
     1179    Tcl_CreateCommand(interp, "vmouse",  VMouseCmd,     &pymol, NULL);
     1180    Tcl_CreateCommand(interp, "disable", DisableCmd,    &pymol, NULL);
     1181    Tcl_CreateCommand(interp, "enable",  EnableCmd,     &pymol, NULL);
    12131182
    12141183    // Main Proxy Loop
     
    13741343{
    13751344    if (debug) {
    1376         flog = stderr;
    1377         flog = fopen("/tmp/pymolproxy.log", "w");
     1345        flog = stderr;
     1346        flog = fopen("/tmp/pymolproxy.log", "w");
    13781347    }   
    13791348    ProxyInit(fileno(stdout), fileno(stdin), argv + 1);
Note: See TracChangeset for help on using the changeset viewer.