5 #-------------------------------------------------------------------------------
6 # build dir and src dir
7 build_dir
=$
(readlink
-e .
)
8 echo build_dir
=$build_dir
10 src_dir
=$
(readlink
-e $
(dirname $0))
13 config_h_dir
=$build_dir
14 #-------------------------------------------------------------------------------
16 #-------------------------------------------------------------------------------
17 # configure our ultra-thin linux "uapi" (User API) abstraction layer
18 rm -f $build_dir/ulinux
/arch
19 mkdir
-p $build_dir/ulinux
20 ln -f -s $src_dir/ulinux
/archs
/$arch $build_dir/ulinux
/arch
21 #-------------------------------------------------------------------------------
23 $arch-linux-gnu-gcc -pipe -c -fvisibility=hidden
-o $build_dir/all_S.o
-I$config_h_dir -I$build_dir $src_dir/all.S
26 $arch-linux-gnu-gcc -pipe -fPIC -O2 -c -static-libgcc -fvisibility=hidden
-o $build_dir/all_c.o
-I$config_h_dir -I$build_dir -I$src_dir $src_dir/all.c
29 $arch-linux-gnu-ld -Bstatic -nostdlib $
($arch-linux-gnu-gcc -print-libgcc-file-name) -o $build_dir/lnanosmtp
$build_dir/all_S.o
$build_dir/all_c.o
32 $arch-linux-gnu-strip -s $build_dir/lnanosmtp