source: Sophya/trunk/ArchTOIPipe/SMakefile@ 2389

Last change on this file since 2389 was 1989, checked in by ansari, 23 years ago

Suite retablissement SMakefile apres ecrasement par Cecile - Reza 8/5/2002

File size: 3.6 KB
RevLine 
[1987]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# ###############################################################
[1437]9
[1987]10# include files defining compiler/linker options
11include SMakefile.h
12include ${DPCBASEREP}/Include/Makefile.slb
[1462]13
[1987]14LIBF = $(MYLIB)libKernel.a $(MYLIB)libProcessors.a $(MYLIB)libProcWSophya.a
[1437]15
[1987]16defaut: libs
[1437]17
[1987]18all: libs slb
[1437]19
20
[1987]21libs: archlibs
22slb: archslb
[1437]23
[1987]24archlibs: Kernel Processors ProcWSophya
[1437]25
[1987]26#--- Create directory and copy includes for install
27depend:
28ifdef ARCHPDEVREP
29ifdef 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 ; \
36else
37 @echo "Variable EROSCXX must be define with setenv"
38endif
39else
40 @echo "Variable ARCHPDEVREP must be define with setenv"
41endif
42#--------------------------------------------------------------------
[1529]43
[1987]44#--- Create library module Makefiles
45mkmf:
46 @echo 'Running ./smkmf'
47 ./smkmf
48#--------------------------------------------------------------------
[1529]49
[1987]50.PHONY: Kernel
51Kernel:
52 if [ -d Kernel ] ; then cd Kernel ; $(MAKE) ; fi
[1529]53
[1987]54.PHONY: Processors
55Processors:
56 if [ -d Processors ] ; then cd Processors ; $(MAKE) ; fi
[1529]57
[1987]58.PHONY: ProcWSophya
59ProcWSophya:
60 if [ -d ProcWSophya ] ; then cd ProcWSophya ; $(MAKE) ; fi
[1529]61
[1987]62# Shared library creation part of the Makefile
63
64# List of libraries (.a)
65PSLB = $(MYLIB)libKernel.a $(MYLIB)libProcessors.a $(MYLIB)libProcWSophya.a
[1529]66
[1987]67# List of external library references
68EXTLIBL = -L$(EXTLIBPATH) -lcfitsio -lfftw -lrfftw -lxastro
69EXTSLBL = -L$(EXTSLBPATH) -lcfitsio -lfftw -lrfftw -lxastro
[1529]70
[1987]71# defining the other external libraries needed on different systems
[1529]72
[1987]73# On Linux lapack and blas and f2c/g2c ere needed
74ifeq ($(MACHEROS),Linux)
75#EXTLIB = $(EXTLIBL) -llapack -lblas -lf2c
76#EXTSLB = $(EXTSLBL) -llapack -lblas -lf2c
77EXTLIB = $(EXTLIBL) -llapack -lblas -lg2c
78EXTSLB = $(EXTSLBL) -llapack -lblas -lg2c
79endif
[1529]80
[1987]81# On OSF1 libdxml contains Lapack, but the fortran support library is needed
82ifeq ($(MACHEROS),OSF1)
83EXTLIB = $(EXTLIBL) -ldxml -lfor
84EXTSLB = $(EXTSLBL) -ldxml -lfor
85endif
[1529]86
[1987]87# On IRIX , complib.sgimath contains Lapack
88ifeq ($(MACHEROS),IRIX64)
89EXTLIB = $(EXTLIBL) -lcomplib.sgimath
90EXTSLB = $(EXTSLBL) -lcomplib.sgimath
91endif
[1437]92
[1529]93
[1668]94
[1987]95# XPILIBS = $(LIBXPIPATH) $(LIBXPILIST)
[1437]96
[1989]97# --- Shared lib name (extension) depending on OS
98SLBNAME = $(MYSLB)libpipe.so
99ifeq ($(MACHEROS),Darwin)
100SLBNAME = $(MYSLB)libpipe.dylib
101endif
102
[1987]103# main dependence list
[1989]104archslb : $(SLBNAME)
105
[1987]106# List of .o files for each module
107# OBJKernel = $(shell echo `cat ./Kernel/objlist.list `)
108# OBJProcessors = $(shell echo `cat ./Processors/objlist.list `)
109# OBJProcWSophya = $(shell echo `cat ./ProcWSophya/objlist.list `)
110OBJKernel = $(shell echo `cat ./Kernel/Kernel.o.list `)
111OBJProcessors = $(shell echo `cat ./Processors/Processors.o.list `)
112OBJProcWSophya = $(shell echo `cat ./ProcWSophya/ProcWSophya.o.list `)
[1983]113
[1987]114ALLOBJS = $(OBJKernel) $(OBJProcessors) $(OBJProcWSophya)
115
116# Building ArchTOIPipe shared library
[1989]117$(SLBNAME) : $(PSLB)
[1987]118 cd $(OBJ); \
[1989]119 $(CMDSHLCXX) -o $(SLBNAME) \
[1987]120 $(FGSHLACXX) $(ALLOBJS) $(FGSHLNCXX)\
121 -L$(SLB) -lsophya -lextsophya $(EXTLIB) $(LIBLSHL)
122
123
[1529]124
[1987]125clean:
126 if [ -d $(MYLIB) ] ; then cd $(MYLIB)/. ; rm -f *.a ; fi
127 if [ -d $(MYSLB) ] ; then cd $(MYSLB)/. ; rm -f *.so ; fi
128 if [ -d $(OBJ) ] ; then cd $(OBJ)/. ; rm -f *.o rm -rf cxxrep* ; fi
129
Note: See TracBrowser for help on using the repository browser.