package Dy

use Fd    v4r07
use Xform v0r9999
use root  v3r10p2

tag OSF1_lib OSF1 VEGA
tag Linux-i686_lib Linux VEGA


setup_script set_alias

# The includes
include_dirs $(DYROOT)/src $(DYROOT)/src/mysiesta $(DYROOT)/src/xform \
             $(DYROOT)/src/userfct $(ROOTROOT)/root/include 

private
macro constituents "VViewerSelectorDict UserFctDict VDyPlotDict URZoomSeveralDict Wrapper_checkDict dataDisplay" \
  VEGA "VViewerSelectorDict UserFctDict VDyPlotDict URZoomSeveralDict Wrapper_checkDict DataDisplay"

# A special compilation macro for the vega version
macro lib_DyVega_cppflags "-DUSE_VEGA"
macro lib_DyVega_cflags "-DUSE_VEGA"

macro c_silent ""
macro lib_silent ""
macro link_silent ""

# For finding M_PI, we must not be in ANSI mode on Linux
# To remove the "-ansi -pedantic" option
macro_remove cflags "" \
  alpha   "-ansi -pedantic" \
  RIO806X "-ansi -pedantic" \
  Linux   "-ansi -pedantic"

# The link libraries
# For root

macro cflags "" \
	Linux " -fPIC "

macro+ Dy_linkopts " -L$(FDROOT)/$(tag) -lFd -L$(ROOTLIBPATH) \
  -lCore -lCint -lHist -lGraf -lGraf3d -lMatrix -lGpad -lPostscript -lGui "
# For finding the shared libraries
macro+ Dy_linkopts "" \
  OSF1  "-Wl,-rpath,$(RPATH) " \
  Linux "-Wl,-rpath,$(DYROOT)/$(Dy_tag) "


# The compilation options (we trick them a bit because of C++ style comments)
macro_append cflags    "" OSF1 " -O3 -arch ev5 -nostdnew " Linux " -O "

# The default rootcint flag and the specific flag for URZoomSeveralDict
macro rootcint_flags " -p -D__cplusplus "
macro URZoomSeveralDict_rootcint_flags "-D__CINT__"


# The rootcint constructions
document rootcint VViewerSelectorDict -s=mysiesta VViewerSelector.h \
   VViewerSelectorCint.h VViewerSelector_LinkDef.h 
document rootcint VDyPlotDict -s=mysiesta VDyPlot.h
document rootcint URZoomSeveralDict -s=mysiesta URZoomSeveral.cc \
  URZoomSeveral_LinkDef.h
document rootcint Wrapper_checkDict Wrapper_fl_check_forms.cc    \
  Wrapper_LinkDef.h
document rootcint UserFctDict -s=userfct AddVect.C DivVect.C \
  HighPassFilter.C Integrator.C LowPassFilter.C MultVect.C SubVect.C \
  AddVect.h DivVect.h HighPassFilter.h Integrator.h LowPassFilter.h MultVect.h SubVect.h \
  UserFct_LinkDef.h 

# A special macro to get around a problem with threads on Linux
macro+ otherSources "" \
  Linux " -s=../src jmThread.c"

public

# The application
application dataDisplay LINKMACRO=$(cpplink) -no_prototypes dataDisplay.c  \
  DyXform.c DyVar.c DyCm.c DyDd.c DyConfig.c DyDump.c DyFiles.c            \
  DyHelp.c DyPlot.c DyVisu.c fselector.c DyXformUser.c          \
  -s=mysiesta UArrayL.c UFrameL.c UJobL.c UMathL.c URPlot.c USignalL.c                \
  URootAccess.cc URootProcess.cc VDyPlot.cc VViewerSelector.cc VViewerSelectorCint.cc \
  $(otherSources)                                                          \
  -s=../$(Dy_tag) VDyPlotDict.cc URZoomSeveralDict.cc Wrapper_checkDict.cc \
  VViewerSelectorDict.cc UserFctDict.cc \
  -s=xform cmservers.c dumpdata.c getdd.c inputfile.c mainbrowser.c        \
  plot1d.c mainpanel.c plot2d.c plotaudio.c plotgenepar.c plotfft.c        \
  plotffttime.c plot1dtime.c plottrfct.c plottime.c userfuncbrowser.c plotraw.c

library DataDisplay LINKMACRO=$(cpplink) -no_prototypes dataDisplay.c  \
  DyXform.c DyVar.c DyCm.c DyDd.c DyConfig.c DyDump.c DyFiles.c            \
  DyHelp.c DyPlot.c DyVisu.c fselector.c DyXformUser.c          \
  -s=mysiesta UArrayL.c UFrameL.c UJobL.c UMathL.c URPlot.c USignalL.c  \
  URootAccess.cc URootProcess.cc VDyPlot.cc VViewerSelector.cc VViewerSelectorCint.cc \
  $(otherSources)                                                          \
  -s=../$(Dy_tag) VDyPlotDict.cc URZoomSeveralDict.cc Wrapper_checkDict.cc \
  VViewerSelectorDict.cc UserFctDict.cc \
  -s=xform cmservers.c dumpdata.c getdd.c inputfile.c mainbrowser.c        \
  plot1d.c mainpanel.c plot2d.c plotaudio.c plotgenepar.c plotfft.c        \
  plotffttime.c plot1dtime.c plottrfct.c plottime.c userfuncbrowser.c plotraw.c
