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

Last change on this file since 2502 was 2497, checked in by ansari, 22 years ago

Suppression lien avec la librairie -L/sw/lib -ldl suite gestion link dynamique avec API darwin NSModule - Reza 3 Fevrier 2004

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