1 |
#***************************************************************************** |
#***************************************************************************** |
2 |
# |
# |
3 |
# FILE NAME: $Id: Makefile,v 1.4 2008/09/23 11:06:38 mocchiut Exp $ |
# FILE NAME: $Id: Makefile,v 1.13 2009/07/29 15:47:21 mocchiut 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 |
86 |
#------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------ |
87 |
|
|
88 |
|
|
89 |
all: dynamic static |
all: dynamic |
90 |
|
#static |
91 |
|
|
92 |
|
|
93 |
dynamic: libyoda.so.0.0.0 |
dynamic: libyoda.so.0.0.0 |
94 |
|
ifeq ($(verbose),) |
95 |
|
@ln -sf libyoda.so.0.0.0 libyoda.so.0 ;\ |
96 |
|
ln -sf libyoda.so.0.0.0 libyoda.so |
97 |
|
else |
98 |
ln -sf libyoda.so.0.0.0 libyoda.so.0 ;\ |
ln -sf libyoda.so.0.0.0 libyoda.so.0 ;\ |
99 |
ln -sf libyoda.so.0.0.0 libyoda.so |
ln -sf libyoda.so.0.0.0 libyoda.so |
100 |
|
endif |
101 |
|
|
102 |
static: libyoda.a |
static: libyoda.a |
103 |
|
|
104 |
libyoda.so.0.0.0: $(TARGETLIB) $(EXTLIB) |
libyoda.so.0.0.0: $(TARGETLIB) $(EXTLIB) |
105 |
|
ifeq ($(verbose),) |
106 |
|
@$(CXX) \ |
107 |
|
$(PAM_BIT) -o $@ \ |
108 |
|
-shared \ |
109 |
|
-Wl,-soname \ |
110 |
|
-Wl,libyoda.so.0 \ |
111 |
|
-Wl,--whole-archive \ |
112 |
|
$^ \ |
113 |
|
-Wl,--no-whole-archive |
114 |
|
else |
115 |
$(CXX) \ |
$(CXX) \ |
116 |
$(PAM_BIT) -o $@ \ |
$(PAM_BIT) -o $@ \ |
117 |
-shared -nostdlib \ |
-shared \ |
118 |
-Wl,-soname \ |
-Wl,-soname \ |
119 |
-Wl,libyoda.so.0 \ |
-Wl,libyoda.so.0 \ |
120 |
-Wl,--whole-archive \ |
-Wl,--whole-archive \ |
121 |
$^ \ |
$^ \ |
122 |
-Wl,--no-whole-archive |
-Wl,--no-whole-archive |
123 |
|
endif |
124 |
|
|
125 |
libyoda.a: $(TARGETLIB) $(EXTLIB) |
libyoda.a: $(TARGETLIB) $(EXTLIB) |
126 |
|
ifeq ($(verbose),) |
127 |
|
@cd $(OBJDIR) &>/dev/null ; \ |
128 |
|
for sub_lib in $(TARGETLIB) $(EXTLIB) ; do \ |
129 |
|
$(AR) -x $$sub_lib ; \ |
130 |
|
done ;\ |
131 |
|
$(AR) -scrv libyoda.a *.o &>/dev/null |
132 |
|
else |
133 |
cd $(OBJDIR) ; \ |
cd $(OBJDIR) ; \ |
134 |
pwd ;\ |
pwd ;\ |
135 |
for sub_lib in $(TARGETLIB) $(EXTLIB) ; do \ |
for sub_lib in $(TARGETLIB) $(EXTLIB) ; do \ |
136 |
$(AR) -x $$sub_lib ; \ |
$(AR) -x $$sub_lib ; \ |
137 |
done ;\ |
done ;\ |
138 |
$(AR) -scrv libyoda.a *.o |
$(AR) -scrv libyoda.a *.o |
139 |
|
endif |
140 |
|
|
141 |
$(TARGETLIB) : ${OBJS} |
$(TARGETLIB) : ${OBJS} |
142 |
|
ifeq ($(verbose),) |
143 |
|
@$(AR) -scrv $@ $? &>/dev/null |
144 |
|
else |
145 |
$(AR) -scrv $@ $? |
$(AR) -scrv $@ $? |
146 |
|
endif |
147 |
|
|
148 |
$(EXTLIB): $(EXTDIR) |
$(EXTLIB): $(EXTDIR) |
149 |
|
ifeq ($(verbose),) |
150 |
|
@for sub_dir in $(EXTDIR) ; do \ |
151 |
|
(${EGREEN} "Make all in $$sub_dir "; ${RESET});\ |
152 |
|
$(MAKE) -s -C $$sub_dir libs ; \ |
153 |
|
done |
154 |
|
else |
155 |
for sub_dir in $(EXTDIR) ; do \ |
for sub_dir in $(EXTDIR) ; do \ |
156 |
$(MAKE) -C $$sub_dir libs ; \ |
$(MAKE) -C $$sub_dir libs ; \ |
157 |
done |
done |
158 |
|
endif |
159 |
|
|
160 |
SUBPACKET_HEADER_FILES = \ |
SUBPACKET_HEADER_FILES = \ |
161 |
|
|
226 |
LinkDef.h |
LinkDef.h |
227 |
|
|
228 |
$(ROOTEVENTDICT).cpp: ${DICT_HEADER_FILES} |
$(ROOTEVENTDICT).cpp: ${DICT_HEADER_FILES} |
229 |
|
ifeq ($(verbose),) |
230 |
|
@LD_LIBRARY_PATH=$(ROOT_LIB):$(LD_LIBRARY_PATH); $(ROOTCINT) -f $@ -c ${INCLUDES} $^ |
231 |
|
else |
232 |
echo $(ROOTCINT) -f $@ -c ${INCLUDES} $^ ;\ |
echo $(ROOTCINT) -f $@ -c ${INCLUDES} $^ ;\ |
233 |
LD_LIBRARY_PATH=$(ROOT_LIB) $(ROOTCINT) -f $@ -c ${INCLUDES} $^ |
LD_LIBRARY_PATH=$(ROOT_LIB):$(LD_LIBRARY_PATH); $(ROOTCINT) -f $@ -c ${INCLUDES} $^ |
234 |
|
endif |
235 |
|
|
236 |
clean: clean-subdir |
clean: clean-subdir |
237 |
|
ifeq ($(verbose),) |
238 |
|
@rm -f $(TARGETLIB) ${OBJS} $(OBJDIR)/.*.d libyoda* |
239 |
|
else |
240 |
rm -f $(TARGETLIB) ${OBJS} $(OBJDIR)/.*.d libyoda* |
rm -f $(TARGETLIB) ${OBJS} $(OBJDIR)/.*.d libyoda* |
241 |
|
endif |
242 |
|
|
243 |
clean-subdir: $(EXTDIR) |
clean-subdir: $(EXTDIR) |
244 |
|
ifeq ($(verbose),) |
245 |
|
@for sub_dir in $(EXTDIR) ; do \ |
246 |
|
$(MAKE) -s -C $$sub_dir clean ; \ |
247 |
|
done |
248 |
|
else |
249 |
for sub_dir in $(EXTDIR) ; do \ |
for sub_dir in $(EXTDIR) ; do \ |
250 |
$(MAKE) -C $$sub_dir clean ; \ |
$(MAKE) -C $$sub_dir clean ; \ |
251 |
done |
done |
252 |
|
endif |
253 |
|
|
254 |
distclean: distclean-sub distclean-subdir clean |
distclean: distclean-sub distclean-subdir clean |
255 |
|
ifeq ($(verbose),) |
256 |
|
@rm -f $(ROOTEVENTDICT).{cpp,h} |
257 |
|
else |
258 |
rm -f $(ROOTEVENTDICT).{cpp,h} |
rm -f $(ROOTEVENTDICT).{cpp,h} |
259 |
|
endif |
260 |
|
|
261 |
distclean-subdir: |
distclean-subdir: |
262 |
|
ifeq ($(verbose),) |
263 |
|
@for sub_dir in $(EXTDIR) ; do \ |
264 |
|
$(MAKE) -s -C $$sub_dir distclean-sub ; \ |
265 |
|
done |
266 |
|
else |
267 |
for sub_dir in $(EXTDIR) ; do \ |
for sub_dir in $(EXTDIR) ; do \ |
268 |
$(MAKE) -C $$sub_dir distclean-sub ; \ |
$(MAKE) -C $$sub_dir distclean-sub ; \ |
269 |
done |
done |
270 |
|
endif |
271 |
|
|
272 |
|
#-include $(DEPEND) |
|
-include $(DEPEND) |
|
273 |
|
|
274 |
|
|
275 |
#------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------ |