|
a/src/lib/mkMake |
|
b/src/lib/mkMake |
1 |
#!/bin/sh
|
1 |
#!/bin/sh
|
2 |
|
2 |
|
3 |
mk=Makefile
|
3 |
mk=Makefile
|
4 |
depth=${depth:-..}
|
4 |
depth=${depth:-..}
|
5 |
|
5 |
|
6 |
SRCS="\
|
6 |
SRC_CPP="\
|
7 |
${depth}/aspell/rclaspell.cpp \
|
7 |
${depth}/aspell/rclaspell.cpp \
|
8 |
${depth}/common/rclconfig.cpp \
|
8 |
${depth}/common/rclconfig.cpp \
|
9 |
${depth}/common/rclinit.cpp \
|
9 |
${depth}/common/rclinit.cpp \
|
10 |
${depth}/common/textsplit.cpp \
|
10 |
${depth}/common/textsplit.cpp \
|
11 |
${depth}/common/unacpp.cpp \
|
11 |
${depth}/common/unacpp.cpp \
|
|
... |
|
... |
55 |
${depth}/utils/transcode.cpp \
|
55 |
${depth}/utils/transcode.cpp \
|
56 |
${depth}/utils/wipedir.cpp \
|
56 |
${depth}/utils/wipedir.cpp \
|
57 |
${depth}/utils/x11mon.cpp \
|
57 |
${depth}/utils/x11mon.cpp \
|
58 |
"
|
58 |
"
|
59 |
|
59 |
|
|
|
60 |
SRC_CC="\
|
|
|
61 |
${depth}/bincimapmime/mime-getpart.cc \
|
|
|
62 |
${depth}/bincimapmime/mime-parsefull.cc \
|
|
|
63 |
${depth}/bincimapmime/mime-parseonlyheader.cc \
|
|
|
64 |
${depth}/bincimapmime/mime-printbody.cc \
|
|
|
65 |
${depth}/bincimapmime/mime-printdoc.cc \
|
|
|
66 |
${depth}/bincimapmime/mime-printheader.cc \
|
|
|
67 |
${depth}/bincimapmime/mime.cc \
|
|
|
68 |
${depth}/bincimapmime/convert.cc \
|
|
|
69 |
${depth}/bincimapmime/iodevice.cc \
|
|
|
70 |
${depth}/bincimapmime/iofactory.cc \
|
|
|
71 |
"
|
60 |
|
72 |
|
61 |
for c in $SRCS;do
|
73 |
for c in $SRC_CPP;do
|
62 |
o=`basename $c .cpp`.o
|
74 |
o=`basename $c .cpp`.o
|
63 |
OBJS="$OBJS $o"
|
75 |
OBJS="$OBJS $o"
|
64 |
d=`basename $c .cpp`.dep
|
76 |
d=`basename $c .cpp`.dep
|
65 |
cp /dev/null $d
|
77 |
cp /dev/null $d
|
66 |
s=`basename $c .cpp`.dep.stamp
|
78 |
s=`basename $c .cpp`.dep.stamp
|
|
|
79 |
DEPS="$DEPS $s"
|
|
|
80 |
done
|
|
|
81 |
for c in $SRC_CC;do
|
|
|
82 |
o=`basename $c .cc`.o
|
|
|
83 |
OBJS="$OBJS $o"
|
|
|
84 |
d=`basename $c .cc`.dep
|
|
|
85 |
cp /dev/null $d
|
|
|
86 |
s=`basename $c .cc`.dep.stamp
|
67 |
DEPS="$DEPS $s"
|
87 |
DEPS="$DEPS $s"
|
68 |
done
|
88 |
done
|
69 |
|
89 |
|
70 |
test -f $mk && chmod +w $mk
|
90 |
test -f $mk && chmod +w $mk
|
71 |
|
91 |
|
72 |
cat > $mk <<EOF
|
92 |
cat > $mk <<EOF
|
73 |
# DONT EDIT BY HAND: created by script mkMake
|
93 |
# DONT EDIT BY HAND: created by script mkMake
|
74 |
depth = ${depth}
|
94 |
depth = ${depth}
|
75 |
include \$(depth)/mk/sysconf
|
95 |
include \$(depth)/mk/sysconf
|
76 |
|
|
|
77 |
UNACCFLAGS = \$(CFLAGS) -g -I. -I\$(depth)/unac \$(INCICONV) -DUNAC_VERSION=\\"1.0.7\\"
|
|
|
78 |
|
96 |
|
79 |
LIBS = librcl.a
|
97 |
LIBS = librcl.a
|
80 |
|
98 |
|
81 |
all: \$(LIBS)
|
99 |
all: \$(LIBS)
|
82 |
|
100 |
|
|
... |
|
... |
86 |
librcl.a : \$(DEPS) \$(OBJS) unac.o
|
104 |
librcl.a : \$(DEPS) \$(OBJS) unac.o
|
87 |
ar ru librcl.a \$(OBJS) unac.o
|
105 |
ar ru librcl.a \$(OBJS) unac.o
|
88 |
\$(RANLIB) librcl.a
|
106 |
\$(RANLIB) librcl.a
|
89 |
|
107 |
|
90 |
unac.o : \$(depth)/unac/unac.c \$(depth)/unac/unac.h
|
108 |
unac.o : \$(depth)/unac/unac.c \$(depth)/unac/unac.h
|
91 |
\$(CC) \$(UNACCFLAGS) -c \$(depth)/unac/unac.c
|
109 |
\$(CC) \$(ALL_CXXFLAGS) -c \$(depth)/unac/unac.c
|
92 |
EOF
|
110 |
EOF
|
93 |
|
111 |
|
94 |
for c in $SRCS;do
|
112 |
for c in $SRC_CPP;do
|
95 |
o=`basename $c .cpp`.o
|
113 |
o=`basename $c .cpp`.o
|
|
|
114 |
echo "$o : $c" >> $mk
|
|
|
115 |
echo " \$(CXX) \$(ALL_CXXFLAGS) -c $c" >> $mk
|
|
|
116 |
done
|
|
|
117 |
for c in $SRC_CC;do
|
|
|
118 |
o=`basename $c .cc`.o
|
96 |
echo "$o : $c" >> $mk
|
119 |
echo "$o : $c" >> $mk
|
97 |
echo " \$(CXX) \$(ALL_CXXFLAGS) -c $c" >> $mk
|
120 |
echo " \$(CXX) \$(ALL_CXXFLAGS) -c $c" >> $mk
|
98 |
done
|
121 |
done
|
99 |
|
122 |
|
100 |
cat >> $mk <<EOF
|
123 |
cat >> $mk <<EOF
|
|
... |
|
... |
104 |
for i in *.dep;do test -f \$\$i && cp /dev/null \$\$i;done
|
127 |
for i in *.dep;do test -f \$\$i && cp /dev/null \$\$i;done
|
105 |
distclean: clean
|
128 |
distclean: clean
|
106 |
rm -f *.dep
|
129 |
rm -f *.dep
|
107 |
EOF
|
130 |
EOF
|
108 |
|
131 |
|
109 |
for c in $SRCS;do
|
132 |
for c in $SRC_CPP;do
|
110 |
d=`basename $c .cpp`.dep
|
133 |
d=`basename $c .cpp`.dep
|
111 |
s=`basename $c .cpp`.dep.stamp
|
134 |
s=`basename $c .cpp`.dep.stamp
|
112 |
echo "$s : $c" >> $mk
|
135 |
echo "$s : $c" >> $mk
|
113 |
echo " \$(CXX) -M \$(ALL_CXXFLAGS) $c > $d" >> $mk
|
136 |
echo " \$(CXX) -M \$(ALL_CXXFLAGS) $c > $d" >> $mk
|
114 |
echo " touch $s" >> $mk
|
137 |
echo " touch $s" >> $mk
|
115 |
done
|
138 |
done
|
116 |
for c in $SRCS;do
|
139 |
for c in $SRC_CPP;do
|
117 |
d=`basename $c .cpp`.dep
|
140 |
d=`basename $c .cpp`.dep
|
118 |
echo "include $d" >> $mk
|
141 |
echo "include $d" >> $mk
|
119 |
done
|
142 |
done
|
|
|
143 |
for c in $SRC_CC;do
|
|
|
144 |
d=`basename $c .cc`.dep
|
|
|
145 |
s=`basename $c .cc`.dep.stamp
|
|
|
146 |
echo "$s : $c" >> $mk
|
|
|
147 |
echo " \$(CXX) -M \$(ALL_CXXFLAGS) $c > $d" >> $mk
|
|
|
148 |
echo " touch $s" >> $mk
|
|
|
149 |
done
|
|
|
150 |
for c in $SRC_CC;do
|
|
|
151 |
d=`basename $c .cc`.dep
|
|
|
152 |
echo "include $d" >> $mk
|
|
|
153 |
done
|