Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2918364
example.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
743 B
Referenced Files
None
Subscribers
None
example.sh
View Options
#!/bin/bash
set
-e
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
&&
pwd
)
"
DIST_DIR
=
"
$SCRIPT_DIR
/dist"
SOURCE
=
"
$SCRIPT_DIR
/../examples/embed/embed.c"
OUTPUT
=
"
$SCRIPT_DIR
/dist/embed"
if
[
!
-f
"
$DIST_DIR
/libant.a"
]
;
then
echo
"Error: libant.a not found in
$DIST_DIR
"
echo
"Run ./build.sh first"
exit
1
fi
case
"
$(
uname
-s
)
"
in
Darwin
)
LIBS
=
"-framework Security -framework CoreFoundation -lpthread"
;;
Linux
)
LIBS
=
"-lpthread -ldl -lm"
;;
MINGW*
|
MSYS*
|
CYGWIN*
|
Windows_NT
)
LIBS
=
"-lws2_32 -lrpcrt4 -lsecur32 -lntdll -lcrypt32 -luserenv"
;;
*
)
LIBS
=
"-lpthread"
;;
esac
CC
=
"
${
CC
:-
clang
}
"
echo
"Compiling embed example..."
$CC
"
$SOURCE
"
-I
"
$DIST_DIR
"
"
$DIST_DIR
/libant.a"
$LIBS
-o
"
$OUTPUT
"
echo
"Done:
$OUTPUT
"
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Fri, Mar 27, 12:09 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
512117
Default Alt Text
example.sh (743 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment