thr/nonthr flavours used correctly
authorAleš Křenek <ljocha@ics.muni.cz>
Wed, 7 Jul 2004 09:24:57 +0000 (09:24 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Wed, 7 Jul 2004 09:24:57 +0000 (09:24 +0000)
org.glite.lb.logger/Makefile
org.glite.lb.logger/build.xml

index c3c2713..a47c749 100644 (file)
@@ -1,31 +1,56 @@
-include Makefile.inc
+# defaults
+top_srcdir=.
+builddir=build
+top_builddir=${top_srcdir}/${builddir}
+stagedir=.
+distdir=.
+globalprefix=glite
+lbprefix=lb
+package=glite-lb-client
+version=0.0.0
+PREFIX=/opt/glite
+
+glite_location=/opt/glite
+globus_prefix=/opt/globus
+nothrflavour=gcc32
+thrflavour=gcc32pthr
+expat_prefix=/opt/expat
+ares_prefix=/opt/ares
+
+-include Makefile.inc
+
+VPATH:=${top_srcdir}/src
+
+VERSION=-DVERSION=\"GLite-${version}\"
 
-VPATH:=${src}
+SUFFIXES=.no
 
-# XXX
-VERSION=-DVERSION=\"glite-test\"
+GLOBUSINC=-I${globus_prefix}/include/${nothrflavour} \
+       -I${globus_prefix}/include/${nothrflavour}/openssl
 
-SUFFIXES=.no
+GLOBUSTHRINC=-I${globus_prefix}/include/${thrflavour} \
+       -I${globus_prefix}/include/${thrflavour}/openssl
 
 DEBUG:=-g -O0
 CFLAGS:=${DEBUG} \
-       -I${stageinc} -I${src} \
-       -I${repository}/${globus}/include/${globusflavour} \
-       -I${repository}/${globus}/include/${globusflavour}/openssl \
+       -I${stagedir}/include -I${top_srcdir}/src \
        -D_GNU_SOURCE \
        ${VERSION}
 
-LDFLAGS:=-L${stagelib}
+LDFLAGS:=-L${stagedir}/lib
 LINK:=libtool --mode=link ${CC} ${LDFLAGS}
 INSTALL:=libtool --mode=install install
 
-GLOBUS_LIBS:= -L${repository}/${globus}/lib \
-       -lglobus_common_${globusflavour} \
-       -lssl_${globusflavour}
+GLOBUS_LIBS:= -L${globus_prefix}/lib \
+       -lglobus_common_${nothrflavour} \
+       -lssl_${nothrflavour}
+
+GLOBUS_THRLIBS:= -L${globus_prefix}/lib \
+       -lglobus_common_${thrflavour} \
+       -lssl_${thrflavour}
 
-EXT_LIBS:= ${GLOBUS_LIBS} \
-       -L${repository}/${ares}/lib -lares \
-       -L${repository}/${expat}/lib -lexpat
+EXT_LIBS:= -L${ares_prefix}/lib -lares \
+       -L${expat_prefix}/lib -lexpat
 
 HELPERS:=-lglite_wms_tls_ssl_helpers
 PHELPERS:=-lglite_wms_tls_ssl_pthr_helpers
@@ -46,21 +71,28 @@ default: all
 compile: glite_lb_logd glite_lb_interlogd glite_lb_notif_interlogd
 
 stage export all: compile
-       ${INSTALL} -m 755 glite_lb_logd glite_lb_interlogd glite_lb_notif_interlogd ${stagebin}
+       ${INSTALL} -m 755 glite_lb_logd glite_lb_interlogd glite_lb_notif_interlogd ${stagedir}/bin
 
 check:
        echo No unit tests so far
 
 glite_lb_logd: ${LOGD_OBJS}
-       ${LINK} -o $@ ${LOGD_OBJS} ${COMMON_LIB} ${HELPERS} ${EXT_LIBS} 
+       ${LINK} -o $@ ${LOGD_OBJS} ${COMMON_LIB}_${nothrflavour} ${HELPERS} ${EXT_LIBS} ${GLOBUS_LIBS}
 
 glite_lb_interlogd: ${INTERLOG_OBJS}
        ${LINK} -o $@ ${INTERLOG_OBJS} \
-               ${COMMON_LIB} ${HELPERS} ${PHELPERS} ${EXT_LIBS} -lpthread
+               ${COMMON_LIB}_${thrflavour} ${HELPERS} ${PHELPERS} ${EXT_LIBS} ${GLOBUS_THRLIBS} -lpthread
 
 glite_lb_notif_interlogd: ${INTERLOG_NOBJS}
        ${LINK} -o $@ ${INTERLOG_NOBJS} \
-               ${COMMON_LIB} ${HELPERS} ${PHELPERS} ${EXT_LIBS} -lpthread
+               ${COMMON_LIB}_${thrflavour} ${HELPERS} ${PHELPERS} ${EXT_LIBS} ${GLOBUS_THRLIBS} -lpthread
 
 %.no: %.c
-       ${CC} ${CFLAGS} -DIL_NOTIFICATIONS -c $< -o $@
+       ${CC} ${CFLAGS} ${GLOBUSTHRINC} -DIL_NOTIFICATIONS -c $< -o $@
+
+${INTERLOG_OBJS}: %.o: %.c
+       ${CC} ${CFLAGS} ${GLOBUSTHRINC} -c $< -o $@
+
+${LOGD_OBJS}: %.o: %.c
+       ${CC} ${CFLAGS} ${GLOBUSINC} -c $< -o $@
+
index 4aa4105..1076f05 100755 (executable)
@@ -1,30 +1,99 @@
 <?xml version="1.0" encoding="UTF-8" ?>
+<!--
+       Copyright (c) 2004 on behalf of the EU EGEE Project: 
+       The European Organization for Nuclear Research (CERN), 
+       Istituto Nazionale di Fisica Nucleare (INFN), Italy
+       Datamat Spa, Italy
+       Centre National de la Recherche Scientifique (CNRS), France
+       CS Systeme d'Information (CSSI), France
+       Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden
+       Universiteit van Amsterdam (UvA), Netherlands
+       University of Helsinki (UH.HIP), Finland
+       University of Bergen (UiB), Norway
+       Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom
 
-<project name="lb" default="dist">
+       Build file for the GLite LB Client module
        
+       Authors: Ales Krenek <ljocha@ics.muni.cz>
+       Version info: $Id$
+       Release: $Name$
+
+       Revision history:
+       $Log$
+       Revision 1.3  2004/07/06 17:45:30  flammer
+       Update of classpath definitions, targets & configure file.
+       
+       Revision 1.2  2004/06/23 00:29:33  dimeglio
+       Added standard comments and handling of support files
+       
+-->
+
+<project name="logger" default="compile">
+       
+       <!-- =========================================
+                Builds the GLite LB Client Module
+            ========================================= -->
+       
+       <!-- =========================================
+            Import properties (order is important)
+            ========================================= -->
+
+       <!-- import baseline & user properties -->
        <import file="../org.glite/project/baseline.properties.xml" />
+
+       <!-- import component build properties,
+                       component properties &
+                       component common properties -->
        <import file="./project/properties.xml"/>
+       
+       <!-- import subsystem build properties,
+                       subsystem properties &
+                       subsystem common properties -->
        <import file="${subsystem.properties.file}"/>
-       <import file="${global.properties.file}" />
 
+       <!-- import global build properties &
+                       global properties -->
+       <import file="${global.properties.file}" />
+               
+       <!-- =========================================
+                Load dependency property files (order is important)
+            ========================================= -->
        <property file="${user.dependencies.file}"/>
        <property file="${component.dependencies.file}" />
        <property file="${subsystem.dependencies.file}" />
        <property file="${global.dependencies.file}"/>
        
+       <!-- =========================================
+                Load configure options (order is important)
+            ========================================= -->
+       <import file="${global.configure.options.file}"/>
+       <import file="${component.configure.options.file}"/>
+
+       <!-- =========================================
+                Import task definitions (order is important)
+            ========================================= -->
        <import file="${subsystem.taskdefs.file}" />
        <import file="${global.taskdefs.file}" />
+                       
+       <!-- =========================================
+                Load common targets
+            ========================================= -->
+       <import file="${global.targets-simple_make.file}" />
 
-       <import file="${global.targets-external-dependencies.file}"/>   
-       <import file="${global.targets-make.file}" />
-               
+       <!-- =========================================
+                Load version file 
+            ========================================= -->
        <property file="${module.version.file}"/>
-
+               
+       <!-- ==============================================
+                Local private targets
+            ============================================== -->
+       
        <target name="localinit"
                description="Module specific initialization tasks">
-               <antcall target="lbmakefiles"/>
+               <antcall target="lbmakefiles" />
        </target>
-
+               
        <target name="localcompile"
                description="Module specific compile tasks">
        </target>