source: Sophya/trunk/SophyaLib/Mgr/Makefile.slb@ 3839

Last change on this file since 3839 was 3234, checked in by ansari, 18 years ago

Ajout namespace SOPHYA ds les fichiers .cc au lieu de include sopnamsp.h en presence de DECL_TEMP_SPEC , cmv+reza 27/04/2007

File size: 4.9 KB
Line 
1# -*- makefile -*-
2# ######################### Sophya #############################
3# ##### LAL (Orsay) / IN2P3-CNRS DAPNIA/SPP (Saclay) / CEA #####
4# ###############################################################
5# General setup GNU Makefile for Sopyha/Planck. To be included
6# for building shared libraries
7#---------------------------------------------------------------------------
8
9# Chemin des librairies Motifs / X11 (pour chemin non standard)
10LIBXPIPATH :=
11# et liste des librairies pour PI (X11, Motif)
12LIBXPILIST := -lXm -lXt -lX11
13
14# librairie compilateur GNU (g++)
15# LIBGPP := -L$(GLB) -lstdc++
16#ifeq ($(HOSTTYPE), powerpc)
17# LIBGPP := -L$(GLB)
18#endif
19ifeq ($(MACHEROS), Darwin)
20# LIBGPP := -L/sw/lib -ldl -L/usr/X11R6/lib -L/usr/local/lib -llanginfo -L/usr/lib/gcc/darwin/default -lstdc++ -lcc_dynamic
21# LIBGPP := -L/sw/lib -ldl
22 LIBGPP :=
23# LIBXPILIST := -L/usr/X11R6/lib -L/usr/local/lib -lXm -lmotiflanginfo -lXt -lX11
24 LIBXPILIST := -L/usr/X11R6/lib -L/sw/lib -lXm -lXt -lX11
25endif
26
27# External libraries
28EXTLIB :=
29EXTSLB :=
30
31# Commande de construction de shared-lib
32CMDSHL := ld -partage
33# Flag d'inclusion/fin d'inclusion de tous les points d'entree
34FGSHLA := -tout
35FGSHLN := -rien
36# Librairies specifiques
37LIBLSHL := -lpthread -lm -lc
38# Librairie d'instanciation des templates
39TILSHL :=
40TILSHLPI :=
41# Commande de construction de la librairie d'instanciation des templates
42CMDTILSHL := echo 'No Template instanciation library (.a)'
43CMDTILSHLPI := echo 'No Template instanciation library (.a)'
44# Utilisation du compilo C++ comme driver pour fabrication des shared-libs
45CMDSHLCXX := $(LINK.cc)
46FGSHLACXX :=
47FGSHLNCXX :=
48# S'il faut utiliser $(CMDSHLCXX) pour fabrication des shared-libs
49USECXX4SO := Y
50# On utilise le compilo g++ pour la fabrication des shared libs
51ifeq ($(SOPHYACXX), g++)
52 override USECXX4SO := Y
53 override CMDSHLCXX := $(LINK.cc) -shared
54 override LIBLSHL := $(LIBGPP) $(LIBLSHL)
55endif
56
57# On utilise le compilo KCC pour la fabrication des shared libs
58ifeq ($(SOPHYACXX), KCC)
59 override USECXX4SO := Y
60 override CMDSHLCXX := $(LINK.cc)
61endif
62
63# On utilise le compilo aCC (HP) pour la fabrication des shared libs
64ifeq ($(SOPHYACXX), aCC)
65 override USECXX4SO := Y
66 override CMDSHLCXX := $(LINK.cc) -b
67endif
68
69# Construction de shared-libs sous OSF1
70ifeq ($(MACHEROS),OSF1)
71 override CMDSHL := ld -shared -update_registry $(SLB)so_locations
72 override FGSHLA := -all
73 override FGSHLN := -none
74# override LIBLSHL := -lcxxstd -lcxx -lexc -lm -lc -lrt
75 override LIBLSHL := $(LIBLSHL) -lrt
76 override TILSHL := $(LIB)libertcxx.a
77 override CMDTILSHL := rm -f $(LIB)libsotcxx.a ; cd $(REP); $(AR) $(ARFLAGS) $(LIB)libsotcxx.a *.o
78 override TILSHLPI := $(LIB)libsotcxxpi.a
79 override CMDTILSHLPI := rm -f $(LIB)libsotcxxpi.a ; cd $(REPPI); $(AR) $(ARFLAGS) $(LIB)libsotcxxpi.a *.o
80 ifeq ($(CXX),g++)
81 override TILSHL :=
82 override TILSHLPI :=
83 endif
84# Attention - Dangereux de mettre -expect_unresolved , enleve Reza 17/11/99
85 override CMDSHLCXX := $(CXX) $(CXXFLAGS) -shared
86 override FGSHLACXX :=
87 override FGSHLNCXX :=
88 override USECXX4SO := Y
89endif
90
91# Construction de shared-libs sous Linux
92ifeq ($(MACHEROS),Linux)
93 override CMDSHL := ld -shared
94 override FGSHLA := --whole-archive
95 override FGSHLN := --no-whole-archiv
96 override CMDSHLCXX := $(LINK.cc) -shared
97 ifeq ($(SOPHYACXX), KCC)
98 override CMDSHLCXX := $(LINK.cc)
99 endif
100 override FGSHLACXX :=
101 override FGSHLNCXX :=
102 override LIBLSHL := $(LIBLSHL) -ldl
103 override TILSHL :=
104 override LIBXPIPATH := -L/usr/X11/lib -L/usr/X11R6/lib
105 override LIBXPILIST := -lXm -lXt -lXext -lX11
106endif
107
108# Construction de shared-libs sous Sun-OS
109ifeq ($(MACHEROS),SunOS)
110 override CMDSHL := ld -G
111 override FGSHLA := -z allextract
112 override FGSHLN := -z weakextract
113 override TILSHL :=
114 override LIBXPIPATH := -L/usr/X11/lib
115 override USECXX4SO := Y
116endif
117
118# Construction de shared-libs sous SGI
119ifeq ($(MACHEROS), IRIX64)
120 override CMDSHL := ld -shared
121 override FGSHLA := -all
122 override FGSHLN := -notall
123 override TILSHL :=
124 ifeq ($(SOPHYACXX), CC)
125 override CMDSHLCXX := CC -shared
126 endif
127 override LIBXPIPATH := -L/usr/X11/lib
128 override USECXX4SO := Y
129endif
130
131# Construction de shared-libs sous Mac OSX
132ifeq ($(MACHEROS), Darwin)
133#
134# ---- Septembre 2003 : D'apres les instructions de fink
135# (http://fink.sourceforge.net , Documentation/Porting
136# > cc -fno-common -c source.c
137# > cc -fno-common -c code.c
138# > cc -dynamiclib -install_name /usr/local/lib/libfoo.2.dylib \
139# -compatibility_version 2.4 -current_version 2.4.5 \
140# -o libfoo.2.4.5.dylib source.o code.o
141# > rm -f libfoo.2.dylib libfoo.dylib
142# > ln -s libfoo.2.4.5.dylib libfoo.2.dylib
143# > ln -s libfoo.2.4.5.dylib libfoo.dylib
144# Mis directement ds makefile.darwin -----
145#
146 override CMDSHL := libtool -dynamic
147 override FGSHLA :=
148 override FGSHLN :=
149 override TILSHL :=
150 override CMDSHLCXX := libtool -dynamic
151endif
152
153
Note: See TracBrowser for help on using the repository browser.