port reuse for same time IPv4 and IPv6 usage
[lnanosmtp.git] / make_gcc_x86_64
blob6d0ec76108cfdad4fdf42c6876a30c6122c55125
1 #!/bin/sh
2 LC_ALL=C
3 export LC_ALL
4 set -e
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))
11 echo src_dir=$src_dir
13 config_h_dir=$build_dir
14 #-------------------------------------------------------------------------------
15 arch=x86_64
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 #-------------------------------------------------------------------------------
22 echo ASM all.S;
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
25 echo CC all.c
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
28 echo LD lnanosmtp
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
31 echo STRIP lnanosmtp
32 $arch-linux-gnu-strip -s $build_dir/lnanosmtp