1 |
|
---|
2 |
|
---|
3 | ##############################################################################
|
---|
4 | ##############################################################################
|
---|
5 | #################### include des librairies pour le link #####################
|
---|
6 | ##############################################################################
|
---|
7 | ##############################################################################
|
---|
8 |
|
---|
9 | ###############################################################################
|
---|
10 | # Link : #
|
---|
11 | # - without Shared Libraries > make NOSHLIB=y #
|
---|
12 | # - without Extern Libraries > make NOEXTLIB=y #
|
---|
13 | # - without Fortan Libraries > make NOLFORT=y #
|
---|
14 | # - with PI Libraries > make USELIBPI=y #
|
---|
15 | # - with Personal Libraries > make MYLIBS='-L/home/mylibs -lmylib1 -lmylib2' #
|
---|
16 | ###############################################################################
|
---|
17 |
|
---|
18 | LIBF =
|
---|
19 | LIBS =
|
---|
20 | ELIBF =
|
---|
21 | ELIBS =
|
---|
22 | SLIBF =
|
---|
23 | MLIBS =
|
---|
24 |
|
---|
25 | #------------------------------------------------------#
|
---|
26 | #------------------ Archive Libraries -----------------#
|
---|
27 | #------------------------------------------------------#
|
---|
28 | ifdef NOSHLIB
|
---|
29 |
|
---|
30 | #--------- lib sophya ---------
|
---|
31 | LIBF := $(LIBF) $(LIB)libBaseTools.a $(LIB)libSysTools.a $(LIB)libSUtils.a $(LIB)libNTools.a $(LIB)libTArray.a $(LIB)libHiStats.a
|
---|
32 | LIBF := $(LIBF) $(LIB)libSamba.a $(LIB)libSkyMap.a $(LIB)libSkyT.a
|
---|
33 | LIBS := $(LIBS) -L$(LIB) -lBaseTools -lSysTools -lSUtils -lNTools -lTArray -lHiStats -lSamba -lSkyMap -lSkyT
|
---|
34 |
|
---|
35 | #--------- lib sophya interface externes ---------
|
---|
36 | ifndef NOEXTLIB
|
---|
37 | LIBF := $(LIBF) $(LIB)libFitsIOServer.a $(LIB)libIFFTW.a $(LIB)libLinAlg.a $(LIB)libXAstroPack.a
|
---|
38 | LIBS := $(LIBS) -lFitsIOServer -lIFFTW -lLinAlg -lXAstroPack
|
---|
39 | #LIBF := $(LIBF)libBlitz.a
|
---|
40 | #LIBS := $(LIBS) -lBlitz
|
---|
41 | endif
|
---|
42 |
|
---|
43 | #--------- lib piapp ---------
|
---|
44 | ifdef USELIBPI
|
---|
45 | LIBF := $(LIBF) $(LIB)libPI.a $(LIB)libPIext.a
|
---|
46 | LIBS := $(LIBS) -lPI -lPIext
|
---|
47 | endif
|
---|
48 |
|
---|
49 | #--------- Other Extern Libraries ---------
|
---|
50 | ifndef NOEXTLIB
|
---|
51 | ELIBF := $(ELIBF) $(EXTLIBPATH)libcfitsio.a $(EXTLIBPATH)libfftw.a $(EXTLIBPATH)librfftw.a $(EXTLIBPATH)libxastro.a
|
---|
52 | ELIBS := $(ELIBS) -L$(EXTLIBPATH) -lcfitsio -lfftw -lrfftw -lxastro
|
---|
53 | ifeq ($(MACHEROS),OSF1)
|
---|
54 | ELIBS := $(ELIBS) -ldxml
|
---|
55 | endif
|
---|
56 | ifeq ($(MACHEROS),Linux)
|
---|
57 | ELIBF := $(ELIBF) $(EXTLIBPATH)liblapack.a $(EXTLIBPATH)libblas.a
|
---|
58 | ELIBS := $(ELIBS) -llapack -lblas
|
---|
59 | endif
|
---|
60 | ifeq ($(MACHEROS),IRIX64)
|
---|
61 | ELIBS := $(ELIBS) -lcomplib.sgimath
|
---|
62 | endif
|
---|
63 | endif
|
---|
64 |
|
---|
65 | #--------- lib system ---------
|
---|
66 | # librairie des instances de templates cxx Sophya
|
---|
67 | ifeq ($(CXX),cxx)
|
---|
68 | SLIBS := $(SLIBS) -lertcxx
|
---|
69 | endif
|
---|
70 | SLIBS := $(SLIBS) -lm
|
---|
71 | # Librairies pour le fortran
|
---|
72 | ifndef NOLFORT
|
---|
73 | ifeq ($(MACHEROS),OSF1)
|
---|
74 | SLIBS := $(SLIBS) -lfor
|
---|
75 | endif
|
---|
76 | ifeq ($(MACHEROS),Linux)
|
---|
77 | #SLIBS := $(SLIBS) -lf2c
|
---|
78 | SLIBS := $(SLIBS) -lg2c
|
---|
79 | endif
|
---|
80 | endif
|
---|
81 |
|
---|
82 | #-----------------------------------------------------#
|
---|
83 | #------------------ Shared Libraries -----------------#
|
---|
84 | #-----------------------------------------------------#
|
---|
85 | else
|
---|
86 |
|
---|
87 | #--------- lib sophya ---------
|
---|
88 | LIBF := $(LIBF) $(SLB)libsophya.so
|
---|
89 | LIBS := $(LIBS) -L$(SLB) -lsophya
|
---|
90 |
|
---|
91 | #--------- lib sophya interface externes ---------
|
---|
92 | ifndef NOEXTLIB
|
---|
93 | LIBF := $(LIBF) $(SLB)libextsophya.so
|
---|
94 | LIBS := $(LIBS) -lextsophya
|
---|
95 | endif
|
---|
96 |
|
---|
97 | #--------- lib piapp ---------
|
---|
98 | ifdef USELIBPI
|
---|
99 | LIBF := $(LIBF) $(SLB)libPI.so
|
---|
100 | LIBS := $(LIBS) -lPI
|
---|
101 | endif
|
---|
102 |
|
---|
103 | #--------- Other Extern Libraries ---------
|
---|
104 | # ATTENTION actuellement les blabla.a sont appelees,
|
---|
105 | # on pourrait appeller les blabla.so (EXTSLBPATH) si on les avait crees
|
---|
106 | ifndef NOEXTLIB
|
---|
107 | ELIBF := $(ELIBF) $(EXTLIBPATH)libcfitsio.a $(EXTLIBPATH)libfftw.a $(EXTLIBPATH)librfftw.a $(EXTLIBPATH)libxastro.a
|
---|
108 | ELIBS := $(ELIBS) -L$(EXTLIBPATH) -lcfitsio -lfftw -lrfftw -lxastro
|
---|
109 | ifeq ($(MACHEROS),OSF1)
|
---|
110 | ELIBS := $(ELIBS) -ldxml
|
---|
111 | endif
|
---|
112 | ifeq ($(MACHEROS),Linux)
|
---|
113 | ELIBF := $(ELIBF) $(EXTLIBPATH)liblapack.a $(EXTLIBPATH)libblas.a
|
---|
114 | ELIBS := $(ELIBS) -llapack -lblas
|
---|
115 | endif
|
---|
116 | ifeq ($(MACHEROS),IRIX64)
|
---|
117 | ELIBS := $(ELIBS) -lcomplib.sgimath
|
---|
118 | endif
|
---|
119 | endif
|
---|
120 |
|
---|
121 | #--------- lib systeme ---------
|
---|
122 | SLIBS := $(SLIBS) -lm
|
---|
123 | # Librairies pour le fortran
|
---|
124 | ifndef NOLFORT
|
---|
125 | ifeq ($(MACHEROS),OSF1)
|
---|
126 | SLIBS := $(SLIBS) -lfor
|
---|
127 | endif
|
---|
128 | ifeq ($(MACHEROS),Linux)
|
---|
129 | #SLIBS := $(SLIBS) -lf2c
|
---|
130 | SLIBS := $(SLIBS) -lg2c
|
---|
131 | endif
|
---|
132 | endif
|
---|
133 |
|
---|
134 | endif
|
---|
135 |
|
---|
136 | #--------- PERSONAL Libraries ---------
|
---|
137 | ifdef MYLIBS
|
---|
138 | MLIBS := $(MLIBS) $(MYLIBS)
|
---|
139 | endif
|
---|
140 |
|
---|
141 | #--------- LIBF et LIBS ---------
|
---|
142 | LIBF := $(LIBF) $(ELIBF)
|
---|
143 | LIBS := $(LIBS) $(ELIBS) $(MLIBS) $(SLIBS)
|
---|
144 |
|
---|
145 | ##############################################################################
|
---|