1 |
#***************************************************************************** |
#***************************************************************************** |
2 |
# |
# |
3 |
# FILE NAME: $Id: Makefile,v 1.7 2008/09/23 15:22:21 mocchiut Exp $ |
# FILE NAME: $Id: Makefile,v 1.12 2009/04/10 15:01:44 pam-fi Exp $ |
4 |
# VERSION: |
# VERSION: |
5 |
# AUTHOR: Nergal S.r.l. |
# AUTHOR: Nergal S.r.l. |
6 |
# DATE: |
# DATE: |
15 |
|
|
16 |
|
|
17 |
#------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------ |
18 |
|
ifneq ($(MAKECMDGOALS),distclean) |
19 |
include $(BASEDIR)/event/Make.def |
include $(BASEDIR)/event/Make.def |
20 |
|
endif |
21 |
#------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------ |
22 |
|
|
23 |
CFLAGS += -I $(EVNT_DIR_INC) -I $(ROOT_DIR_INC) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DPIC |
CFLAGS += -I $(EVNT_DIR_INC) -I $(ROOT_DIR_INC) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DPIC |
90 |
|
|
91 |
|
|
92 |
dynamic: libyoda.so.0.0.0 |
dynamic: libyoda.so.0.0.0 |
93 |
|
ifeq ($(verbose),) |
94 |
|
@ln -sf libyoda.so.0.0.0 libyoda.so.0 ;\ |
95 |
|
ln -sf libyoda.so.0.0.0 libyoda.so |
96 |
|
else |
97 |
ln -sf libyoda.so.0.0.0 libyoda.so.0 ;\ |
ln -sf libyoda.so.0.0.0 libyoda.so.0 ;\ |
98 |
ln -sf libyoda.so.0.0.0 libyoda.so |
ln -sf libyoda.so.0.0.0 libyoda.so |
99 |
|
endif |
100 |
|
|
101 |
static: libyoda.a |
static: libyoda.a |
102 |
|
|
103 |
libyoda.so.0.0.0: $(TARGETLIB) $(EXTLIB) |
libyoda.so.0.0.0: $(TARGETLIB) $(EXTLIB) |
104 |
|
ifeq ($(verbose),) |
105 |
|
@$(CXX) \ |
106 |
|
$(PAM_BIT) -o $@ \ |
107 |
|
-shared \ |
108 |
|
-Wl,-soname \ |
109 |
|
-Wl,libyoda.so.0 \ |
110 |
|
-Wl,--whole-archive \ |
111 |
|
$^ \ |
112 |
|
-Wl,--no-whole-archive |
113 |
|
else |
114 |
$(CXX) \ |
$(CXX) \ |
115 |
$(PAM_BIT) -o $@ \ |
$(PAM_BIT) -o $@ \ |
116 |
-shared -nostdlib \ |
-shared \ |
117 |
-Wl,-soname \ |
-Wl,-soname \ |
118 |
-Wl,libyoda.so.0 \ |
-Wl,libyoda.so.0 \ |
119 |
/usr/lib/gcc/i386-redhat-linux/3.4.6/crtbeginS.o \ |
-Wl,--whole-archive \ |
120 |
/usr/lib/gcc/i386-redhat-linux/3.4.6/crtendS.o \ |
$^ \ |
121 |
-Wl,--whole-archive \ |
-Wl,--no-whole-archive |
122 |
$^ \ |
endif |
|
-Wl,--no-whole-archive |
|
123 |
|
|
124 |
libyoda.a: $(TARGETLIB) $(EXTLIB) |
libyoda.a: $(TARGETLIB) $(EXTLIB) |
125 |
|
ifeq ($(verbose),) |
126 |
|
@cd $(OBJDIR) &>/dev/null ; \ |
127 |
|
for sub_lib in $(TARGETLIB) $(EXTLIB) ; do \ |
128 |
|
$(AR) -x $$sub_lib ; \ |
129 |
|
done ;\ |
130 |
|
$(AR) -scrv libyoda.a *.o &>/dev/null |
131 |
|
else |
132 |
cd $(OBJDIR) ; \ |
cd $(OBJDIR) ; \ |
133 |
pwd ;\ |
pwd ;\ |
134 |
for sub_lib in $(TARGETLIB) $(EXTLIB) ; do \ |
for sub_lib in $(TARGETLIB) $(EXTLIB) ; do \ |
135 |
$(AR) -x $$sub_lib ; \ |
$(AR) -x $$sub_lib ; \ |
136 |
done ;\ |
done ;\ |
137 |
$(AR) -scrv libyoda.a *.o \ |
$(AR) -scrv libyoda.a *.o |
138 |
/usr/lib/gcc/i386-redhat-linux/3.4.6/crtbeginS.o \ |
endif |
|
/usr/lib/gcc/i386-redhat-linux/3.4.6/crtendS.o |
|
139 |
|
|
140 |
$(TARGETLIB) : ${OBJS} |
$(TARGETLIB) : ${OBJS} |
141 |
|
ifeq ($(verbose),) |
142 |
|
@$(AR) -scrv $@ $? &>/dev/null |
143 |
|
else |
144 |
$(AR) -scrv $@ $? |
$(AR) -scrv $@ $? |
145 |
|
endif |
146 |
|
|
147 |
$(EXTLIB): $(EXTDIR) |
$(EXTLIB): $(EXTDIR) |
148 |
|
ifeq ($(verbose),) |
149 |
|
@for sub_dir in $(EXTDIR) ; do \ |
150 |
|
(${EGREEN} "Make all in $$sub_dir "; ${RESET});\ |
151 |
|
$(MAKE) -s -C $$sub_dir libs ; \ |
152 |
|
done |
153 |
|
else |
154 |
for sub_dir in $(EXTDIR) ; do \ |
for sub_dir in $(EXTDIR) ; do \ |
155 |
$(MAKE) -C $$sub_dir libs ; \ |
$(MAKE) -C $$sub_dir libs ; \ |
156 |
done |
done |
157 |
|
endif |
158 |
|
|
159 |
SUBPACKET_HEADER_FILES = \ |
SUBPACKET_HEADER_FILES = \ |
160 |
|
|
225 |
LinkDef.h |
LinkDef.h |
226 |
|
|
227 |
$(ROOTEVENTDICT).cpp: ${DICT_HEADER_FILES} |
$(ROOTEVENTDICT).cpp: ${DICT_HEADER_FILES} |
228 |
|
ifeq ($(verbose),) |
229 |
|
@LD_LIBRARY_PATH=$(ROOT_LIB):$(LD_LIBRARY_PATH); $(ROOTCINT) -f $@ -c ${INCLUDES} $^ |
230 |
|
else |
231 |
echo $(ROOTCINT) -f $@ -c ${INCLUDES} $^ ;\ |
echo $(ROOTCINT) -f $@ -c ${INCLUDES} $^ ;\ |
232 |
LD_LIBRARY_PATH=$(ROOT_LIB) $(ROOTCINT) -f $@ -c ${INCLUDES} $^ |
LD_LIBRARY_PATH=$(ROOT_LIB):$(LD_LIBRARY_PATH); $(ROOTCINT) -f $@ -c ${INCLUDES} $^ |
233 |
|
endif |
234 |
|
|
235 |
clean: clean-subdir |
clean: clean-subdir |
236 |
|
ifeq ($(verbose),) |
237 |
|
@rm -f $(TARGETLIB) ${OBJS} $(OBJDIR)/.*.d libyoda* |
238 |
|
else |
239 |
rm -f $(TARGETLIB) ${OBJS} $(OBJDIR)/.*.d libyoda* |
rm -f $(TARGETLIB) ${OBJS} $(OBJDIR)/.*.d libyoda* |
240 |
|
endif |
241 |
|
|
242 |
clean-subdir: $(EXTDIR) |
clean-subdir: $(EXTDIR) |
243 |
|
ifeq ($(verbose),) |
244 |
|
@for sub_dir in $(EXTDIR) ; do \ |
245 |
|
$(MAKE) -s -C $$sub_dir clean ; \ |
246 |
|
done |
247 |
|
else |
248 |
for sub_dir in $(EXTDIR) ; do \ |
for sub_dir in $(EXTDIR) ; do \ |
249 |
$(MAKE) -C $$sub_dir clean ; \ |
$(MAKE) -C $$sub_dir clean ; \ |
250 |
done |
done |
251 |
|
endif |
252 |
|
|
253 |
distclean: distclean-sub distclean-subdir clean |
distclean: distclean-sub distclean-subdir clean |
254 |
|
ifeq ($(verbose),) |
255 |
|
@rm -f $(ROOTEVENTDICT).{cpp,h} |
256 |
|
else |
257 |
rm -f $(ROOTEVENTDICT).{cpp,h} |
rm -f $(ROOTEVENTDICT).{cpp,h} |
258 |
|
endif |
259 |
|
|
260 |
distclean-subdir: |
distclean-subdir: |
261 |
|
ifeq ($(verbose),) |
262 |
|
@for sub_dir in $(EXTDIR) ; do \ |
263 |
|
$(MAKE) -s -C $$sub_dir distclean-sub ; \ |
264 |
|
done |
265 |
|
else |
266 |
for sub_dir in $(EXTDIR) ; do \ |
for sub_dir in $(EXTDIR) ; do \ |
267 |
$(MAKE) -C $$sub_dir distclean-sub ; \ |
$(MAKE) -C $$sub_dir distclean-sub ; \ |
268 |
done |
done |
269 |
|
endif |
270 |
|
|
271 |
|
#-include $(DEPEND) |
|
-include $(DEPEND) |
|
272 |
|
|
273 |
|
|
274 |
#------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------ |