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

Last change on this file since 2495 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
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 LIBXPILIST := -L/usr/X11R6/lib -L/usr/local/lib -lXm -lmotiflanginfo -lXt -lX11
23endif
24
25# External libraries
26EXTLIB :=
27EXTSLB :=
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
35LIBLSHL := -lpthread -lm -lc
36# Librairie d'instanciation des templates
37TILSHL :=
38TILSHLPI :=
39# Commande de construction de la librairie d'instanciation des templates
40CMDTILSHL := echo 'No Template instanciation library (.a)'
41CMDTILSHLPI := echo 'No Template instanciation library (.a)'
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
47USECXX4SO := Y
48# On utilise le compilo g++ pour la fabrication des shared libs
49ifeq ($(SOPHYACXX), g++)
50 override USECXX4SO := Y
51 override CMDSHLCXX := $(LINK.cc) -shared
52 override LIBLSHL := $(LIBGPP) $(LIBLSHL)
53endif
54
55# On utilise le compilo KCC pour la fabrication des shared libs
56ifeq ($(SOPHYACXX), KCC)
57 override USECXX4SO := Y
58 override CMDSHLCXX := $(LINK.cc)
59endif
60
61# On utilise le compilo aCC (HP) pour la fabrication des shared libs
62ifeq ($(SOPHYACXX), aCC)
63 override USECXX4SO := Y
64 override CMDSHLCXX := $(LINK.cc) -b
65endif
66
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
72# override LIBLSHL := -lcxxstd -lcxx -lexc -lm -lc -lrt
73 override LIBLSHL := $(LIBLSHL) -lrt
74 override TILSHL := $(LIB)libertcxx.a
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
78 ifeq ($(CXX),g++)
79 override TILSHL :=
80 override TILSHLPI :=
81 endif
82# Attention - Dangereux de mettre -expect_unresolved , enleve Reza 17/11/99
83 override CMDSHLCXX := $(CXX) $(CXXFLAGS) -shared
84 override FGSHLACXX :=
85 override FGSHLNCXX :=
86 override USECXX4SO := Y
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
95 ifeq ($(SOPHYACXX), KCC)
96 override CMDSHLCXX := $(LINK.cc)
97 endif
98 override FGSHLACXX :=
99 override FGSHLNCXX :=
100 override LIBLSHL := $(LIBLSHL) -ldl
101 override TILSHL :=
102 override LIBXPIPATH := -L/usr/X11/lib -L/usr/X11R6/lib
103 override LIBXPILIST := -lXm -lXt -lXext -lX11
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 :=
112 override LIBXPIPATH := -L/usr/X11/lib
113 override USECXX4SO := Y
114endif
115
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 :=
122 ifeq ($(SOPHYACXX), CC)
123 override CMDSHLCXX := CC -shared
124 endif
125 override LIBXPIPATH := -L/usr/X11/lib
126 override USECXX4SO := Y
127endif
128
129# Construction de shared-libs sous Mac OSX
130ifeq ($(MACHEROS), Darwin)
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#
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.