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
RevLine 
[740]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#---------------------------------------------------------------------------
[218]8
[740]9# Chemin des librairies Motifs / X11 (pour chemin non standard)
10LIBXPIPATH :=
11# et liste des librairies pour PI (X11, Motif)
12LIBXPILIST := -lXm -lXt -lX11
[218]13
[823]14# librairie compilateur GNU (g++)
15LIBGPP := -L$(GLB) -lstdc++
[1783]16#ifeq ($(HOSTTYPE), powerpc)
17# LIBGPP := -L$(GLB)
18#endif
19ifeq ($(MACHEROS), Darwin)
[2432]20# LIBGPP := -L/sw/lib -ldl -L/usr/X11R6/lib -L/usr/local/lib -llanginfo -L/usr/lib/gcc/darwin/default -lstdc++ -lcc_dynamic
[2497]21# LIBGPP := -L/sw/lib -ldl
22 LIBGPP :=
[2432]23 LIBXPILIST := -L/usr/X11R6/lib -L/usr/local/lib -lXm -lmotiflanginfo -lXt -lX11
[823]24endif
25
[740]26# External libraries
27EXTLIB :=
28EXTSLB :=
[218]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
[1614]36LIBLSHL := -lpthread -lm -lc
[218]37# Librairie d'instanciation des templates
38TILSHL :=
39TILSHLPI :=
40# Commande de construction de la librairie d'instanciation des templates
[740]41CMDTILSHL := echo 'No Template instanciation library (.a)'
42CMDTILSHLPI := echo 'No Template instanciation library (.a)'
[480]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
[740]48USECXX4SO := Y
[480]49# On utilise le compilo g++ pour la fabrication des shared libs
[2437]50ifeq ($(SOPHYACXX), g++)
[480]51 override USECXX4SO := Y
52 override CMDSHLCXX := $(LINK.cc) -shared
[823]53 override LIBLSHL := $(LIBGPP) $(LIBLSHL)
[480]54endif
[218]55
[480]56# On utilise le compilo KCC pour la fabrication des shared libs
[2437]57ifeq ($(SOPHYACXX), KCC)
[480]58 override USECXX4SO := Y
59 override CMDSHLCXX := $(LINK.cc)
60endif
61
62# On utilise le compilo aCC (HP) pour la fabrication des shared libs
[2437]63ifeq ($(SOPHYACXX), aCC)
[480]64 override USECXX4SO := Y
65 override CMDSHLCXX := $(LINK.cc) -b
66endif
67
[218]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
[823]73# override LIBLSHL := -lcxxstd -lcxx -lexc -lm -lc -lrt
74 override LIBLSHL := $(LIBLSHL) -lrt
[218]75 override TILSHL := $(LIB)libertcxx.a
[740]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
[218]79 ifeq ($(CXX),g++)
80 override TILSHL :=
81 override TILSHLPI :=
82 endif
[595]83# Attention - Dangereux de mettre -expect_unresolved , enleve Reza 17/11/99
[740]84 override CMDSHLCXX := $(CXX) $(CXXFLAGS) -shared
[266]85 override FGSHLACXX :=
86 override FGSHLNCXX :=
[823]87 override USECXX4SO := Y
[218]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
[2437]96 ifeq ($(SOPHYACXX), KCC)
[480]97 override CMDSHLCXX := $(LINK.cc)
98 endif
[218]99 override FGSHLACXX :=
100 override FGSHLNCXX :=
[823]101 override LIBLSHL := $(LIBLSHL) -ldl
[218]102 override TILSHL :=
[968]103 override LIBXPIPATH := -L/usr/X11/lib -L/usr/X11R6/lib
[740]104 override LIBXPILIST := -lXm -lXt -lXext -lX11
[480]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 :=
[740]113 override LIBXPIPATH := -L/usr/X11/lib
[480]114 override USECXX4SO := Y
[218]115endif
116
[480]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 :=
[2437]123 ifeq ($(SOPHYACXX), CC)
[480]124 override CMDSHLCXX := CC -shared
125 endif
[740]126 override LIBXPIPATH := -L/usr/X11/lib
[480]127 override USECXX4SO := Y
128endif
129
[2432]130# Construction de shared-libs sous Mac OSX
[1783]131ifeq ($(MACHEROS), Darwin)
[2432]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#
[1783]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.