https://github.com/root-project/root
Tip revision: 4650cc30aeef9d1806540778c306047407f75f4f authored by Rene Brun on 14 May 2008, 14:51:27 UTC
tagging development version 5.19/04
tagging development version 5.19/04
Tip revision: 4650cc3
Module.mk
# Module.mk for proofd module
# Copyright (c) 2000 Rene Brun and Fons Rademakers
#
# Author: Fons Rademakers, 29/2/2000
MODNAME := proofd
MODDIR := proof/$(MODNAME)
MODDIRS := $(MODDIR)/src
MODDIRI := $(MODDIR)/inc
PROOFDDIR := $(MODDIR)
PROOFDDIRS := $(PROOFDDIR)/src
PROOFDDIRI := $(PROOFDDIR)/inc
ifeq ($(PLATFORM),win32)
##### XrdProofd plugin ####
XPDH := $(wildcard $(MODDIRI)/X*.h)
XPDS := $(wildcard $(MODDIRS)/X*.cxx)
XPDO := $(XPDS:.cxx=.o)
XPDO := $(MODDIRS)/XProofProtUtils.o
##### Object files used by libProofx #####
XPCONNH := $(MODDIRI)/XrdProofConn.h $(MODDIRI)/XrdProofPhyConn.h \
$(MODDIRI)/XProofProtUtils.h
XPCONNS := $(MODDIRS)/XrdProofConn.cxx $(MODDIRS)/XrdProofPhyConn.cxx \
$(MODDIRS)/XProofProtUtils.cxx
XPCONNO := $(MODDIRS)/XrdProofConn.o $(MODDIRS)/XrdProofPhyConn.o \
$(MODDIRS)/XProofProtUtils.o
XPDDEP := $(XPCONNO:.o=.d)
XPDLIB := $(LPATH)/libXrdProofd.$(SOEXT)
# Extra include paths and libs
XPDINCEXTRA := $(XROOTDDIRI:%=-I%)
XPDINCEXTRA += $(PROOFDDIRI:%=-I%)
XPDLIBEXTRA += $(XROOTDDIRL)/libXrdClient.lib
# used in the main Makefile
PROOFDEXEH := $(MODDIRI)/proofdp.h
ALLHDRS += $(patsubst $(MODDIRI)/%.h,include/%.h,$(PROOFDEXEH))
ALLLIBS += $(XPDLIB)
# include all dependency files
INCLUDEFILES += $(XPDDEP)
##### local rules #####
.PHONY: all-$(MODNAME) clean-$(MODNAME) distclean-$(MODNAME)
include/%.h: $(PROOFDDIRI)/%.h
cp $< $@
$(XPDLIB): $(XPCONNO) $(XPCONNH) $(XRDPLUGINS) $(ORDER_) $(MAINLIBS)
@$(MAKELIB) $(PLATFORM) $(LD) "$(LDFLAGS)" \
"$(SOFLAGS)" libXrdProofd.$(SOEXT) $@ "$(XPDO)" \
"$(XPDLIBEXTRA)"
all-$(MODNAME): $(XPDLIB)
clean-$(MODNAME):
@rm -f $(XPCONNO)
clean:: clean-$(MODNAME)
distclean-$(MODNAME): clean-$(MODNAME)
@rm -f $(XPDDEP) $(XPDLIB)
distclean:: distclean-$(MODNAME)
##### extra rules ######
$(XPCONNO): CXXFLAGS += $(XPDINCEXTRA) $(EXTRA_XRDFLAGS)
else
##### proofd #####
PROOFDEXEH := $(MODDIRI)/proofdp.h
PROOFDEXES := $(MODDIRS)/proofd.cxx
PROOFDEXEO := $(PROOFDEXES:.cxx=.o)
PROOFDDEP := $(PROOFDEXEO:.o=.d)
PROOFDEXE := bin/proofd
##### XrdProofd plugin ####
XPDH := $(wildcard $(MODDIRI)/X*.h)
XPDS := $(wildcard $(MODDIRS)/X*.cxx)
XPDO := $(XPDS:.cxx=.o)
XPDDEP := $(XPDO:.o=.d)
XPDLIB := $(LPATH)/libXrdProofd.$(SOEXT)
##### Object files used by libProofx #####
XPCONNO := $(MODDIRS)/XrdProofConn.o $(MODDIRS)/XrdProofPhyConn.o \
$(MODDIRS)/XProofProtUtils.o
# These are undefined if using an external XROOTD distribution
# The new XROOTD build system based on autotools installs the headers
# under <dir>/include/xrootd, while the old system under <dir>/src
ifneq ($(XROOTDDIR),)
ifeq ($(XROOTDDIRI),)
XROOTDDIRI := $(XROOTDDIR)/include/xrootd
ifeq ($(wildcard $(XROOTDDIRI)/*.hh),)
XROOTDDIRI := $(XROOTDDIR)/src
endif
XROOTDDIRL := $(XROOTDDIR)/lib
endif
endif
# Extra include paths and libs
ifeq ($(BUILDXRD),yes)
XPDINCEXTRA := $(XROOTDDIRI:%=-I%)
XPDINCEXTRA += $(PROOFDDIRI:%=-I%)
XPDLIBEXTRA += -L$(XROOTDDIRL) -lXrdOuc -lXrdNet -lXrdSys \
-L$(XROOTDDIRP) -lXrdClient -lXrdSut
endif
# used in the main Makefile
ALLHDRS += $(patsubst $(MODDIRI)/%.h,include/%.h,$(PROOFDEXEH))
ALLEXECS += $(PROOFDEXE)
ifeq ($(BUILDXRD),yes)
ALLLIBS += $(XPDLIB)
endif
# include all dependency files
ifeq ($(BUILDXRD),yes)
INCLUDEFILES += $(PROOFDDEP) $(XPDDEP)
else
INCLUDEFILES += $(PROOFDDEP)
endif
##### local rules #####
.PHONY: all-$(MODNAME) clean-$(MODNAME) distclean-$(MODNAME)
include/%.h: $(PROOFDDIRI)/%.h
cp $< $@
$(PROOFDEXE): $(PROOFDEXEO) $(RSAO) $(SNPRINTFO) $(GLBPATCHO) $(RPDUTILO)
$(LD) $(LDFLAGS) -o $@ $(PROOFDEXEO) $(RPDUTILO) $(GLBPATCHO) \
$(RSAO) $(SNPRINTFO) $(CRYPTLIBS) $(AUTHLIBS) $(SYSLIBS)
$(XPDLIB): $(XPDO) $(XPDH) $(ORDER_) $(MAINLIBS) $(XRDPLUGINS)
@$(MAKELIB) $(PLATFORM) $(LD) "$(LDFLAGS)" \
"$(SOFLAGS)" libXrdProofd.$(SOEXT) $@ "$(XPDO)" \
"$(XPDLIBEXTRA)"
all-$(MODNAME): $(PROOFDEXE) $(XPDLIB)
clean-$(MODNAME):
@rm -f $(PROOFDEXEO) $(XPDO)
clean:: clean-$(MODNAME)
distclean-$(MODNAME): clean-$(MODNAME)
@rm -f $(PROOFDDEP) $(PROOFDEXE) $(XPDDEP) $(XPDLIB)
distclean:: distclean-$(MODNAME)
##### extra rules ######
$(PROOFDEXEO): CXXFLAGS += $(AUTHFLAGS)
$(PROOFDEXEO): PCHCXXFLAGS =
$(XPDO): PCHCXXFLAGS =
$(XPDO): $(XRDPLUGINS)
ifneq ($(ICC_GE_9),)
# remove when xrootd has moved from strstream.h -> sstream.
$(XPDO): CXXFLAGS += -Wno-deprecated $(XPDINCEXTRA) $(EXTRA_XRDFLAGS)
else
ifneq ($(GCC_MAJOR),2)
# remove when xrootd has moved from strstream.h -> sstream.
$(XPDO): CXXFLAGS += -Wno-deprecated $(XPDINCEXTRA) $(EXTRA_XRDFLAGS)
else
$(XPDO): CXXFLAGS += $(XPDINCEXTRA) $(EXTRA_XRDFLAGS)
endif
endif
endif