Files
static-php-cli/src/SPC/builder/windows/library/bzip2.php
crazywhalecc 3100911802 Add several extensions and libs for windows
exts: bz2, sqlsrv, pdo_sqlsrv, yaml, zip, rar
libs: bzip2, libyaml, libzip, xz
2024-06-30 00:41:41 +08:00

22 lines
713 B
PHP

<?php
declare(strict_types=1);
namespace SPC\builder\windows\library;
class bzip2 extends WindowsLibraryBase
{
public const NAME = 'bzip2';
protected function build(): void
{
$nmake = $this->builder->makeSimpleWrapper('nmake /nologo /f Makefile.msc CFLAGS="-DWIN32 -MT -Ox -D_FILE_OFFSET_BITS=64 -nologo"');
cmd()->cd($this->source_dir)
->execWithWrapper($nmake, 'clean')
->execWithWrapper($nmake, 'lib');
copy($this->source_dir . '\libbz2.lib', BUILD_LIB_PATH . '\libbz2.lib');
copy($this->source_dir . '\libbz2.lib', BUILD_LIB_PATH . '\libbz2_a.lib');
copy($this->source_dir . '\bzlib.h', BUILD_INCLUDE_PATH . '\bzlib.h');
}
}