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

Last change on this file since 2457 was 2437, checked in by cmv, 22 years ago

chgt DPC...REP en SOPHYA...REP et EROSCXX en SOPHYACXX cmv 17/09/2003

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