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

Last change on this file since 3824 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
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++)
[3234]15# LIBGPP := -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 :=
[2570]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
[823]25endif
26
[740]27# External libraries
28EXTLIB :=
29EXTSLB :=
[218]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
[1614]37LIBLSHL := -lpthread -lm -lc
[218]38# Librairie d'instanciation des templates
39TILSHL :=
40TILSHLPI :=
41# Commande de construction de la librairie d'instanciation des templates
[740]42CMDTILSHL := echo 'No Template instanciation library (.a)'
43CMDTILSHLPI := echo 'No Template instanciation library (.a)'
[480]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
[740]49USECXX4SO := Y
[480]50# On utilise le compilo g++ pour la fabrication des shared libs
[2437]51ifeq ($(SOPHYACXX), g++)
[480]52 override USECXX4SO := Y
53 override CMDSHLCXX := $(LINK.cc) -shared
[823]54 override LIBLSHL := $(LIBGPP) $(LIBLSHL)
[480]55endif
[218]56
[480]57# On utilise le compilo KCC pour la fabrication des shared libs
[2437]58ifeq ($(SOPHYACXX), KCC)
[480]59 override USECXX4SO := Y
60 override CMDSHLCXX := $(LINK.cc)
61endif
62
63# On utilise le compilo aCC (HP) pour la fabrication des shared libs
[2437]64ifeq ($(SOPHYACXX), aCC)
[480]65 override USECXX4SO := Y
66 override CMDSHLCXX := $(LINK.cc) -b
67endif
68
[218]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
[823]74# override LIBLSHL := -lcxxstd -lcxx -lexc -lm -lc -lrt
75 override LIBLSHL := $(LIBLSHL) -lrt
[218]76 override TILSHL := $(LIB)libertcxx.a
[740]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
[218]80 ifeq ($(CXX),g++)
81 override TILSHL :=
82 override TILSHLPI :=
83 endif
[595]84# Attention - Dangereux de mettre -expect_unresolved , enleve Reza 17/11/99
[740]85 override CMDSHLCXX := $(CXX) $(CXXFLAGS) -shared
[266]86 override FGSHLACXX :=
87 override FGSHLNCXX :=
[823]88 override USECXX4SO := Y
[218]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
[2437]97 ifeq ($(SOPHYACXX), KCC)
[480]98 override CMDSHLCXX := $(LINK.cc)
99 endif
[218]100 override FGSHLACXX :=
101 override FGSHLNCXX :=
[823]102 override LIBLSHL := $(LIBLSHL) -ldl
[218]103 override TILSHL :=
[968]104 override LIBXPIPATH := -L/usr/X11/lib -L/usr/X11R6/lib
[740]105 override LIBXPILIST := -lXm -lXt -lXext -lX11
[480]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 :=
[740]114 override LIBXPIPATH := -L/usr/X11/lib
[480]115 override USECXX4SO := Y
[218]116endif
117
[480]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 :=
[2437]124 ifeq ($(SOPHYACXX), CC)
[480]125 override CMDSHLCXX := CC -shared
126 endif
[740]127 override LIBXPIPATH := -L/usr/X11/lib
[480]128 override USECXX4SO := Y
129endif
130
[2432]131# Construction de shared-libs sous Mac OSX
[1783]132ifeq ($(MACHEROS), Darwin)
[2432]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#
[1783]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.