| 1 | include $(SOPHYABASE)/include/sophyamake.inc
 | 
|---|
| 2 | 
 | 
|---|
| 3 | defaut: libs
 | 
|---|
| 4 | 
 | 
|---|
| 5 | all: libs extlibs PI
 | 
|---|
| 6 | libs: cxxlibs
 | 
|---|
| 7 | extlibs : cxxextlibs
 | 
|---|
| 8 | 
 | 
|---|
| 9 | cxxlibs::
 | 
|---|
| 10 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/BaseTools.conf ] ; then cd  ../BaseTools ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 11 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/SysTools.conf ] ; then cd  ../SysTools ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 12 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/SUtils.conf ] ; then cd  ../SUtils ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 13 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/TArray.conf ] ; then cd  ../TArray ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 14 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/NTools.conf ] ; then cd  ../NTools ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 15 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/HiStats.conf ] ; then cd  ../HiStats ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 16 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/SkyMap.conf ] ; then cd  ../SkyMap ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 17 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/Samba.conf ] ; then cd  ../Samba ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 18 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/SkyT.conf ] ; then cd  ../SkyT ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 19 | 
 | 
|---|
| 20 | cxxextlibs::
 | 
|---|
| 21 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/FitsIOServer.conf ] ; then cd  ../FitsIOServer ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 22 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/IFFTW.conf ] ; then cd  ../IFFTW ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 23 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/LinAlg.conf ] ; then cd  ../LinAlg ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 24 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/XAstroPack.conf ] ; then cd  ../XAstroPack ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 25 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/MinuitAdapt.conf ] ; then cd  ../MinuitAdapt ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 26 |  
 | 
|---|
| 27 | PI::
 | 
|---|
| 28 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/PI.conf ] ; then cd ../PI ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 29 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/PIGcont.conf ] ; then cd ../PIGcont ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 30 |         if [ -f $(SOPHYAINCP)/SophyaConfInfo/PIext.conf ] ; then cd ../PIext ; $(MAKE) -f smakefile ; fi
 | 
|---|
| 31 | 
 | 
|---|
| 32 | #  Shared library creation part of the Makefile
 | 
|---|
| 33 | 
 | 
|---|
| 34 | #  main dependence list
 | 
|---|
| 35 | slball : slb slbext slbpi 
 | 
|---|
| 36 | slb : $(SOPHYASLBP)libsophya.$(SLEXT)
 | 
|---|
| 37 | slbext : $(SOPHYASLBP)libextsophya.$(SLEXT)    
 | 
|---|
| 38 | slbpi : $(SOPHYASLBP)libPI.$(SLEXT)
 | 
|---|
| 39 |  
 | 
|---|
| 40 | # List of .o files for SOPHYA  module
 | 
|---|
| 41 | ALLOBJSF = $(SOPHYAINCP)/SophyaConfInfo/libsophya.objlist
 | 
|---|
| 42 |  
 | 
|---|
| 43 | # List of .o files modules with reference to external libraries
 | 
|---|
| 44 | ALLEXTOBJSF = $(SOPHYAINCP)/SophyaConfInfo/libextsophya.objlist
 | 
|---|
| 45 | 
 | 
|---|
| 46 | # List of .o files for PI modules 
 | 
|---|
| 47 | ALLPIOBJSF = $(SOPHYAINCP)/SophyaConfInfo/libPI.objlist
 | 
|---|
| 48 |  
 | 
|---|
| 49 | # Building Sophya shared library
 | 
|---|
| 50 | $(SOPHYASLBP)libsophya.$(SLEXT) : $(ALLOBJSF)
 | 
|---|
| 51 |         echo `cat $(ALLOBJSF)` ; \
 | 
|---|
| 52 |         cd  $(SOPHYAOBJP); \
 | 
|---|
| 53 |         $(CMDSHLCXX) -o $@  `cat $(ALLOBJSF) ` $(SOPBASELIBS)
 | 
|---|
| 54 |  
 | 
|---|
| 55 | # Building ExtSophya shared library
 | 
|---|
| 56 | $(SOPHYASLBP)libextsophya.$(SLEXT) : $(ALLEXTOBJSF)
 | 
|---|
| 57 |         echo `cat $(ALLEXTOBJSF)` ; \
 | 
|---|
| 58 |         cd  $(SOPHYAOBJP); \
 | 
|---|
| 59 |         $(CMDSHLCXX) -o $@  `cat $(ALLEXTOBJSF) ` \
 | 
|---|
| 60 |         $(SOPHYASLBLIST) $(SOPEXTLIBS)
 | 
|---|
| 61 | 
 | 
|---|
| 62 | # Building PI shared library
 | 
|---|
| 63 | $(SOPHYASLBP)libPI.$(SLEXT) : $(ALLPIOBJSF)
 | 
|---|
| 64 |         echo `cat $(ALLPIOBJSF)` ; \
 | 
|---|
| 65 |         cd  $(SOPHYAOBJP); \
 | 
|---|
| 66 |         $(CMDSHLCXX) -o $@ `cat $(ALLPIOBJSF) ` \
 | 
|---|
| 67 |         $(SOPHYAEXTSLBLIST) $(PILIBS)
 | 
|---|
| 68 | 
 | 
|---|
| 69 | #  Cleaning targets
 | 
|---|
| 70 | clean:
 | 
|---|
| 71 |         if [ -d $(SOPHYALIBP) ] ; then cd $(SOPHYALIBP)/. ; rm -f *.a  ; fi
 | 
|---|
| 72 |         if [ -d $(SOPHYASLBP) ] ; then cd $(SOPHYASLBP)/. ; rm -f *.so ; fi
 | 
|---|
| 73 |         if [ -d $(SOPHYAEXEP) ] ; then cd $(SOPHYAEXEP)/. ; rm -f * ; fi
 | 
|---|
| 74 |         if [ -d $(SOPHYAOBJP) ] ; then cd $(SOPHYAOBJP)/. ; rm -rf *.o cxxrep templateregistry ; fi
 | 
|---|
| 75 | 
 | 
|---|
| 76 | cleanobj:
 | 
|---|
| 77 |         if [ -d $(SOPHYAOBJP) ] ; then rm -rf $(SOPHYAOBJP) ; fi
 | 
|---|
| 78 | 
 | 
|---|
| 79 | #  Various main program builds
 | 
|---|
| 80 | prgall : tests prgutil prgmap progpi
 | 
|---|
| 81 | piapp : progpi
 | 
|---|
| 82 | spiapp : progpi
 | 
|---|
| 83 | 
 | 
|---|
| 84 | basetests:
 | 
|---|
| 85 |         cd ../Tests/ ; make -f smakefile arrt carrt tnt tobjio
 | 
|---|
| 86 | 
 | 
|---|
| 87 | tests:
 | 
|---|
| 88 |         cd ../Tests/ ; make -f smakefile 
 | 
|---|
| 89 | 
 | 
|---|
| 90 | prgutil:
 | 
|---|
| 91 |         cd ../PrgUtil/ ; make -f smakefile 
 | 
|---|
| 92 | 
 | 
|---|
| 93 | progpi:
 | 
|---|
| 94 |         cd ../ProgPI/ ; make -f smakefile 
 | 
|---|
| 95 | 
 | 
|---|
| 96 | prgmap:
 | 
|---|
| 97 |         cd ../PrgMap/ ; make -f smakefile 
 | 
|---|
| 98 | 
 | 
|---|
| 99 | pmixer:
 | 
|---|
| 100 |         cd ../PMixer/ ; make -f smakefile 
 | 
|---|
| 101 | 
 | 
|---|