repo.or.cz
/
wvstreams.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Try another fix for wvlinkerhack and static libraries.
[wvstreams.git]
/
gen-cc
blob
40500bb302101e62dc69c205e74410629318ce34
1
#!/bin/sh -e
2
OUTFILE
=
$1
3
EXT
=
$2
4
echo
"* Generating
$OUTFILE
"
>&
2
5
TEMPFILE
=
`tempfile --directory=. --prefix=gencc`
6
7
cat
>
$TEMPFILE
<<-EOF
8
#!/bin/sh
9
set -e
10
11
MODE=\
$1
12
BASE=\
$2
13
DIR=\$(dirname \
$BASE
)
14
DEPFILE=\$(dirname \
$BASE
)/.\$(basename \
$BASE
.o).d
15
shift
16
shift
17
18
$CC
\
$MODE
-o \
$BASE
.o \
$BASE
.
$EXT
\\
19
-MMD -MF \
$DEPFILE
-MP \
20
$CPPFLAGS
\\
21
$CFLAGS
\\
22
"\$@"
23
EOF
24
25
chmod
a
+
x
$TEMPFILE
26
mv
$TEMPFILE $OUTFILE