| [1365] | 1 | srcdir = @srcdir@ | 
|---|
|  | 2 | #VPATH = @srcdir@ | 
|---|
|  | 3 | INSTALL = @INSTALL@ | 
|---|
|  | 4 | prefix = @prefix@ | 
|---|
|  | 5 | exec_prefix = @exec_prefix@ | 
|---|
|  | 6 | bindir = @bindir@ | 
|---|
| [1745] | 7 | libdir = @libdir@ | 
|---|
| [1365] | 8 | CXX=@CXX@ | 
|---|
| [1705] | 9 | AR=@AR@ | 
|---|
| [1788] | 10 | ARFLAGS=@ARFLAGS@ | 
|---|
| [1732] | 11 | LIBS=@LIBS@ | 
|---|
| [1365] | 12 | CXXFLAGS=-O -g | 
|---|
|  | 13 | CFLAGS=-O -g | 
|---|
|  | 14 |  | 
|---|
|  | 15 | USE_SOPHYA=@use_sophya@ | 
|---|
| [2328] | 16 | USE_PIOLIB=@use_piolib@ | 
|---|
| [1365] | 17 |  | 
|---|
|  | 18 | MACHEROS := $(shell echo `uname`) | 
|---|
|  | 19 | MACHDIR := $(MACHEROS)-$(CXX) | 
|---|
|  | 20 |  | 
|---|
|  | 21 |  | 
|---|
|  | 22 | ifeq ($(USE_SOPHYA),1) | 
|---|
| [1730] | 23 | include $(DPCBASEREP)/Include/MakefileUser.h | 
|---|
| [1365] | 24 |  | 
|---|
|  | 25 | ifdef NOSHLIB | 
|---|
| [1730] | 26 | LIBF =  $(LIB)libSysTools.a $(LIB)libNTools.a $(LIB)libBlitz.a $(LIB)libFitsIOServer.a | 
|---|
| [1732] | 27 | LIBS :=  -L$(LIB)  -lSysTools -lNTools -lBlitz  $(LIBS) | 
|---|
| [1365] | 28 | ifeq ($(CXX),cxx) | 
|---|
|  | 29 | # librairie des instances de templates cxx | 
|---|
|  | 30 | LIBS := $(LIBS) -lrt | 
|---|
|  | 31 | endif | 
|---|
|  | 32 | else | 
|---|
|  | 33 | LIBF =  $(SLB)libsophya.so | 
|---|
| [1732] | 34 | LIBS := -L$(SLB)  -lextsophya -lsophya $(LIBS) | 
|---|
| [1365] | 35 | ifeq ($(MACHEROS),OSF1) | 
|---|
|  | 36 | LIBS := $(LIBS) -lfor | 
|---|
|  | 37 | endif | 
|---|
|  | 38 | endif | 
|---|
|  | 39 |  | 
|---|
|  | 40 | CPPFLAGS := -DWITH_SOPHYA $(CPPFLAGS) | 
|---|
|  | 41 | else | 
|---|
|  | 42 | ifeq ($(CXX), cxx) | 
|---|
|  | 43 | CXXFLAGS := -O -g -D__USE_STD_IOSTREAM | 
|---|
|  | 44 | endif | 
|---|
|  | 45 | endif | 
|---|
|  | 46 |  | 
|---|
|  | 47 |  | 
|---|
|  | 48 | CPPFLAGS    :=  $(CPPFLAGS) @cfitsincdir@ -I. -DANSI | 
|---|
|  | 49 |  | 
|---|
| [2328] | 50 | ifeq ($USE_PIOLIB,1) | 
|---|
|  | 51 | PIOLIBS := @piolibdir@ -lpiolib | 
|---|
|  | 52 | else | 
|---|
|  | 53 | PIOLIBS := | 
|---|
|  | 54 | endif | 
|---|
| [1365] | 55 |  | 
|---|
| [2328] | 56 | LDLIBS=@cfitslibdir@ -lcfitsio $(PIOLIBS) $(LIBS) | 
|---|
|  | 57 |  | 
|---|
| [1365] | 58 | ifeq ($(MACHEROS),IRIX64) | 
|---|
|  | 59 | ifeq ($(CXX), g++) | 
|---|
|  | 60 | LDLIBS=@cfitslibdir@ -lcfitsio -L /usr/lib32/ | 
|---|
|  | 61 | endif | 
|---|
|  | 62 | ifeq ($(CXX), CC) | 
|---|
| [2227] | 63 | CXXFLAGS = -O -prelink  -64 | 
|---|
|  | 64 | #    CXXFLAGS = -O -prelink -ptused -64 | 
|---|
| [2208] | 65 | CFLAGS   = -O -64 | 
|---|
| [1764] | 66 | #   CXXFLAGS = -LANG:std -woff 1171,1174,1552 -O -OPT:Olimit=0 | 
|---|
|  | 67 | #   CFLAGS  =  -O -OPT:Olimit=0 | 
|---|
| [1365] | 68 | endif | 
|---|
|  | 69 | endif | 
|---|
|  | 70 |  | 
|---|
|  | 71 | ifeq ($(CXX), g++) | 
|---|
|  | 72 | CC = gcc | 
|---|
|  | 73 | endif | 
|---|
|  | 74 |  | 
|---|
| [1745] | 75 | default: build_kernel build_processors build_sophya | 
|---|
|  | 76 | echo "pipe libs built" | 
|---|
| [1365] | 77 |  | 
|---|
| [1745] | 78 | install:  default | 
|---|
|  | 79 | mkdir -p $(libdir) | 
|---|
|  | 80 | mkdir -p $(prefix)/include | 
|---|
| [1956] | 81 | cp -p Kernel/libatkern.a $(libdir)/ | 
|---|
|  | 82 | cp -p Processors/libatproc.a $(libdir)/ | 
|---|
|  | 83 | for f in $(srcdir)/Kernel/*.h $(srcdir)/Processors/*.h $(srcdir)/*.h conf.h; do \ | 
|---|
| [1747] | 84 | $(INSTALL) $$f $(prefix)/include; \ | 
|---|
|  | 85 | done | 
|---|
| [1956] | 86 | if [ -f ProcWSophya/libatsop.a ]; then \ | 
|---|
|  | 87 | cp -p ProcWSophya/libatsop.a $(libdir)/; \ | 
|---|
|  | 88 | for f in $(srcdir)/ProcWSophya/*.h; do \ | 
|---|
| [1747] | 89 | $(INSTALL) $$f $(prefix)/include; \ | 
|---|
|  | 90 | done \ | 
|---|
| [1745] | 91 | fi | 
|---|
|  | 92 |  | 
|---|
| [1365] | 93 | clean: | 
|---|
|  | 94 | rm -f *.o | 
|---|
|  | 95 | rm -rf rii_files ii_files cxxrep cxx_repository | 
|---|
| [1956] | 96 | for d in Kernel Processors ProcWSophya; do \ | 
|---|
| [1685] | 97 | if [ -d $$d ]; then \ | 
|---|
|  | 98 | cd $$d; $(MAKE) clean; \ | 
|---|
| [1702] | 99 | cd ..; \ | 
|---|
| [1477] | 100 | fi  \ | 
|---|
|  | 101 | done | 
|---|
| [1365] | 102 |  | 
|---|
| [1956] | 103 | %: $(srcdir)/TestPipes/%.cc build_kernel build_processors build_sophya | 
|---|
|  | 104 | cd TestPipes; $(MAKE) $@ | 
|---|
| [1365] | 105 |  | 
|---|
| [1477] | 106 | build_kernel: | 
|---|
| [1956] | 107 | cd Kernel; $(MAKE) | 
|---|
| [1365] | 108 |  | 
|---|
| [1477] | 109 | build_processors: | 
|---|
| [1956] | 110 | cd Processors; $(MAKE) | 
|---|
| [1365] | 111 |  | 
|---|
| [1477] | 112 | build_sophya: | 
|---|
|  | 113 | ifeq ($(USE_SOPHYA),1) | 
|---|
| [1957] | 114 | if [ -d ProcWSophya ]; then \ | 
|---|
| [1956] | 115 | cd ProcWSophya; $(MAKE); \ | 
|---|
| [1480] | 116 | fi | 
|---|
| [1477] | 117 | else | 
|---|
|  | 118 | echo "no sophya" | 
|---|
|  | 119 | endif | 
|---|
| [1365] | 120 |  | 
|---|
| [2225] | 121 | ### Shared libs, repris de Sophya en attendant une integration | 
|---|
|  | 122 | ### plus propre a configure | 
|---|
| [1365] | 123 |  | 
|---|
| [2225] | 124 | # librairie compilateur GNU (g++) | 
|---|
|  | 125 | LIBGPP := -lstdc++ | 
|---|
|  | 126 | ifeq ($(MACHEROS), Darwin) | 
|---|
|  | 127 | LIBGPP := -L/sw/lib -ldl -L/usr/lib/gcc/darwin/default -lstdc++ -lcc_dynamic | 
|---|
|  | 128 | endif | 
|---|
| [1365] | 129 |  | 
|---|
| [2225] | 130 | #  External libraries | 
|---|
|  | 131 | EXTLIB := | 
|---|
|  | 132 | EXTSLB := | 
|---|
|  | 133 |  | 
|---|
|  | 134 | #  Commande de construction de shared-lib | 
|---|
|  | 135 | CMDSHL := ld -partage | 
|---|
|  | 136 | #  Flag d'inclusion/fin d'inclusion de tous les points  d'entree | 
|---|
|  | 137 | FGSHLA := -tout | 
|---|
|  | 138 | FGSHLN := -rien | 
|---|
|  | 139 | #  Librairies specifiques | 
|---|
|  | 140 | LIBLSHL := -lpthread -lm -lc | 
|---|
|  | 141 | #  Librairie d'instanciation des templates | 
|---|
|  | 142 | TILSHL := | 
|---|
|  | 143 | TILSHLPI := | 
|---|
|  | 144 | #   Commande de construction de la librairie d'instanciation des templates | 
|---|
|  | 145 | CMDTILSHL := echo 'No Template instanciation library (.a)' | 
|---|
|  | 146 | CMDTILSHLPI  := echo 'No Template instanciation library (.a)' | 
|---|
|  | 147 | # Utilisation du compilo C++ comme driver pour fabrication des shared-libs | 
|---|
|  | 148 | CMDSHLCXX := $(LINK.cc) | 
|---|
|  | 149 | FGSHLACXX := | 
|---|
|  | 150 | FGSHLNCXX := | 
|---|
|  | 151 | #  S'il faut utiliser $(CMDSHLCXX) pour fabrication des shared-libs | 
|---|
|  | 152 | USECXX4SO := Y | 
|---|
|  | 153 | # On utilise le compilo g++ pour la fabrication des shared libs | 
|---|
|  | 154 | ifeq ($(EROSCXX), g++) | 
|---|
|  | 155 | override USECXX4SO := Y | 
|---|
|  | 156 | override CMDSHLCXX := $(LINK.cc) -shared | 
|---|
|  | 157 | override LIBLSHL := $(LIBGPP) $(LIBLSHL) | 
|---|
|  | 158 | endif | 
|---|
|  | 159 |  | 
|---|
|  | 160 | # On utilise le compilo KCC pour la fabrication des shared libs | 
|---|
|  | 161 | ifeq ($(EROSCXX), KCC) | 
|---|
|  | 162 | override USECXX4SO := Y | 
|---|
|  | 163 | override CMDSHLCXX := $(LINK.cc) | 
|---|
|  | 164 | endif | 
|---|
|  | 165 |  | 
|---|
|  | 166 | # On utilise le compilo aCC (HP) pour la fabrication des shared libs | 
|---|
|  | 167 | ifeq ($(EROSCXX), aCC) | 
|---|
|  | 168 | override USECXX4SO := Y | 
|---|
|  | 169 | override CMDSHLCXX := $(LINK.cc) -b | 
|---|
|  | 170 | endif | 
|---|
|  | 171 |  | 
|---|
|  | 172 |  | 
|---|
|  | 173 | # Construction de shared-libs sous OSF1 | 
|---|
|  | 174 | ifeq ($(MACHEROS),OSF1) | 
|---|
|  | 175 | override CMDSHL := ld -shared -update_registry $(SLB)so_locations | 
|---|
|  | 176 | override FGSHLA := -all | 
|---|
|  | 177 | override FGSHLN := -none | 
|---|
|  | 178 | #  override LIBLSHL := -lcxxstd -lcxx -lexc -lm -lc -lrt | 
|---|
|  | 179 | override LIBLSHL := $(LIBLSHL) -lrt | 
|---|
|  | 180 | override TILSHL := $(LIB)libertcxx.a | 
|---|
| [2240] | 181 | override CMDTILSHL := rm -f $(LIB)libsotcxx.a ; cd $(REP); $(AR) $(ARFLAGS) $(LIB)libsotcxx.a *.o | 
|---|
| [2225] | 182 | override TILSHLPI := $(LIB)libsotcxxpi.a | 
|---|
| [2240] | 183 | override CMDTILSHLPI := rm -f $(LIB)libsotcxxpi.a ; cd $(REPPI); $(AR) $(ARFLAGS) $(LIB)libsotcxxpi.a *.o | 
|---|
| [2225] | 184 | ifeq ($(CXX),g++) | 
|---|
|  | 185 | override TILSHL := | 
|---|
|  | 186 | override TILSHLPI := | 
|---|
|  | 187 | endif | 
|---|
|  | 188 | #  Attention - Dangereux de mettre -expect_unresolved , enleve  Reza 17/11/99 | 
|---|
|  | 189 | override CMDSHLCXX :=  $(CXX) $(CXXFLAGS) -shared | 
|---|
|  | 190 | override FGSHLACXX := | 
|---|
|  | 191 | override FGSHLNCXX := | 
|---|
|  | 192 | override USECXX4SO := Y | 
|---|
|  | 193 | endif | 
|---|
|  | 194 |  | 
|---|
|  | 195 | # Construction de shared-libs sous Linux | 
|---|
|  | 196 | ifeq ($(MACHEROS),Linux) | 
|---|
|  | 197 | override CMDSHL := ld -shared | 
|---|
|  | 198 | override FGSHLA := --whole-archive | 
|---|
|  | 199 | override FGSHLN := --no-whole-archiv | 
|---|
|  | 200 | override CMDSHLCXX := $(LINK.cc) -shared | 
|---|
|  | 201 | ifeq ($(EROSCXX), KCC) | 
|---|
|  | 202 | override CMDSHLCXX := $(LINK.cc) | 
|---|
|  | 203 | endif | 
|---|
|  | 204 | override FGSHLACXX := | 
|---|
|  | 205 | override FGSHLNCXX := | 
|---|
|  | 206 | override LIBLSHL := $(LIBLSHL) -ldl | 
|---|
|  | 207 | override TILSHL := | 
|---|
|  | 208 | override LIBXPIPATH := -L/usr/X11/lib -L/usr/X11R6/lib | 
|---|
|  | 209 | override LIBXPILIST := -lXm -lXt -lXext -lX11 | 
|---|
|  | 210 | endif | 
|---|
|  | 211 |  | 
|---|
|  | 212 | # Construction de shared-libs sous Sun-OS | 
|---|
|  | 213 | ifeq ($(MACHEROS),SunOS) | 
|---|
|  | 214 | override CMDSHL := ld -G | 
|---|
|  | 215 | override FGSHLA := -z allextract | 
|---|
|  | 216 | override FGSHLN := -z weakextract | 
|---|
|  | 217 | override TILSHL := | 
|---|
|  | 218 | override LIBXPIPATH := -L/usr/X11/lib | 
|---|
|  | 219 | override USECXX4SO := Y | 
|---|
|  | 220 | endif | 
|---|
|  | 221 |  | 
|---|
|  | 222 | # Construction de shared-libs sous SGI | 
|---|
|  | 223 | ifeq ($(MACHEROS), IRIX64) | 
|---|
|  | 224 | override CMDSHL := ld -shared | 
|---|
|  | 225 | override FGSHLA := -all | 
|---|
|  | 226 | override FGSHLN := -notall | 
|---|
|  | 227 | override TILSHL := | 
|---|
|  | 228 | ifeq ($(EROSCXX), CC) | 
|---|
| [2226] | 229 | override CMDSHLCXX := CC -shared -64 | 
|---|
| [2225] | 230 | endif | 
|---|
|  | 231 | override LIBXPIPATH := -L/usr/X11/lib | 
|---|
|  | 232 | override USECXX4SO := Y | 
|---|
|  | 233 | endif | 
|---|
|  | 234 |  | 
|---|
|  | 235 | # Construction de shared-libs sous OSX | 
|---|
|  | 236 | ifeq ($(MACHEROS), Darwin) | 
|---|
|  | 237 | override CMDSHL := libtool -dynamic | 
|---|
|  | 238 | override FGSHLA := | 
|---|
|  | 239 | override FGSHLN := | 
|---|
|  | 240 | override TILSHL := | 
|---|
|  | 241 | override CMDSHLCXX := libtool -dynamic | 
|---|
|  | 242 | endif | 
|---|
|  | 243 |  | 
|---|
|  | 244 | SLBNAME = libpipe.so | 
|---|
|  | 245 | ifeq ($(MACHEROS),Darwin) | 
|---|
|  | 246 | SLBNAME = libpipe.dylib | 
|---|
|  | 247 | endif | 
|---|
|  | 248 |  | 
|---|
|  | 249 |  | 
|---|
|  | 250 | slb: $(SLBNAME) | 
|---|
|  | 251 |  | 
|---|
|  | 252 | $(SLBNAME) : build_kernel build_processors build_sophya | 
|---|
|  | 253 | $(CMDSHLCXX) -o $(SLBNAME)  \ | 
|---|
|  | 254 | Kernel/*.o Processors/*.o ProcWSophya/*.o \ | 
|---|
|  | 255 | $(FGSHLNCXX) -L$(SLB) -lsophya -lextsophya $(EXTLIB) $(LIBLSHL) | 
|---|
|  | 256 |  | 
|---|
|  | 257 |  | 
|---|