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