]>
Commit | Line | Data |
---|---|---|
5a5a1232 | 1 | # $Header$ |
2 | ||
3 | ifeq (${REVESYS},) | |
4 | REVESYS := ${CURDIR}/.. | |
5 | endif | |
6 | MKDEPINC := make_depend.inc | |
7 | ||
8 | LD = ${CXX} | |
9 | LDEXT = so | |
10 | ||
11 | MAKEDEPEND = ${ROOTSYS}/bin/rmkdepend -Y -w 666 -f- | |
12 | ROOTCINT = ${ROOTSYS}/bin/rootcint | |
13 | ||
14 | CPPFLAGS = -I. -I${REVESYS} -I${ROOTSYS}/include | |
15 | CXXFLAGS = -g -fPIC -Wall -Woverloaded-virtual -Wno-long-long -pedantic-errors -ansi | |
16 | LDFLAGS = -shared | |
17 | ||
18 | ROOTCINTFLAGS = -I. -I${REVESYS} | |
19 | ||
20 | .SUFFIXES: .cxx .cc .h .o | |
21 | .SECONDARY: ${ALLOBJS} | |
22 | ||
23 | .SILENT: ${ALLOBJS} | |
24 | ||
25 | %.o: %.cc | |
26 | @echo --- Compiling $< | |
27 | ${CXX} ${CPPFLAGS} -c -o $@ ${CXXFLAGS} $< | |
28 | ||
29 | %.o: %.cxx | |
30 | @echo --- Compiling $< | |
31 | ${CXX} ${CPPFLAGS} -c -o $@ ${CXXFLAGS} $< | |
32 | ||
33 | lib%.so: ${OBJS} %_Dict.o | |
34 | ${LD} ${LDFLAGS} -o $@ $^ ${ROOTLIBS} ${EXTLIBS} | |
35 | ||
36 | #-------------------------------------------------------------- | |
37 | ||
38 | all: ${LIBS} ${EXES} .inst_libs .inst_exes | |
39 | ||
40 | #-------------------------------------------------------------- | |
41 | ||
42 | .inst_libs: ${LIBS} | |
43 | @mkdir -p ${REVESYS}/lib | |
44 | @if [ -n '${LIBS}' ]; then rsync -a ${LIBS} ${REVESYS}/lib; fi | |
45 | @touch .inst_libs | |
46 | ||
47 | .inst_exes: ${EXES} | |
48 | @mkdir -p ${REVESYS}/bin | |
49 | @if [ -n '${EXES}' ]; then rsync -a ${EXES} ${REVESYS}/bin; fi | |
50 | @touch .inst_exes | |
51 | ||
52 | #-------------------------------------------------------------- | |
53 | ||
54 | depend: | |
55 | @rm -f ${MKDEPINC} | |
56 | ||
57 | ${MKDEPINC}: | |
58 | @echo "Creating dependencies for module=${MODULE}, name=${NAME}." | |
59 | @${MAKEDEPEND} -- -- ${SRCS} > ${MKDEPINC} 2>/dev/null | |
60 | ||
61 | clean: | |
62 | @rm -f ${ALLOBJS} *_Dict.* ${LIBS} ${EXES} | |
63 | ||
64 | distclean: clean | |
65 | @rm -f ${MKDEPINC} .inst_* | |
66 | @(cd ${REVESYS}/lib; rm -f $(notdir ${LIBS})) | |
67 | @(cd ${REVESYS}/bin; rm -f $(notdir ${EXES})) | |
68 | ||
69 | #-------------------------------------------------------------- | |
70 | ||
71 | echo_module: | |
72 | @echo ${MODULE} | |
73 | ||
74 | echo_hdrs: | |
75 | @echo ${HDRS} | |
76 | ||
77 | echo_srcs: | |
78 | @echo ${SRCS} | |
79 | ||
80 | echo_objs: | |
81 | @echo ${OBJS} | |
82 | ||
83 | echo_libs: | |
84 | @echo ${LIBS} | |
85 | ||
86 | echo_exes: | |
87 | @echo ${EXES} | |
88 | ||
89 | #-------------------------------------------------------------- | |
90 | ||
91 | -include ${MKDEPINC} |