Blame dalist.lzy

e09104
lz_project_rules()
e09104
{
e09104
	lz_rules="all install xstatic install_xstatic"
e09104
}
e09104
e09104
lz_project_definitions()
e09104
{
e09104
	dalist_lib_name=libdalist
e09104
	dalist_so_name="$lz_build_dir/lib/$dalist_lib_name$lz_dylib_ext"
e09104
	dalist_a_name="$lz_build_dir/lib/$dalist_lib_name$lz_stlib_ext"
e09104
	dalist_so_def_name="$lz_build_dir/lib/$dalist_lib_name$lz_libdef_ext"
e09104
	dalist_implib_name="$lz_build_dir/lib/$dalist_lib_name$lz_implib_ext"
e09104
e09104
	lz_cflags_common="-DMIDIPIX_FREESTANDING
e09104
			-D__NT$lz_arch_bits \
e09104
			-UWIN32 -U_WIN32 -U__WIN32__ -UWIN64 -U_WIN64 -U__WIN64__ \
e09104
			-Werror=all -fno-builtin -ffreestanding"
e09104
e09104
e09104
	# lz_cflags_extra="-Os -fno-stack-protector -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables"
e09104
				
e09104
	dalist_so_ldflags="-shared --image-base=0x320000 \
e09104
				--entry "$lz_default_underscore"dalist_lib_entry_point@12 \
e09104
				--exclude-all-symbols \
e09104
				--output-def $dalist_so_def_name \
e09104
				--out-implib $dalist_implib_name \
e09104
				--subsystem=windows"
e09104
e09104
	lz_cflags_include_common="-I$lz_project_dir/include"
e09104
e09104
	if [ "$MIDIPIX_ROOT"x != x ]; then
e09104
		lz_cflags_include_common="$lz_cflags_include_common -I$MIDIPIX_ROOT/include"
e09104
	fi
e09104
e09104
	dalist_so_obj_list=dalist.so.objs
e09104
	dalist_so_src_list=dalist.so.src.lst
e09104
e09104
	dalist_a_obj_list=dalist.a.objs
e09104
	dalist_a_src_list=dalist.a.src.lst
e09104
}
e09104
e09104
dalist_shared()
e09104
{
e09104
	lz_src_dirs="src"
e09104
	lz_cflags_step="-DDALIST_BUILD"
e09104
e09104
	if ! [ "$lz_pecoff_winnt"x = yesx ]; then
e09104
		lz_cflags_step="$lz_cflags_step -fpic"
e09104
	fi	
e09104
e09104
	lz_compile "$dalist_so_obj_list" "$dalist_so_src_list" "$lz_dyobj_ext"
e09104
        lz_link    "$dalist_so_obj_list" "$dalist_so_src_list" "$dalist_so_name" \
e09104
			"$dalist_so_ldflags" \
e09104
			''
e09104
}
e09104
e09104
e09104
dalist_static()
e09104
{
e09104
	lz_src_dirs="src"
e09104
e09104
	lz_compile "$dalist_a_obj_list" "$dalist_a_src_list" "$lz_stobj_ext"
e09104
        lz_archive "$dalist_a_obj_list" "$dalist_a_src_list" "$dalist_a_name"
e09104
}
e09104
e09104
e09104
dalist_xstatic()
e09104
{
e09104
	lz_src_dirs="src"
e09104
	lz_cflags_step="-DDALIST_BUILD"
e09104
e09104
	lz_compile "$dalist_a_obj_list" "$dalist_a_src_list" "$lz_stobj_ext"
e09104
        lz_archive "$dalist_a_obj_list" "$dalist_a_src_list" "$dalist_a_name"
e09104
}
e09104
e09104
e09104
dalist_install_headers()
e09104
{
e09104
	lz_pushd $lz_project_dir
e09104
e09104
	cp -r -t $lz_prefix/include include/$lz_project_name
e09104
e09104
	lz_popd
e09104
}
e09104
e09104
e09104
dalist_install_shared()
e09104
{
e09104
	lz_pushd $lz_build_dir/lib
e09104
e09104
	cp -t $lz_prefix/lib $dalist_lib_name$lz_dylib_ext
e09104
	cp -t $lz_prefix/lib $dalist_lib_name$lz_implib_ext
e09104
e09104
	lz_popd
e09104
}
e09104
e09104
e09104
dalist_install_static()
e09104
{
e09104
	lz_pushd $lz_build_dir/lib
e09104
e09104
	cp -t $lz_prefix/lib $dalist_lib_name$lz_stlib_ext
e09104
e09104
	lz_popd
e09104
}
e09104
e09104
dalist_install_xstatic()
e09104
{
e09104
	lz_step dalist_xstatic
e09104
	lz_step dalist_install_static
e09104
}
e09104
e09104
e09104
dalist_all()
e09104
{
e09104
	lz_step dalist_shared
e09104
	lz_step dalist_static
e09104
}
e09104
e09104
e09104
dalist_install()
e09104
{
e09104
	lz_step dalist_all
e09104
	lz_step dalist_install_shared
e09104
	lz_step dalist_install_static
e09104
	lz_step dalist_install_headers
e09104
}