Changeset 1980 in Sophya for trunk/ArchTOIPipe/SMakefile
- Timestamp:
- May 3, 2002, 5:05:31 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/SMakefile
r1699 r1980 1 USERFLAGS = -I$(EXTLIBDIR)/Include/FitsIO -DWITH_SOPHYA 2 include $(DPCBASEREP)/Include/MakefileUser.h 1 # ####################### ArchTOIPipe ########################### 2 # ##### LAL (Orsay) / IN2P3-CNRS DAPNIA/SPP (Saclay) / CEA ##### 3 # ############################################################### 4 # Top level makefile to build ArchTOIPipe library with SOPHYA 5 # Usage : make -f SMakefile mkmf 6 # make -f SMakefile libs 7 # make -f SMakefile slb 8 # ############################################################### 3 9 4 ALIB := ./$(MACHDIR)/ 5 AOBJ := ./$(MACHDIR)/ 10 # include files defining compiler/linker options 11 include SMakefile.h 12 include ${DPCBASEREP}/Include/Makefile.slb 6 13 7 $(AOBJ)%.o:%.cc 8 $(COMPILE.cc) $(USERFLAGS) -o $@ $< 9 $(AOBJ)%.o:%.c 10 $(COMPILE.c) $(CFLAGS) $(USERFLAGS) -o $@ $< 14 LIBF = $(MYLIB)libKernel.a $(MYLIB)libProcessors.a $(MYLIB)libProcWSophya.a 11 15 12 LIBOLIST := $(AOBJ)asciitoiwtr.o $(AOBJ)fitstoirdr.o $(AOBJ)fitstoiwtr.o \ 13 $(AOBJ)toi.o $(AOBJ)toimanager.o $(AOBJ)toiprocessor.o $(AOBJ)genwproc.o \ 14 $(AOBJ)toisqfilter.o $(AOBJ)toiregwindow.o $(AOBJ)toiseqbuff.o \ 15 $(AOBJ)toisegment.o \ 16 $(AOBJ)simtoipr.o $(AOBJ)map2toi.o $(AOBJ)toi2map.o $(AOBJ)nooppr.o 17 EXEOLIST := $(AOBJ)fits2asc.o $(AOBJ)tsttoi.o $(AOBJ)tsttoi2.o $(AOBJ)simtst.o \ 18 $(AOBJ)tstrztoi.o $(AOBJ)rztoi.o $(AOBJ)sfftc.o $(AOBJ)mesovh.o \ 19 $(AOBJ)fits2ascii.o $(AOBJ)tgenw.o $(AOBJ)tstmap2toi.o $(AOBJ)tsttoi2map.o \ 20 $(AOBJ)tstflag.o $(AOBJ)tstdemopipe.o 21 EXELIST := $(AOBJ)sfftc $(AOBJ)simtst $(AOBJ)mesovh $(AOBJ)tstrztoi $(AOBJ)fits2asc $(AOBJ)tsttoi \ 22 $(AOBJ)tsttoi2 $(AOBJ)fits2ascii $(AOBJ)tgenw $(AOBJ)tstmap2toi $(AOBJ)tsttoi2map \ 23 $(AOBJ)tstflag $(AOBJ)tstdemopipe 16 defaut: libs 24 17 25 INCLIST := asciitoiwtr.h fitstoirdr.h fitstoiwtr.h toi.h config.h conf.h \ 26 toiprocessor.h genwproc.h toimanager.h toiseqbuff.h toiregwindow.h \ 27 simtoipr.h map2toi.h toi2map.h nooppr.h toisegment.h 18 all: libs slb 28 19 29 all : $(EXELIST) 30 lib : $(LIBOLIST) 20 21 libs: archlibs 22 slb: archslb 23 24 archlibs: Kernel Processors ProcWSophya 25 26 #--- Create directory and copy includes for install 27 depend: 28 ifdef ARCHPDEVREP 29 ifdef EROSCXX 30 @echo "ArchTOIPipe will be installed under:" 31 @echo " $(ARCHPDEVREP)/Include" 32 @echo " $(ARCHPDEVREP)/`uname`-$(EROSCXX)" 33 ./crerep_pipe $(ARCHPDEVREP) `uname`-$(EROSCXX); \ 34 # ./makefileuser.csh; \ 35 ./mkmflien -copy ; \ 36 else 37 @echo "Variable EROSCXX must be define with setenv" 38 endif 39 else 40 @echo "Variable ARCHPDEVREP must be define with setenv" 41 endif 42 #-------------------------------------------------------------------- 43 44 #--- Create library module Makefiles 45 mkmf: 46 @echo 'Running ./smkmf' 47 ./smkmf 48 #-------------------------------------------------------------------- 49 50 .PHONY: Kernel 51 Kernel: 52 if [ -d Kernel ] ; then cd Kernel ; $(MAKE) ; fi 53 54 .PHONY: Processors 55 Processors: 56 if [ -d Processors ] ; then cd Processors ; $(MAKE) ; fi 57 58 .PHONY: ProcWSophya 59 ProcWSophya: 60 if [ -d ProcWSophya ] ; then cd ProcWSophya ; $(MAKE) ; fi 61 62 # Shared library creation part of the Makefile 63 64 # List of libraries (.a) 65 PSLB = $(MYLIB)libKernel.a $(MYLIB)libProcessors.a $(MYLIB)libProcWSophya.a 66 67 # List of external library references 68 EXTLIBL = -L$(EXTLIBPATH) -lcfitsio -lfftw -lrfftw -lxastro 69 EXTSLBL = -L$(EXTSLBPATH) -lcfitsio -lfftw -lrfftw -lxastro 70 71 # defining the other external libraries needed on different systems 72 73 # On Linux lapack and blas and f2c/g2c ere needed 74 ifeq ($(MACHEROS),Linux) 75 #EXTLIB = $(EXTLIBL) -llapack -lblas -lf2c 76 #EXTSLB = $(EXTSLBL) -llapack -lblas -lf2c 77 EXTLIB = $(EXTLIBL) -llapack -lblas -lg2c 78 EXTSLB = $(EXTSLBL) -llapack -lblas -lg2c 79 endif 80 81 # On OSF1 libdxml contains Lapack, but the fortran support library is needed 82 ifeq ($(MACHEROS),OSF1) 83 EXTLIB = $(EXTLIBL) -ldxml -lfor 84 EXTSLB = $(EXTSLBL) -ldxml -lfor 85 endif 86 87 # On IRIX , complib.sgimath contains Lapack 88 ifeq ($(MACHEROS),IRIX64) 89 EXTLIB = $(EXTLIBL) -lcomplib.sgimath 90 EXTSLB = $(EXTSLBL) -lcomplib.sgimath 91 endif 92 93 94 95 # XPILIBS = $(LIBXPIPATH) $(LIBXPILIST) 96 97 # main dependence list 98 archslb : $(SLB)libpipe.so 99 100 # List of .o files for each module 101 # OBJKernel = $(shell echo `cat ./Kernel/objlist.list `) 102 # OBJProcessors = $(shell echo `cat ./Processors/objlist.list `) 103 # OBJProcWSophya = $(shell echo `cat ./ProcWSophya/objlist.list `) 104 OBJKernel = $(shell echo `cat ./Kernel/Kernel.o.list `) 105 OBJProcessors = $(shell echo `cat ./Processors/Processors.o.list `) 106 OBJProcWSophya = $(shell echo `cat ./ProcWSophya/ProcWSophya.o.list `) 107 108 ALLOBJS = $(OBJKernel) $(OBJProcessors) $(OBJProcWSophya) 109 110 # Building ArchTOIPipe shared library 111 $(SLB)libpipe.so : $(PSLB) 112 cd $(OBJ); \ 113 $(CMDSHLCXX) -o $(MYSLB)libpipe.so \ 114 $(FGSHLACXX) $(ALLOBJS) $(FGSHLNCXX)\ 115 -L$(SLB) -lsophya -lextsophya $(EXTLIB) $(LIBLSHL) 116 117 31 118 32 119 clean: 33 rm -f $(LIBOLIST)34 rm -f $(EXEOLIST)35 rm -f $(EXELIST)120 if [ -d $(MYLIB) ] ; then cd $(MYLIB)/. ; rm -f *.a ; fi 121 if [ -d $(MYSLB) ] ; then cd $(MYSLB)/. ; rm -f *.so ; fi 122 if [ -d $(OBJ) ] ; then cd $(OBJ)/. ; rm -f *.o rm -rf cxxrep* ; fi 36 123 37 LIBF = $(SLB)libsophya.so $(SLB)libextsophya.so38 LIBS = -L$(SLB) -lextsophya -lsophya -lpthread -lm39 ####ifeq ($(MACHEROS),OSF1)40 ####LIBS := $(LIBS) -lfor41 ####endif42 43 ########################################44 #### Les Executables des Programmes ####45 ########################################46 tstrztoi: $(AOBJ)tstrztoi47 @echo done48 $(AOBJ)tstrztoi: $(AOBJ)tstrztoi.o $(AOBJ)rztoi.o $(LIBOLIST)49 $(LINK.cc) -o $@ $^ $(LIBS)50 51 sfftc: $(AOBJ)sfftc52 @echo done53 $(AOBJ)sfftc: $(AOBJ)sfftc.o $(LIBOLIST)54 $(LINK.cc) -o $@ $^ $(LIBS)55 56 mesovh: $(AOBJ)mesovh57 @echo done58 $(AOBJ)mesovh: $(AOBJ)mesovh.o $(LIBOLIST)59 $(LINK.cc) -o $@ $^ $(LIBS)60 61 simtst: $(AOBJ)simtst62 @echo done63 $(AOBJ)simtst: $(AOBJ)simtst.o $(LIBOLIST)64 $(LINK.cc) -o $@ $^ $(LIBS)65 66 fits2asc: $(AOBJ)fits2asc67 @echo done68 $(AOBJ)fits2asc: $(AOBJ)fits2asc.o $(LIBOLIST)69 $(LINK.cc) -o $@ $^ $(LIBS)70 71 tsttoi: $(AOBJ)tsttoi72 @echo done73 $(AOBJ)tsttoi: $(AOBJ)tsttoi.o $(LIBOLIST)74 $(LINK.cc) -o $@ $^ $(LIBS)75 76 tsttoi2: $(AOBJ)tsttoi277 @echo done78 $(AOBJ)tsttoi2: $(AOBJ)tsttoi2.o $(LIBOLIST)79 $(LINK.cc) -o $@ $^ $(LIBS)80 81 fits2ascii: $(AOBJ)fits2ascii82 @echo done83 $(AOBJ)fits2ascii: $(AOBJ)fits2ascii.o $(LIBOLIST)84 $(LINK.cc) -o $@ $^ $(LIBS)85 86 tgenw: $(AOBJ)tgenw87 @echo done88 $(AOBJ)tgenw: $(AOBJ)tgenw.o $(LIBOLIST)89 $(LINK.cc) -o $@ $^ $(LIBS)90 91 tstmap2toi: $(AOBJ)tstmap2toi92 @echo done93 $(AOBJ)tstmap2toi: $(AOBJ)tstmap2toi.o $(LIBOLIST)94 $(LINK.cc) -o $@ $^ $(LIBS)95 96 tsttoi2map: $(AOBJ)tsttoi2map97 @echo done98 $(AOBJ)tsttoi2map: $(AOBJ)tsttoi2map.o $(LIBOLIST)99 $(LINK.cc) -o $@ $^ $(LIBS)100 101 tstflag: $(AOBJ)tstflag102 @echo done103 $(AOBJ)tstflag: $(AOBJ)tstflag.o $(LIBOLIST)104 $(LINK.cc) -o $@ $^ $(LIBS)105 106 tstdemopipe: $(AOBJ)tstdemopipe107 @echo done108 $(AOBJ)tstdemopipe: $(AOBJ)tstdemopipe.o $(LIBOLIST)109 $(LINK.cc) -o $@ $^ $(LIBS)110 111 ################################################112 #### Compilation des Sources des Programmes ####113 ################################################114 $(AOBJ)simtst.o: simtst.cc $(INCLIST)115 $(AOBJ)sfftc.o: sfftc.cc $(INCLIST)116 $(AOBJ)mesovh.o: mesovh.cc $(INCLIST)117 $(AOBJ)tstrztoi.o: tstrztoi.cc rztoi.h $(INCLIST)118 $(AOBJ)rztoi.o: rztoi.cc rztoi.h $(INCLIST)119 $(AOBJ)fits2asc.o: fits2asc.cc $(INCLIST)120 $(AOBJ)tsttoi.o: tsttoi.cc $(INCLIST)121 $(AOBJ)tsttoi2.o: tsttoi2.cc $(INCLIST)122 $(AOBJ)fits2ascii.o: fits2ascii.cc $(INCLIST)123 $(AOBJ)tgenw.o: tgenw.cc $(INCLIST)124 $(AOBJ)tstmap2toi.o: tstmap2toi.cc $(INCLIST)125 $(AOBJ)tsttoi2map.o: tsttoi2map.cc $(INCLIST)126 $(AOBJ)tstflag.o: tstflag.cc $(INCLIST)127 $(AOBJ)tstdemopipe.o: tstdemopipe.cc $(INCLIST)128 129 130 ################################################131 #### Compilation des Sources des Librairies ####132 ################################################133 $(AOBJ)asciitoiwtr.o: asciitoiwtr.cc asciitoiwtr.h toi.h config.h conf.h toiprocessor.h toimanager.h134 $(AOBJ)fitstoirdr.o: fitstoirdr.cc fitstoirdr.h toiprocessor.h config.h conf.h135 $(AOBJ)fitstoiwtr.o: fitstoiwtr.cc fitstoiwtr.h toi.h config.h conf.h136 $(AOBJ)toi.o: toi.cc toiprocessor.h config.h conf.h toi.h137 $(AOBJ)toimanager.o: toimanager.cc toimanager.h138 $(AOBJ)toiprocessor.o: toiprocessor.cc toiprocessor.h config.h conf.h toi.h toimanager.h139 $(AOBJ)genwproc.o: genwproc.h toiprocessor.h toimanager.h140 $(AOBJ)toisqfilter.o: toisqfilter.cc toisqfilter.h toiprocessor.h config.h conf.h toi.h toimanager.h141 $(AOBJ)toiseqbuff.o: toiseqbuff.cc toiprocessor.h config.h conf.h toi.h toiseqbuff.h142 $(AOBJ)toiregwindow.o: toiregwindow.cc toiprocessor.h config.h conf.h toi.h toiregwindow.h143 $(AOBJ)simtoipr.o: simtoipr.cc toiprocessor.h config.h conf.h toi.h simtoipr.h144 $(AOBJ)map2toi.o: map2toi.cc map2toi.h145 $(AOBJ)toi2map.o: toi2map.cc toi2map.h146 $(AOBJ)nooppr.o: nooppr.cc nooppr.h147 $(AOBJ)toisegment.o: toisegment.cc toiprocessor.h config.h conf.h toi.h
Note:
See TracChangeset
for help on using the changeset viewer.