forked from radareorg/radare2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharlib
executable file
·59 lines (48 loc) · 1.03 KB
/
arlib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh
# Wrapper around MS's lib.exe to make it act more like Unix ar
case $MACHTYPE in
*-msys)
slash="-"
;;
*)
slash="/"
;;
esac
# prog specifies the program that should be run cl.exe
prog=lib
# opts specifies the command line to pass to the MSVC program
libopt="${slash}nologo"
verbose=1
processargs()
{
# Ignore first argument (q, rfs...)
shift
# Add out library
libopt="${libopt},${slash}out:${1}"
shift
# Modify path for files
for arg in $@; do
path=$(cygpath -w "${arg}")
libopt="${libopt},${path}"
done
}
IFS=""
processargs $@
# Default LIB environment variable is overwritten by some makefiles ...
# So we just add it with LIBPATH (LIB is backed up in VC_LIB)
IFS=";"
for p in ${VC_LIB}; do
libopt="${libopt},${slash}LIBPATH:${p}"
done
if test "x$V" = "x1" ; then
verbose=1
fi
IFS=","
if test -n "$verbose" ; then
printf "%s" "$prog"
for opt in ${libopt} ; do
printf "%s" " \"$opt\""
done
echo ""
fi
exec ${prog} ${libopt}