This hint introduces the globus-makefile-header command and some usage considerations.
globus-makefile-header is the tool provided by the Globus Toolkit 2.2 to generate platform and installation specific information. It has the same functionality as the well known autoconf tools.
The input parameters are:
- The flavor you want for your binary: gcc32, gcc32dbg for debugging purposes, and gcc32pthr for a multi-thread binary. The flavor encapsulates compile-time options for the modules you are building.
- The modules that are used in your application and that need to be linked with your application are one or more of the following:
- The --static flag can be used to get a proper list of dependencies when using static linking. Otherwise, the dependencies are printed in their shared library form.
The output will be a list of pairs (VARIABLE = value) that can be used in a Makefile as compiler and linker parameters. For example:
GLOBUS_CFLAGS = -D_FILE_OFFSET_BITS=64 -O -Wall
GLOBUS_INCLUDES = -I/usr/local/globus/include/gcc32
GLOBUS_LDFLAGS = -L/usr/local/globus/lib -L/usr/local/globus/lib
GLOBUS_PKG_LIBS = -lglobus_gram_client_gcc32 -lglobus_gass_server_ez_gcc32 -lglobus_ftp_client_gcc32 -lglobus_gram_protocol_gcc32 -lglobus_gass_transfer_gcc32 -lglobus_ftp_control_gcc32 -lglobus_io_gcc32 -lglobus_gss_assist_gcc32 -lglobus_gssapi_gsi_gcc32 -lglobus_gsi_proxy_core_gcc32 -lglobus_gsi_credential_gcc32 -lglobus_gsi_callback_gcc32 -lglobus_oldgaa_gcc32 -lglobus_gsi_sysconfig_gcc32 -lglobus_gsi_cert_utils_gcc32 -lglobus_openssl_error_gcc32 -lglobus_openssl_gcc32 -lglobus_proxy_ssl_gcc32 -lssl_gcc32 -lcrypto_gcc32 -lglobus_common_gcc32
GLOBUS_CPPFLAGS = -I/usr/local/globus/include -I/usr/local/globus/include/gcc32
These variables are built based on the local installation of the Globus Toolkit 2.2 and provide an easy way to know where the Globus header files or the Globus libraries are located.
Consequently, the procedure to compile a Globus application is the following:
- Generate an output file (globus_header in the example) that will set up all the variables used later in the compile phase: globus-makefile-header --flavor=gcc32 globus_io globus_gss_assist globus_ftp_client globus_ftp_control globus_gram_job globus_common globus_gram_client globus_gass_server_ez globus_openldap > globus_header
- Add the following line in your Makefile to include this file: include globus_header
- Compile by using make.
Sometimes the package may be not be available in all flavors. globus-makefile-header will only tell you that the package you required does not match the query but not inform you that it exists in another flavor.
This material has not been submitted to any formal IBM test and is published AS IS. It has not been the subject of rigorous review. IBM assumes no responsibility for its accuracy or completeness. The use of this information or the implementation of any of these techniques is a client responsibility and depends upon the client's ability to evaluate and integrate them into the client's operational environment.