source: Sophya/trunk/ArchTOIPipe/SMakefile@ 1980

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

fichiers SMakefile(s) et script (smkmxxx) pour la construction d'ArchTOIPipe avec SOPHYA - base sur les scripts SOPHYA - Reza 03/05/2002

File size: 3.5 KB
RevLine 
[1980]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
[1980]10# include files defining compiler/linker options
11include SMakefile.h
12include ${DPCBASEREP}/Include/Makefile.slb
[1462]13
[1980]14LIBF = $(MYLIB)libKernel.a $(MYLIB)libProcessors.a $(MYLIB)libProcWSophya.a
[1437]15
[1980]16defaut: libs
[1437]17
[1980]18all: libs slb
[1437]19
20
[1980]21libs: archlibs
22slb: archslb
[1437]23
[1980]24archlibs: Kernel Processors ProcWSophya
[1437]25
[1980]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
[1980]44#--- Create library module Makefiles
45mkmf:
46 @echo 'Running ./smkmf'
47 ./smkmf
48#--------------------------------------------------------------------
[1529]49
[1980]50.PHONY: Kernel
51Kernel:
52 if [ -d Kernel ] ; then cd Kernel ; $(MAKE) ; fi
[1529]53
[1980]54.PHONY: Processors
55Processors:
56 if [ -d Processors ] ; then cd Processors ; $(MAKE) ; fi
[1529]57
[1980]58.PHONY: ProcWSophya
59ProcWSophya:
60 if [ -d ProcWSophya ] ; then cd ProcWSophya ; $(MAKE) ; fi
[1529]61
[1980]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
[1980]67# List of external library references
68EXTLIBL = -L$(EXTLIBPATH) -lcfitsio -lfftw -lrfftw -lxastro
69EXTSLBL = -L$(EXTSLBPATH) -lcfitsio -lfftw -lrfftw -lxastro
[1529]70
[1980]71# defining the other external libraries needed on different systems
[1529]72
[1980]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
[1980]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
[1980]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
[1980]95# XPILIBS = $(LIBXPIPATH) $(LIBXPILIST)
[1437]96
[1980]97# main dependence list
98archslb : $(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 `)
104OBJKernel = $(shell echo `cat ./Kernel/Kernel.o.list `)
105OBJProcessors = $(shell echo `cat ./Processors/Processors.o.list `)
106OBJProcWSophya = $(shell echo `cat ./ProcWSophya/ProcWSophya.o.list `)
[1529]107
[1980]108ALLOBJS = $(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
118
119clean:
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
123
Note: See TracBrowser for help on using the repository browser.