source: Sophya/trunk/ArchTOIPipe/SMakefile@ 2125

Last change on this file since 2125 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
Line 
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# ###############################################################
9
10# include files defining compiler/linker options
11include SMakefile.h
12include ${DPCBASEREP}/Include/Makefile.slb
13
14LIBF = $(MYLIB)libKernel.a $(MYLIB)libProcessors.a $(MYLIB)libProcWSophya.a
15
16defaut: libs
17
18all: libs slb
19
20
21libs: archlibs
22slb: archslb
23
24archlibs: Kernel Processors ProcWSophya
25
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#--------------------------------------------------------------------
43
44#--- Create library module Makefiles
45mkmf:
46 @echo 'Running ./smkmf'
47 ./smkmf
48#--------------------------------------------------------------------
49
50.PHONY: Kernel
51Kernel:
52 if [ -d Kernel ] ; then cd Kernel ; $(MAKE) ; fi
53
54.PHONY: Processors
55Processors:
56 if [ -d Processors ] ; then cd Processors ; $(MAKE) ; fi
57
58.PHONY: ProcWSophya
59ProcWSophya:
60 if [ -d ProcWSophya ] ; then cd ProcWSophya ; $(MAKE) ; fi
61
62# Shared library creation part of the Makefile
63
64# List of libraries (.a)
65PSLB = $(MYLIB)libKernel.a $(MYLIB)libProcessors.a $(MYLIB)libProcWSophya.a
66
67# List of external library references
68EXTLIBL = -L$(EXTLIBPATH) -lcfitsio -lfftw -lrfftw -lxastro
69EXTSLBL = -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
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
80
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
86
87# On IRIX , complib.sgimath contains Lapack
88ifeq ($(MACHEROS),IRIX64)
89EXTLIB = $(EXTLIBL) -lcomplib.sgimath
90EXTSLB = $(EXTSLBL) -lcomplib.sgimath
91endif
92
93
94
95# XPILIBS = $(LIBXPIPATH) $(LIBXPILIST)
96
97# --- Shared lib name (extension) depending on OS
98SLBNAME = $(MYSLB)libpipe.so
99ifeq ($(MACHEROS),Darwin)
100SLBNAME = $(MYSLB)libpipe.dylib
101endif
102
103# main dependence list
104archslb : $(SLBNAME)
105
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 `)
113
114ALLOBJS = $(OBJKernel) $(OBJProcessors) $(OBJProcWSophya)
115
116# Building ArchTOIPipe shared library
117$(SLBNAME) : $(PSLB)
118 cd $(OBJ); \
119 $(CMDSHLCXX) -o $(SLBNAME) \
120 $(FGSHLACXX) $(ALLOBJS) $(FGSHLNCXX)\
121 -L$(SLB) -lsophya -lextsophya $(EXTLIB) $(LIBLSHL)
122
123
124
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.