summaryrefslogtreecommitdiff
path: root/B
diff options
context:
space:
mode:
authorLorry <lorry@roadtrain.codethink.co.uk>2012-06-28 10:15:24 +0100
committerLorry <lorry@roadtrain.codethink.co.uk>2012-06-28 10:15:24 +0100
commite06d0bbf2a7edea146a4041a3c85d77d11d34e48 (patch)
tree8d4fcff7ab3705384a15126ad3b68db5686e0f8b /B
downloadlzo-e06d0bbf2a7edea146a4041a3c85d77d11d34e48.tar.gz
Tarball conversion
Diffstat (limited to 'B')
-rw-r--r--B/00README.TXT54
-rw-r--r--B/clean.bat4
-rw-r--r--B/done.bat2
-rw-r--r--B/dos16/bc.bat39
-rw-r--r--B/dos16/bc.rsp67
-rw-r--r--B/dos16/bc_286.bat42
-rw-r--r--B/dos16/bc_pp.bat42
-rw-r--r--B/dos16/dm.bat39
-rw-r--r--B/dos16/mc.bat52
-rw-r--r--B/dos16/mc_qc.bat52
-rw-r--r--B/dos16/qc.bat40
-rw-r--r--B/dos16/sc.bat53
-rw-r--r--B/dos16/tc.bat39
-rw-r--r--B/dos16/vc.bat39
-rw-r--r--B/dos16/vc_qc.bat39
-rw-r--r--B/dos16/wc.bat39
-rw-r--r--B/dos16/wc.rsp67
-rw-r--r--B/dos32/bc_pp.bat42
-rw-r--r--B/dos32/dj2.bat45
-rw-r--r--B/dos32/dj2.opt6
-rw-r--r--B/dos32/dm.bat43
-rw-r--r--B/dos32/emx.bat45
-rw-r--r--B/dos32/highc.bat39
-rw-r--r--B/dos32/highc.rsp79
-rw-r--r--B/dos32/ndp.bat40
-rw-r--r--B/dos32/ndp.rsp67
-rw-r--r--B/dos32/sc.bat51
-rw-r--r--B/dos32/wc.bat39
-rw-r--r--B/dos32/zc.bat51
-rw-r--r--B/generic/Makefile91
-rwxr-xr-xB/generic/build.sh69
-rwxr-xr-xB/generic/build_freestanding.sh8
-rwxr-xr-xB/generic/build_gcc.sh25
-rwxr-xr-xB/generic/clean.sh7
-rw-r--r--B/os2/emx.bat45
-rw-r--r--B/os2/wc.bat42
-rw-r--r--B/os2/zc.bat51
-rw-r--r--B/os2_16/mc.bat43
-rw-r--r--B/os2_16/wc.bat42
-rw-r--r--B/prepare.bat10
-rw-r--r--B/src.rsp67
-rw-r--r--B/unset.bat10
-rw-r--r--B/win16/bc.bat42
-rw-r--r--B/win16/dm.bat43
-rw-r--r--B/win16/mc.bat56
-rw-r--r--B/win16/sc.bat53
-rw-r--r--B/win16/vc.bat43
-rw-r--r--B/win16/wc.bat42
-rw-r--r--B/win32/bc.bat42
-rw-r--r--B/win32/bc.rsp79
-rw-r--r--B/win32/cygwin.bat45
-rw-r--r--B/win32/cygwin.rsp79
-rw-r--r--B/win32/dm.bat42
-rw-r--r--B/win32/ic.bat42
-rw-r--r--B/win32/lccwin32.bat59
-rw-r--r--B/win32/mingw.bat45
-rw-r--r--B/win32/mwerks.bat42
-rw-r--r--B/win32/pellesc.bat42
-rw-r--r--B/win32/pgi.bat43
-rw-r--r--B/win32/pw32.bat45
-rw-r--r--B/win32/rsxnt.bat45
-rw-r--r--B/win32/sc.bat56
-rw-r--r--B/win32/vc.bat42
-rw-r--r--B/win32/vc.rsp79
-rw-r--r--B/win32/vc_dll.bat42
-rw-r--r--B/win32/vc_dll.def13
-rw-r--r--B/win32/wc.bat39
-rw-r--r--B/win32/wc.rsp79
-rw-r--r--B/win64/ic.bat42
-rw-r--r--B/win64/ic_dll.bat42
-rw-r--r--B/win64/vc.bat42
-rw-r--r--B/win64/vc.rsp67
-rw-r--r--B/win64/vc_dll.bat42
-rw-r--r--B/win64/vc_dll.def1
74 files changed, 3281 insertions, 0 deletions
diff --git a/B/00README.TXT b/B/00README.TXT
new file mode 100644
index 0000000..45bdf7b
--- /dev/null
+++ b/B/00README.TXT
@@ -0,0 +1,54 @@
+Simple make drivers for DOS, Windows, OS/2 and other systems
+============================================================
+
+This directory contains a bunch of simple build scripts - I've tried
+to make them as foolproof as possible.
+
+To build LZO for your system type 'b\OS\COMPILER' in the base directory,
+e.g. 'b\win32\vc.bat' will build the Win32 Visual C/C++ version.
+
+After building do a basic test by running 'lzotest.exe -mlzo COPYING'.
+util\check.sh is an example of a more thorough test driver.
+
+Please send me your additional/improved versions.
+
+
+Overview:
+---------
+
+b\dos32\bc_pp.bat Borland C/C++ (1)
+b\dos32\dj2.bat djgpp v2 + gcc (1)
+b\dos32\dm.bat Digital Mars C/C++ (1)
+b\dos32\emx.bat emx + gcc (1)
+b\dos32\sc.bat Symantec C/C++ (1)
+b\dos32\wc.bat Watcom C/C++ (1)
+
+b\os2\emx.bat emx + gcc (1)
+b\os2\wc.bat Watcom C/C++ (1)
+
+b\win32\bc.bat Borland C/C++ (1)
+b\win32\cygwin.bat Cygwin + gcc (1)
+b\win32\dm.bat Digital Mars C/C++ (1)
+b\win32\ic.bat Intel C/C++ (1)
+b\win32\mingw.bat MinGW + gcc (1)
+b\win32\mwerks.bat Metrowerks CodeWarrior C/C++ (1)
+b\win32\pellesc.bat Pelles C (1)
+b\win32\pgi.bat Portland Group PGI C/C++ (1)
+b\win32\rsxnt.bat rsxnt + gcc (1)
+b\win32\sc.bat Symantec C/C++ (1)
+b\win32\vc.bat Visual C/C++ (1)
+b\win32\vc_dll.bat Visual C/C++ (DLL version) (1)
+b\win32\wc.bat Watcom C/C++ (1)
+
+b\win64\ic.bat Intel C/C++ (Itanium)
+b\win64\ic_dll.bat Intel C/C++ (Itanium) (DLL version)
+b\win64\vc.bat Visual C/C++ (AMD64 or Itanium)
+b\win64\vc_dll.bat Visual C/C++ (AMD64 or Itanium) (DLL version)
+
+Finally, there are also a number of build scripts for obsolete systems
+like dos16 and win16.
+
+
+Notes:
+ (1) includes support for i386 assembler versions
+
diff --git a/B/clean.bat b/B/clean.bat
new file mode 100644
index 0000000..1f7de59
--- /dev/null
+++ b/B/clean.bat
@@ -0,0 +1,4 @@
+@del /q *.def *.err *.exp *.map *.o *.obj *.res *.tds > nul 2> nul
+@del /q liblzo2.a lzo2.a lzo2.dll lzo2.lib > nul 2> nul
+@del /q a.exe a.out dict.exe lzopack.exe precomp.exe precomp2.exe simple.exe > nul 2> nul
+@del /q lzotest.exe testmini.exe > nul 2> nul
diff --git a/B/done.bat b/B/done.bat
new file mode 100644
index 0000000..b9bf6aa
--- /dev/null
+++ b/B/done.bat
@@ -0,0 +1,2 @@
+@echo //
+@echo // Building LZO was successful. All done.
diff --git a/B/dos16/bc.bat b/B/dos16/bc.bat
new file mode 100644
index 0000000..292b793
--- /dev/null
+++ b/B/dos16/bc.bat
@@ -0,0 +1,39 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Borland C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=bcc -ml -f-
+set CF=-O1 -d -w -w-rch -w-sig %CFI% -Iinclude\lzo
+set LF=%BLIB%
+
+%CC% %CF% -Isrc -c @b\src.rsp
+@if errorlevel 1 goto error
+tlib %BLIB% @b\dos16\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -f -Iexamples examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -f -ls -Ilzotest lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/bc.rsp b/B/dos16/bc.rsp
new file mode 100644
index 0000000..8a1d83e
--- /dev/null
+++ b/B/dos16/bc.rsp
@@ -0,0 +1,67 @@
++lzo1.obj &
++lzo1_99.obj &
++lzo1a.obj &
++lzo1a_99.obj &
++lzo1b_1.obj &
++lzo1b_2.obj &
++lzo1b_3.obj &
++lzo1b_4.obj &
++lzo1b_5.obj &
++lzo1b_6.obj &
++lzo1b_7.obj &
++lzo1b_8.obj &
++lzo1b_9.obj &
++lzo1b_99.obj &
++lzo1b_9x.obj &
++lzo1b_cc.obj &
++lzo1b_d1.obj &
++lzo1b_d2.obj &
++lzo1b_rr.obj &
++lzo1b_xx.obj &
++lzo1c_1.obj &
++lzo1c_2.obj &
++lzo1c_3.obj &
++lzo1c_4.obj &
++lzo1c_5.obj &
++lzo1c_6.obj &
++lzo1c_7.obj &
++lzo1c_8.obj &
++lzo1c_9.obj &
++lzo1c_99.obj &
++lzo1c_9x.obj &
++lzo1c_cc.obj &
++lzo1c_d1.obj &
++lzo1c_d2.obj &
++lzo1c_rr.obj &
++lzo1c_xx.obj &
++lzo1f_1.obj &
++lzo1f_9x.obj &
++lzo1f_d1.obj &
++lzo1f_d2.obj &
++lzo1x_1.obj &
++lzo1x_1k.obj &
++lzo1x_1l.obj &
++lzo1x_1o.obj &
++lzo1x_9x.obj &
++lzo1x_d1.obj &
++lzo1x_d2.obj &
++lzo1x_d3.obj &
++lzo1x_o.obj &
++lzo1y_1.obj &
++lzo1y_9x.obj &
++lzo1y_d1.obj &
++lzo1y_d2.obj &
++lzo1y_d3.obj &
++lzo1y_o.obj &
++lzo1z_9x.obj &
++lzo1z_d1.obj &
++lzo1z_d2.obj &
++lzo1z_d3.obj &
++lzo2a_9x.obj &
++lzo2a_d1.obj &
++lzo2a_d2.obj &
++lzo_crc.obj &
++lzo_init.obj &
++lzo_ptr.obj &
++lzo_str.obj &
++lzo_util.obj
diff --git a/B/dos16/bc_286.bat b/B/dos16/bc_286.bat
new file mode 100644
index 0000000..025a48e
--- /dev/null
+++ b/B/dos16/bc_286.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Borland C/C++ + Pharlap 286DOS-Extender
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=bcc286 -ml -2
+set CF=-O1 -d -w -w-rch -w-sig %CFI% -Iinclude\lzo
+set LF=%BLIB%
+
+%CC% %CF% -Isrc -c @b\src.rsp
+@if errorlevel 1 goto error
+tlib %BLIB% @b\dos16\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iexamples examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples -DWITH_TIMER examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Ilzotest lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iminilzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/bc_pp.bat b/B/dos16/bc_pp.bat
new file mode 100644
index 0000000..6c0aac3
--- /dev/null
+++ b/B/dos16/bc_pp.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Borland C/C++ + Borland PowerPack 1.0 (DPMI16)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=bcc -ml -2 -WX
+set CF=-O1 -d -w -w-sig %CFI% -Iinclude\lzo
+set LF=%BLIB%
+
+%CC% %CF% -Isrc -c @b\src.rsp
+@if errorlevel 1 goto error
+tlib %BLIB% @b\dos16\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iexamples examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples -DWITH_TIMER examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Ilzotest lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iminilzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/dm.bat b/B/dos16/dm.bat
new file mode 100644
index 0000000..1ec6fec
--- /dev/null
+++ b/B/dos16/dm.bat
@@ -0,0 +1,39 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Digital Mars C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=dmc -ml
+set CF=-o -w- %CFI%
+set LF=%BLIB%
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+lib %BLIB% /b /c /n /noi @b\dos16\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/mc.bat b/B/dos16/mc.bat
new file mode 100644
index 0000000..4f34a36
--- /dev/null
+++ b/B/dos16/mc.bat
@@ -0,0 +1,52 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Microsoft C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=cl -nologo -AL
+set CF=-O -Gf -W3 %CFI%
+set LF=/map
+
+@REM %CC% %CF% -c src\*.c
+for %%f in (src\*.c) do %CC% %CF% -c %%f
+@if errorlevel 1 goto error
+lib /nologo %BLIB% @b\dos16\bc.rsp;
+@if errorlevel 1 goto error
+
+%CC% %CF% -c examples\dict.c
+@if errorlevel 1 goto error
+link %LF% dict.obj,,,%BLIB%;
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\lzopack.c
+@if errorlevel 1 goto error
+link %LF% lzopack.obj,,,%BLIB%;
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp.c
+@if errorlevel 1 goto error
+link %LF% precomp.obj,,,%BLIB%;
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp2.c
+@if errorlevel 1 goto error
+link %LF% precomp2.obj,,,%BLIB%;
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\simple.c
+@if errorlevel 1 goto error
+link %LF% simple.obj,,,%BLIB%;
+@if errorlevel 1 goto error
+
+%CC% %CF% -c lzotest\lzotest.c
+@if errorlevel 1 goto error
+link %LF% lzotest.obj,,,%BLIB%;
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/mc_qc.bat b/B/dos16/mc_qc.bat
new file mode 100644
index 0000000..1c2ce94
--- /dev/null
+++ b/B/dos16/mc_qc.bat
@@ -0,0 +1,52 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Microsoft C/C++ (QuickC)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=cl -nologo -qc -AL
+set CF=-O -Gf -W3 %CFI%
+set LF=/map
+
+@REM %CC% %CF% -c src\*.c
+for %%f in (src\*.c) do %CC% %CF% -c %%f
+@if errorlevel 1 goto error
+lib /nologo %BLIB% @b\dos16\bc.rsp;
+@if errorlevel 1 goto error
+
+%CC% %CF% -c examples\dict.c
+@if errorlevel 1 goto error
+link %LF% dict.obj,,,%BLIB%;
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\lzopack.c
+@if errorlevel 1 goto error
+link %LF% lzopack.obj,,,%BLIB%;
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp.c
+@if errorlevel 1 goto error
+link %LF% precomp.obj,,,%BLIB%;
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp2.c
+@if errorlevel 1 goto error
+link %LF% precomp2.obj,,,%BLIB%;
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\simple.c
+@if errorlevel 1 goto error
+link %LF% simple.obj,,,%BLIB%;
+@if errorlevel 1 goto error
+
+%CC% %CF% -c lzotest\lzotest.c
+@if errorlevel 1 goto error
+link %LF% lzotest.obj,,,%BLIB%;
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/qc.bat b/B/dos16/qc.bat
new file mode 100644
index 0000000..82734fd
--- /dev/null
+++ b/B/dos16/qc.bat
@@ -0,0 +1,40 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Microsoft QuickC
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=qcl -nologo -AL
+set CF=-O -Gf -W3 %CFI%
+set LF=%BLIB% -Fm
+
+@REM %CC% %CF% -c src\*.c
+for %%f in (src\*.c) do %CC% %CF% -c %%f
+@if errorlevel 1 goto error
+lib /nologo %BLIB% @b\dos16\bc.rsp;
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/sc.bat b/B/dos16/sc.bat
new file mode 100644
index 0000000..056c04a
--- /dev/null
+++ b/B/dos16/sc.bat
@@ -0,0 +1,53 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Symantec C/C++
+@echo //
+@echo // NOTE: LZO breaks the optimizer, so we disable optimizations
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=sc -ml
+set CF=-w- %CFI%
+set LF=%BLIB%
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+lib %BLIB% /b /c /n /noi @b\dos16\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -c examples\dict.c
+@if errorlevel 1 goto error
+%CC% dict.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\lzopack.c
+@if errorlevel 1 goto error
+%CC% lzopack.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp.c
+@if errorlevel 1 goto error
+%CC% precomp.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp2.c
+@if errorlevel 1 goto error
+%CC% precomp2.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\simple.c
+@if errorlevel 1 goto error
+%CC% simple.obj %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -c lzotest\lzotest.c
+@if errorlevel 1 goto error
+%CC% lzotest.obj %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/tc.bat b/B/dos16/tc.bat
new file mode 100644
index 0000000..a3c3277
--- /dev/null
+++ b/B/dos16/tc.bat
@@ -0,0 +1,39 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Turbo C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=tcc -ml -f-
+set CF=-O -G -w -w-rch -w-sig %CFI% -Iinclude\lzo
+set LF=%BLIB%
+
+%CC% %CF% -Isrc -c src\*.c
+@if errorlevel 1 goto error
+tlib %BLIB% @b\dos16\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -f -Iexamples examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -f -Ilzotest lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/vc.bat b/B/dos16/vc.bat
new file mode 100644
index 0000000..b061785
--- /dev/null
+++ b/B/dos16/vc.bat
@@ -0,0 +1,39 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Microsoft Visual C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=cl -nologo -AL
+set CF=-O -Gf -Gs -Gy -W3 %CFI%
+set LF=%BLIB% -Fm
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+lib /nologo %BLIB% @b\dos16\bc.rsp;
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/vc_qc.bat b/B/dos16/vc_qc.bat
new file mode 100644
index 0000000..329b092
--- /dev/null
+++ b/B/dos16/vc_qc.bat
@@ -0,0 +1,39 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Microsoft Visual C/C++ (QuickC)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=cl -nologo -qc -AL
+set CF=-O -Gf -Gy -W3 %CFI%
+set LF=%BLIB% -Fm
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+lib /nologo %BLIB% @b\dos16\bc.rsp;
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/wc.bat b/B/dos16/wc.bat
new file mode 100644
index 0000000..c92135c
--- /dev/null
+++ b/B/dos16/wc.bat
@@ -0,0 +1,39 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 16-bit
+@echo // Watcom C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=wcl -zq -ml -bt#dos -l#dos
+set CF=-ox %CFI%
+set LF=%BLIB%
+
+%CC% %CF% -c src\*.c
+@if errorlevel 1 goto error
+wlib -q -b -n -t %BLIB% @b\dos16\wc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos16/wc.rsp b/B/dos16/wc.rsp
new file mode 100644
index 0000000..c8e1c9f
--- /dev/null
+++ b/B/dos16/wc.rsp
@@ -0,0 +1,67 @@
++'lzo1.obj'
++'lzo1_99.obj'
++'lzo1a.obj'
++'lzo1a_99.obj'
++'lzo1b_1.obj'
++'lzo1b_2.obj'
++'lzo1b_3.obj'
++'lzo1b_4.obj'
++'lzo1b_5.obj'
++'lzo1b_6.obj'
++'lzo1b_7.obj'
++'lzo1b_8.obj'
++'lzo1b_9.obj'
++'lzo1b_99.obj'
++'lzo1b_9x.obj'
++'lzo1b_cc.obj'
++'lzo1b_d1.obj'
++'lzo1b_d2.obj'
++'lzo1b_rr.obj'
++'lzo1b_xx.obj'
++'lzo1c_1.obj'
++'lzo1c_2.obj'
++'lzo1c_3.obj'
++'lzo1c_4.obj'
++'lzo1c_5.obj'
++'lzo1c_6.obj'
++'lzo1c_7.obj'
++'lzo1c_8.obj'
++'lzo1c_9.obj'
++'lzo1c_99.obj'
++'lzo1c_9x.obj'
++'lzo1c_cc.obj'
++'lzo1c_d1.obj'
++'lzo1c_d2.obj'
++'lzo1c_rr.obj'
++'lzo1c_xx.obj'
++'lzo1f_1.obj'
++'lzo1f_9x.obj'
++'lzo1f_d1.obj'
++'lzo1f_d2.obj'
++'lzo1x_1.obj'
++'lzo1x_1k.obj'
++'lzo1x_1l.obj'
++'lzo1x_1o.obj'
++'lzo1x_9x.obj'
++'lzo1x_d1.obj'
++'lzo1x_d2.obj'
++'lzo1x_d3.obj'
++'lzo1x_o.obj'
++'lzo1y_1.obj'
++'lzo1y_9x.obj'
++'lzo1y_d1.obj'
++'lzo1y_d2.obj'
++'lzo1y_d3.obj'
++'lzo1y_o.obj'
++'lzo1z_9x.obj'
++'lzo1z_d1.obj'
++'lzo1z_d2.obj'
++'lzo1z_d3.obj'
++'lzo2a_9x.obj'
++'lzo2a_d1.obj'
++'lzo2a_d2.obj'
++'lzo_crc.obj'
++'lzo_init.obj'
++'lzo_ptr.obj'
++'lzo_str.obj'
++'lzo_util.obj'
diff --git a/B/dos32/bc_pp.bat b/B/dos32/bc_pp.bat
new file mode 100644
index 0000000..7cd86dd
--- /dev/null
+++ b/B/dos32/bc_pp.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // Borland C/C++ + Borland PowerPack 1.0 (DPMI32)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=bcc32 -WX
+set CF=-O2 -w -w-aus %CFI% -Iinclude\lzo %CFASM%
+set LF=%BLIB%
+
+%CC% %CF% -Isrc -c @b\src.rsp
+@if errorlevel 1 goto error
+tlib %BLIB% @b\win32\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -ls -Iexamples examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -ls -Iexamples examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -ls -Iexamples examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -ls -Iexamples examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -ls -Iexamples examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -ls -Ilzotest lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -ls -Iminilzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/dj2.bat b/B/dos32/dj2.bat
new file mode 100644
index 0000000..ac49399
--- /dev/null
+++ b/B/dos32/dj2.bat
@@ -0,0 +1,45 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // djgpp2 + gcc
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set BLIB=lib%BNAME%.a
+set CC=gcc
+set CF=@b/dos32/dj2.opt %CFI% %CFASM%
+set LF=%BLIB% -s
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+%CC% -x assembler-with-cpp -c asm/i386/src_gas/*.S
+@if errorlevel 1 goto error
+ar rcs %BLIB% @b/win32/cygwin.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -o dict.exe examples/dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o lzopack.exe examples/lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o precomp.exe examples/precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o precomp2.exe examples/precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o simple.exe examples/simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -o lzotest.exe lzotest/lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -s -Iinclude/lzo -o testmini.exe minilzo/testmini.c minilzo/minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/dj2.opt b/B/dos32/dj2.opt
new file mode 100644
index 0000000..9cd02cd
--- /dev/null
+++ b/B/dos32/dj2.opt
@@ -0,0 +1,6 @@
+-O2
+-fomit-frame-pointer
+-Wall
+-Wcast-align
+-Wcast-qual
+-Wwrite-strings
diff --git a/B/dos32/dm.bat b/B/dos32/dm.bat
new file mode 100644
index 0000000..0449668
--- /dev/null
+++ b/B/dos32/dm.bat
@@ -0,0 +1,43 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // Digital Mars C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=dmc -mx
+set CF=-o -w- %CFI% %CFASM%
+set LF=%BLIB% x32.lib
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+lib %BLIB% /b /c /n /noi @b\win32\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+set LF=x32.lib
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/emx.bat b/B/dos32/emx.bat
new file mode 100644
index 0000000..ceb97e4
--- /dev/null
+++ b/B/dos32/emx.bat
@@ -0,0 +1,45 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // emx + gcc
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set BLIB=%BNAME%.a
+set CC=gcc
+set CF=@b/dos32/dj2.opt %CFI% %CFASM%
+set LF=%BLIB% -s
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+%CC% -x assembler-with-cpp -c asm/i386/src_gas/*.S
+@if errorlevel 1 goto error
+ar rcs %BLIB% @b/win32/cygwin.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -o dict.exe examples/dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o lzopack.exe examples/lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o precomp.exe examples/precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o precomp2.exe examples/precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o simple.exe examples/simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -o lzotest.exe lzotest/lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude/lzo -o testmini.exe minilzo/testmini.c minilzo/minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/highc.bat b/B/dos32/highc.bat
new file mode 100644
index 0000000..e3e28a7
--- /dev/null
+++ b/B/dos32/highc.bat
@@ -0,0 +1,39 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // MetaWare High C/C++ (using Pharlap DOS extender)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=hc386
+set CF=-O3 -w4 %CFI% %CFASM%
+set LF=%BLIB%
+
+%CC% %CF% -w1 -c src\*.c
+@if errorlevel 1 goto error
+386lib %BLIB% -nobanner @b\dos32\highc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/highc.rsp b/B/dos32/highc.rsp
new file mode 100644
index 0000000..ef2dc7f
--- /dev/null
+++ b/B/dos32/highc.rsp
@@ -0,0 +1,79 @@
+-create lzo1.obj
+-create lzo1_99.obj
+-create lzo1a.obj
+-create lzo1a_99.obj
+-create lzo1b_1.obj
+-create lzo1b_2.obj
+-create lzo1b_3.obj
+-create lzo1b_4.obj
+-create lzo1b_5.obj
+-create lzo1b_6.obj
+-create lzo1b_7.obj
+-create lzo1b_8.obj
+-create lzo1b_9.obj
+-create lzo1b_99.obj
+-create lzo1b_9x.obj
+-create lzo1b_cc.obj
+-create lzo1b_d1.obj
+-create lzo1b_d2.obj
+-create lzo1b_rr.obj
+-create lzo1b_xx.obj
+-create lzo1c_1.obj
+-create lzo1c_2.obj
+-create lzo1c_3.obj
+-create lzo1c_4.obj
+-create lzo1c_5.obj
+-create lzo1c_6.obj
+-create lzo1c_7.obj
+-create lzo1c_8.obj
+-create lzo1c_9.obj
+-create lzo1c_99.obj
+-create lzo1c_9x.obj
+-create lzo1c_cc.obj
+-create lzo1c_d1.obj
+-create lzo1c_d2.obj
+-create lzo1c_rr.obj
+-create lzo1c_xx.obj
+-create lzo1f_1.obj
+-create lzo1f_9x.obj
+-create lzo1f_d1.obj
+-create lzo1f_d2.obj
+-create lzo1x_1.obj
+-create lzo1x_1k.obj
+-create lzo1x_1l.obj
+-create lzo1x_1o.obj
+-create lzo1x_9x.obj
+-create lzo1x_d1.obj
+-create lzo1x_d2.obj
+-create lzo1x_d3.obj
+-create lzo1x_o.obj
+-create lzo1y_1.obj
+-create lzo1y_9x.obj
+-create lzo1y_d1.obj
+-create lzo1y_d2.obj
+-create lzo1y_d3.obj
+-create lzo1y_o.obj
+-create lzo1z_9x.obj
+-create lzo1z_d1.obj
+-create lzo1z_d2.obj
+-create lzo1z_d3.obj
+-create lzo2a_9x.obj
+-create lzo2a_d1.obj
+-create lzo2a_d2.obj
+-create lzo_crc.obj
+-create lzo_init.obj
+-create lzo_ptr.obj
+-create lzo_str.obj
+-create lzo_util.obj
+-create asm\i386\obj\omf32\lzo1c_s1.obj
+-create asm\i386\obj\omf32\lzo1c_s2.obj
+-create asm\i386\obj\omf32\lzo1f_f1.obj
+-create asm\i386\obj\omf32\lzo1f_f2.obj
+-create asm\i386\obj\omf32\lzo1x_f1.obj
+-create asm\i386\obj\omf32\lzo1x_f2.obj
+-create asm\i386\obj\omf32\lzo1x_s1.obj
+-create asm\i386\obj\omf32\lzo1x_s2.obj
+-create asm\i386\obj\omf32\lzo1y_f1.obj
+-create asm\i386\obj\omf32\lzo1y_f2.obj
+-create asm\i386\obj\omf32\lzo1y_s1.obj
+-create asm\i386\obj\omf32\lzo1y_s2.obj
diff --git a/B/dos32/ndp.bat b/B/dos32/ndp.bat
new file mode 100644
index 0000000..64b04ed
--- /dev/null
+++ b/B/dos32/ndp.bat
@@ -0,0 +1,40 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // Microway NDP C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=mx486
+set CF=-ansi -on %CFI%
+set LF=%BLIB% -bind -map
+
+@REM %CC% %CF% -Isrc -c src\*.c
+for %%f in (src\*.c) do %CC% %CF% -Isrc -c %%f
+@if errorlevel 1 goto error
+ndplib %BLIB% @b\dos32\ndp.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iexamples examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Dconst= -Ilzotest lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/ndp.rsp b/B/dos32/ndp.rsp
new file mode 100644
index 0000000..c62b19e
--- /dev/null
+++ b/B/dos32/ndp.rsp
@@ -0,0 +1,67 @@
+-add lzo1.obj
+-add lzo1_99.obj
+-add lzo1a.obj
+-add lzo1a_99.obj
+-add lzo1b_1.obj
+-add lzo1b_2.obj
+-add lzo1b_3.obj
+-add lzo1b_4.obj
+-add lzo1b_5.obj
+-add lzo1b_6.obj
+-add lzo1b_7.obj
+-add lzo1b_8.obj
+-add lzo1b_9.obj
+-add lzo1b_99.obj
+-add lzo1b_9x.obj
+-add lzo1b_cc.obj
+-add lzo1b_d1.obj
+-add lzo1b_d2.obj
+-add lzo1b_rr.obj
+-add lzo1b_xx.obj
+-add lzo1c_1.obj
+-add lzo1c_2.obj
+-add lzo1c_3.obj
+-add lzo1c_4.obj
+-add lzo1c_5.obj
+-add lzo1c_6.obj
+-add lzo1c_7.obj
+-add lzo1c_8.obj
+-add lzo1c_9.obj
+-add lzo1c_99.obj
+-add lzo1c_9x.obj
+-add lzo1c_cc.obj
+-add lzo1c_d1.obj
+-add lzo1c_d2.obj
+-add lzo1c_rr.obj
+-add lzo1c_xx.obj
+-add lzo1f_1.obj
+-add lzo1f_9x.obj
+-add lzo1f_d1.obj
+-add lzo1f_d2.obj
+-add lzo1x_1.obj
+-add lzo1x_1k.obj
+-add lzo1x_1l.obj
+-add lzo1x_1o.obj
+-add lzo1x_9x.obj
+-add lzo1x_d1.obj
+-add lzo1x_d2.obj
+-add lzo1x_d3.obj
+-add lzo1x_o.obj
+-add lzo1y_1.obj
+-add lzo1y_9x.obj
+-add lzo1y_d1.obj
+-add lzo1y_d2.obj
+-add lzo1y_d3.obj
+-add lzo1y_o.obj
+-add lzo1z_9x.obj
+-add lzo1z_d1.obj
+-add lzo1z_d2.obj
+-add lzo1z_d3.obj
+-add lzo2a_9x.obj
+-add lzo2a_d1.obj
+-add lzo2a_d2.obj
+-add lzo_crc.obj
+-add lzo_init.obj
+-add lzo_ptr.obj
+-add lzo_str.obj
+-add lzo_util.obj
diff --git a/B/dos32/sc.bat b/B/dos32/sc.bat
new file mode 100644
index 0000000..1b23333
--- /dev/null
+++ b/B/dos32/sc.bat
@@ -0,0 +1,51 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // Symantec C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=sc -mx
+set CF=-o -w- %CFI% %CFASM%
+set LF=%BLIB%
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+lib %BLIB% /b /c /n /noi @b\win32\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -c examples\dict.c
+@if errorlevel 1 goto error
+%CC% dict.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\lzopack.c
+@if errorlevel 1 goto error
+%CC% lzopack.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp.c
+@if errorlevel 1 goto error
+%CC% precomp.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp2.c
+@if errorlevel 1 goto error
+%CC% precomp2.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\simple.c
+@if errorlevel 1 goto error
+%CC% simple.obj %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -c lzotest\lzotest.c
+@if errorlevel 1 goto error
+%CC% lzotest.obj %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/wc.bat b/B/dos32/wc.bat
new file mode 100644
index 0000000..bfa776d
--- /dev/null
+++ b/B/dos32/wc.bat
@@ -0,0 +1,39 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // Watcom C/C++ (using DOS/4G extender)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=wcl386 -zq -mf -5r -bt#dos -l#dos4g
+set CF=-ox -zc %CFI% %CFASM%
+set LF=%BLIB%
+
+%CC% %CF% -c src\*.c
+@if errorlevel 1 goto error
+wlib -q -b -n -t %BLIB% @b\win32\wc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/dos32/zc.bat b/B/dos32/zc.bat
new file mode 100644
index 0000000..0da7794
--- /dev/null
+++ b/B/dos32/zc.bat
@@ -0,0 +1,51 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // DOS 32-bit
+@echo // Zortech C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=ztc -b -v0 -mx
+set CF=-o -w- -r %CFI% %CFASM%
+set LF=%BLIB%
+
+%CC% %CF% -Isrc -c @b\src.rsp
+@if errorlevel 1 goto error
+zorlib %BLIB% @b\win32\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -c examples\dict.c
+@if errorlevel 1 goto error
+%CC% dict.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\lzopack.c
+@if errorlevel 1 goto error
+%CC% lzopack.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp.c
+@if errorlevel 1 goto error
+%CC% precomp.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp2.c
+@if errorlevel 1 goto error
+%CC% precomp2.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\simple.c
+@if errorlevel 1 goto error
+%CC% simple.obj %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -c lzotest\lzotest.c
+@if errorlevel 1 goto error
+%CC% lzotest.obj %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/generic/Makefile b/B/generic/Makefile
new file mode 100644
index 0000000..acddb04
--- /dev/null
+++ b/B/generic/Makefile
@@ -0,0 +1,91 @@
+# Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+#
+# this is modelled after build.sh; needs GNU make 3.80 or better
+
+SHELL = /bin/sh
+
+##
+## setup flags
+##
+
+##top_srcdir ?= ../..
+top_srcdir ?= $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))../..
+AR ?= ar
+CC ?= cc
+CFLAGS ?= -O
+
+CFI = -I$(top_srcdir)/include -I$(top_srcdir) -I$(top_srcdir)/src
+BNAME = lzo2
+BLIB = lib$(BNAME).a
+
+CF = $(CPPFLAGS) $(CFI) $(CFLAGS)
+LF = $(LDFLAGS) $(LZO_EXTRA_LDFLAGS)
+LL = $(BLIB) $(LIBS) $(LZO_EXTRA_LIBS)
+
+
+##
+## setup files
+##
+
+__map = $(foreach __map_v,$(2),$(call $(1),$(__map_v)))
+__object_filename = $(addsuffix .o,$(basename $(notdir $(1))))
+
+BLIB_SOURCES := $(wildcard $(top_srcdir)/src/*.c)
+BLIB_SOURCES += $(LZO_EXTRA_SOURCES)
+BLIB_OBJECTS := $(call __map,__object_filename,$(BLIB_SOURCES))
+PROGRAMS = dict.out lzopack.out precomp.out precomp2.out simple.out lzotest.out
+
+
+##
+## rules
+##
+
+all.targets ?= $(BLIB) $(PROGRAMS) testmini.out
+all: $(all.targets)
+
+clean:
+ rm -f *.d *.o $(BLIB) $(PROGRAMS) testmini.out
+
+$(BLIB): $(BLIB_OBJECTS) $(LZO_EXTRA_OBJECTS)
+ rm -f $@
+ $(AR) rcs $@ $^
+
+# dynamically construct object rules
+define BLIB_OBJECT_template
+ $(call __object_filename,$(1)) : $(1) ; $$(CC) $$(CF) $$(LZO_EXTRA_CPPFLAGS) $$(LZO_EXTRA_CFLAGS) -c $$<
+endef
+$(foreach s,$(BLIB_SOURCES),$(eval $(call BLIB_OBJECT_template,$(s))))
+
+dict.out: $(top_srcdir)/examples/dict.c
+ $(CC) $(CF) $(LF) -o $@ $< $(LL)
+lzopack.out: $(top_srcdir)/examples/lzopack.c
+ $(CC) $(CF) $(LF) -o $@ $< $(LL)
+precomp.out: $(top_srcdir)/examples/precomp.c
+ $(CC) $(CF) $(LF) -o $@ $< $(LL)
+precomp2.out: $(top_srcdir)/examples/precomp2.c
+ $(CC) $(CF) $(LF) -o $@ $< $(LL)
+simple.out: $(top_srcdir)/examples/simple.c
+ $(CC) $(CF) $(LF) -o $@ $< $(LL)
+lzotest.out: $(top_srcdir)/lzotest/lzotest.c
+ $(CC) $(CF) $(LF) -o $@ $< $(LL)
+
+testmini.out: $(top_srcdir)/minilzo/testmini.c $(top_srcdir)/minilzo/minilzo.c
+ $(CC) $(CF) $(LF) -I$(top_srcdir)/include/lzo -o $@ $^ $(LIBS)
+
+
+# dependencies
+$(PROGRAMS): $(BLIB)
+# object dependencies are generated via -MMD
+-include *.d
+
+
+# debug
+show_vars:
+ @echo "BLIB_SOURCES = $(BLIB_SOURCES)"
+ @echo "BLIB_OBJECTS = $(BLIB_OBJECTS)"
+ @echo "PROGRAMS = $(PROGRAMS)"
+ @echo "LZO_EXTRA_SOURCES = $(LZO_EXTRA_SOURCES)"
+ @echo "LZO_EXTRA_OBJECTS = $(LZO_EXTRA_OBJECTS)"
+
+.PHONY: all clean show_vars
+
diff --git a/B/generic/build.sh b/B/generic/build.sh
new file mode 100755
index 0000000..1bf5585
--- /dev/null
+++ b/B/generic/build.sh
@@ -0,0 +1,69 @@
+#! /bin/sh
+# vi:ts=4:et
+set -e
+echo "// Copyright (C) 1996-2011 Markus F.X.J. Oberhumer"
+echo "//"
+echo "// Generic Posix/Unix system"
+echo "// Generic C compiler"
+
+test "X${top_srcdir}" = X && top_srcdir=`echo "$0" | sed 's,[^/]*$,,'`../..
+
+test "X${AR}" = X && AR="ar"
+test "X${CC}" = X && CC="cc"
+test "X${CFLAGS+set}" = Xset || CFLAGS="-O"
+# CPPFLAGS, LDFLAGS, LIBS
+# LZO_EXTRA_CPPFLAGS, LZO_EXTRA_CFLAGS, LZO_EXTRA_LDFLAGS
+# LZO_EXTRA_SOURCES, LZO_EXTRA_OBJECTS, LZO_EXTRA_LIBS
+
+CFI="-I${top_srcdir}/include -I${top_srcdir} -I${top_srcdir}/src"
+BNAME=lzo2
+BLIB=lib${BNAME}.a
+
+CF="$CPPFLAGS $CFI $CFLAGS"
+# info: we restrict ourselves to pure ANSI C library functions for the examples
+CF="-DLZO_LIBC_ISOC90=1 $CF"
+# info: we do not use _any_ external functions in freestanding mode
+test -z "$LZO_CFG_FREESTANDING" || CF="-DLZO_CFG_FREESTANDING=1 $CF"
+LF="$LDFLAGS $LZO_EXTRA_LDFLAGS"
+LL="$BLIB $LIBS $LZO_EXTRA_LIBS"
+
+. $top_srcdir/B/generic/clean.sh
+
+for f in $top_srcdir/src/*.c $LZO_EXTRA_SOURCES; do
+ echo $CC $CF $LZO_EXTRA_CPPFLAGS $LZO_EXTRA_CFLAGS -c $f
+ $CC $CF $LZO_EXTRA_CPPFLAGS $LZO_EXTRA_CFLAGS -c $f
+done
+
+echo $AR rcs $BLIB *.o $LZO_EXTRA_OBJECTS
+ $AR rcs $BLIB *.o $LZO_EXTRA_OBJECTS
+
+
+if test -n "$LZO_CFG_FREESTANDING"; then
+
+echo "//"
+echo "// Building $BLIB in freestanding mode was successful. All done."
+echo "// Now try 'nm --extern-only $BLIB'"
+
+else
+
+for f in dict lzopack precomp precomp2 simple; do
+ echo $CC $CF $LF -o $f.out $top_srcdir/examples/$f.c $LL
+ $CC $CF $LF -o $f.out $top_srcdir/examples/$f.c $LL
+done
+echo $CC $CF $LF -o lzotest.out $top_srcdir/lzotest/lzotest.c $LL
+ $CC $CF $LF -o lzotest.out $top_srcdir/lzotest/lzotest.c $LL
+
+for f in minilzo.c testmini.c; do
+ XF="-I$top_srcdir/include/lzo $CF $LZO_EXTRA_CPPFLAGS $LZO_EXTRA_CFLAGS"
+ echo $CC $XF -c $top_srcdir/minilzo/$f
+ $CC $XF -c $top_srcdir/minilzo/$f
+done
+echo $CC $CF $LF -o testmini.out testmini.o minilzo.o $LIBS $LZO_EXTRA_LIBS
+ $CC $CF $LF -o testmini.out testmini.o minilzo.o $LIBS $LZO_EXTRA_LIBS
+
+
+echo "//"
+echo "// Building LZO was successful. All done."
+
+fi
+true
diff --git a/B/generic/build_freestanding.sh b/B/generic/build_freestanding.sh
new file mode 100755
index 0000000..9473dd6
--- /dev/null
+++ b/B/generic/build_freestanding.sh
@@ -0,0 +1,8 @@
+#! /bin/sh
+# vi:ts=4:et
+
+test "X${top_srcdir}" = X && top_srcdir=`echo "$0" | sed 's,[^/]*$,,'`../..
+
+LZO_CFG_FREESTANDING=1
+
+. $top_srcdir/B/generic/build.sh
diff --git a/B/generic/build_gcc.sh b/B/generic/build_gcc.sh
new file mode 100755
index 0000000..179d8c0
--- /dev/null
+++ b/B/generic/build_gcc.sh
@@ -0,0 +1,25 @@
+#! /bin/sh
+# vi:ts=4:et
+set -e
+echo "// Using GNU C compiler."
+echo "//"
+
+test "X${top_srcdir}" = X && top_srcdir=`echo "$0" | sed 's,[^/]*$,,'`../..
+UNAME_MACHINE=unknown
+
+CC="gcc -fPIC"
+CC="gcc -static"
+CC="gcc"
+CFLAGS="-Wall -O2 -fomit-frame-pointer"
+
+# delete the next line to disable assembler support
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+case $UNAME_MACHINE in
+ i[34567]86)
+ CC="$CC -m32"
+ CPPFLAGS="-DLZO_USE_ASM"
+ LZO_EXTRA_SOURCES=$top_srcdir/asm/i386/src_gas/*.S
+ ;;
+esac
+
+. $top_srcdir/B/generic/build.sh
diff --git a/B/generic/clean.sh b/B/generic/clean.sh
new file mode 100755
index 0000000..11c2395
--- /dev/null
+++ b/B/generic/clean.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+# vi:ts=4:et
+# Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+
+rm -f *.o liblzo2.a dict.out lzopack.out precomp.out precomp2.out simple.out lzotest.out testmini.out
+
+true
diff --git a/B/os2/emx.bat b/B/os2/emx.bat
new file mode 100644
index 0000000..01d7dfa
--- /dev/null
+++ b/B/os2/emx.bat
@@ -0,0 +1,45 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // OS/2 32-bit
+@echo // emx + gcc
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set BLIB=%BNAME%.a
+set CC=gcc
+set CF=@b/dos32/dj2.opt %CFI% %CFASM%
+set LF=%BLIB% -s
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+%CC% -x assembler-with-cpp -c asm/i386/src_gas/*.S
+@if errorlevel 1 goto error
+ar rcs %BLIB% @b/win32/cygwin.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -o dict.exe examples/dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o lzopack.exe examples/lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o precomp.exe examples/precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o precomp2.exe examples/precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o simple.exe examples/simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -o lzotest.exe lzotest/lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude/lzo -o testmini.exe minilzo/testmini.c minilzo/minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/os2/wc.bat b/B/os2/wc.bat
new file mode 100644
index 0000000..79e2082
--- /dev/null
+++ b/B/os2/wc.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // OS/2 32-bit
+@echo // Watcom C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=wcl386 -zq -mf -5r -bt#os2 -l#os2v2
+set CF=-ox -zc %CFI% %CFASM%
+set LF=%BLIB%
+
+%CC% %CF% -c src\*.c
+@if errorlevel 1 goto error
+wlib -q -b -n -t %BLIB% @b\win32\wc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/os2/zc.bat b/B/os2/zc.bat
new file mode 100644
index 0000000..47a6d51
--- /dev/null
+++ b/B/os2/zc.bat
@@ -0,0 +1,51 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // OS/2 32-bit
+@echo // Zortech C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=ztc -b -v0 -mf
+set CF=-o -w- -r %CFI% %CFASM%
+set LF=%BLIB%
+
+%CC% %CF% -Isrc -c @b\src.rsp
+@if errorlevel 1 goto error
+zorlib %BLIB% @b\win32\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -c examples\dict.c
+@if errorlevel 1 goto error
+%CC% dict.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\lzopack.c
+@if errorlevel 1 goto error
+%CC% lzopack.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp.c
+@if errorlevel 1 goto error
+%CC% precomp.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp2.c
+@if errorlevel 1 goto error
+%CC% precomp2.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\simple.c
+@if errorlevel 1 goto error
+%CC% simple.obj %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -c lzotest\lzotest.c
+@if errorlevel 1 goto error
+%CC% lzotest.obj %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/os2_16/mc.bat b/B/os2_16/mc.bat
new file mode 100644
index 0000000..95742d4
--- /dev/null
+++ b/B/os2_16/mc.bat
@@ -0,0 +1,43 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // OS/2 16-bit
+@echo // Microsoft C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=cl -nologo -AL -G2
+set CF=-D__OS2__ -O -Gf -Gs -W3 %CFI%
+set LF=%BLIB% -Lp -Fm /link /stack:8096
+
+@REM %CC% %CF% -c src\*.c
+for %%f in (src\*.c) do %CC% %CF% -c %%f
+@if errorlevel 1 goto error
+lib /nologo %BLIB% @b\dos16\bc.rsp;
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/os2_16/wc.bat b/B/os2_16/wc.bat
new file mode 100644
index 0000000..bbe1743
--- /dev/null
+++ b/B/os2_16/wc.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // OS/2 16-bit
+@echo // Watcom C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=wcl -zq -ml -2 -bt#os2 -l#os2
+set CF=-ox %CFI%
+set LF=%BLIB%
+
+%CC% %CF% -c src\*.c
+@if errorlevel 1 goto error
+wlib -q -b -n -t %BLIB% @b\dos16\wc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/prepare.bat b/B/prepare.bat
new file mode 100644
index 0000000..34bac19
--- /dev/null
+++ b/B/prepare.bat
@@ -0,0 +1,10 @@
+@call b\unset.bat
+@call b\clean.bat
+
+@set CFI=-Iinclude -I. -Isrc
+@set CFASM=-DLZO_USE_ASM
+@set BNAME=lzo2
+@set BLIB=lzo2.lib
+@set BDLL=lzo2.dll
+
+@echo Compiling, please be patient...
diff --git a/B/src.rsp b/B/src.rsp
new file mode 100644
index 0000000..2a1dbce
--- /dev/null
+++ b/B/src.rsp
@@ -0,0 +1,67 @@
+src/lzo1.c
+src/lzo1_99.c
+src/lzo1a.c
+src/lzo1a_99.c
+src/lzo1b_1.c
+src/lzo1b_2.c
+src/lzo1b_3.c
+src/lzo1b_4.c
+src/lzo1b_5.c
+src/lzo1b_6.c
+src/lzo1b_7.c
+src/lzo1b_8.c
+src/lzo1b_9.c
+src/lzo1b_99.c
+src/lzo1b_9x.c
+src/lzo1b_cc.c
+src/lzo1b_d1.c
+src/lzo1b_d2.c
+src/lzo1b_rr.c
+src/lzo1b_xx.c
+src/lzo1c_1.c
+src/lzo1c_2.c
+src/lzo1c_3.c
+src/lzo1c_4.c
+src/lzo1c_5.c
+src/lzo1c_6.c
+src/lzo1c_7.c
+src/lzo1c_8.c
+src/lzo1c_9.c
+src/lzo1c_99.c
+src/lzo1c_9x.c
+src/lzo1c_cc.c
+src/lzo1c_d1.c
+src/lzo1c_d2.c
+src/lzo1c_rr.c
+src/lzo1c_xx.c
+src/lzo1f_1.c
+src/lzo1f_9x.c
+src/lzo1f_d1.c
+src/lzo1f_d2.c
+src/lzo1x_1.c
+src/lzo1x_1k.c
+src/lzo1x_1l.c
+src/lzo1x_1o.c
+src/lzo1x_9x.c
+src/lzo1x_d1.c
+src/lzo1x_d2.c
+src/lzo1x_d3.c
+src/lzo1x_o.c
+src/lzo1y_1.c
+src/lzo1y_9x.c
+src/lzo1y_d1.c
+src/lzo1y_d2.c
+src/lzo1y_d3.c
+src/lzo1y_o.c
+src/lzo1z_9x.c
+src/lzo1z_d1.c
+src/lzo1z_d2.c
+src/lzo1z_d3.c
+src/lzo2a_9x.c
+src/lzo2a_d1.c
+src/lzo2a_d2.c
+src/lzo_crc.c
+src/lzo_init.c
+src/lzo_ptr.c
+src/lzo_str.c
+src/lzo_util.c
diff --git a/B/unset.bat b/B/unset.bat
new file mode 100644
index 0000000..21672dd
--- /dev/null
+++ b/B/unset.bat
@@ -0,0 +1,10 @@
+@set CC=
+@set CF=
+@set CFI=
+@set CFX=
+@set CFASM=
+@set LF=
+@set BNAME=
+@set BLIB=
+@set BDLL=
+@set BECHO=
diff --git a/B/win16/bc.bat b/B/win16/bc.bat
new file mode 100644
index 0000000..f252ada
--- /dev/null
+++ b/B/win16/bc.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 16-bit
+@echo // Borland C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=bcc -ml -2 -tW -h
+set CF=-O1 -d -w -w-rch -w-sig %CFI% -Iinclude\lzo
+set LF=%BLIB%
+
+%CC% %CF% -Isrc -c @b\src.rsp
+@if errorlevel 1 goto error
+tlib %BLIB% @b\dos16\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iexamples examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -Iexamples examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -ls -Ilzotest lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -ls -Iminilzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win16/dm.bat b/B/win16/dm.bat
new file mode 100644
index 0000000..8009a99
--- /dev/null
+++ b/B/win16/dm.bat
@@ -0,0 +1,43 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 16-bit
+@echo // Digital Mars C/C++ (using WINIO)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=dmc -ml -2 -W
+set CF=-o -w- %CFI%
+set LF=%BLIB% libw.lib commdlg.lib lwindos.lib /L/map/stack:8096
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+lib %BLIB% /b /c /n /noi @b\dos16\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+set LF=libw.lib commdlg.lib lwindos.lib /L/map/stack:8096
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win16/mc.bat b/B/win16/mc.bat
new file mode 100644
index 0000000..4404e42
--- /dev/null
+++ b/B/win16/mc.bat
@@ -0,0 +1,56 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 16-bit
+@echo // Microsoft C/C++ (using QuickWin)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=cl -nologo -AL -G2 -Mq
+set CF=-O -Gf -W3 %CFI%
+set LF=/seg:256 /stack:8096 /nod:llibce /map
+
+%CC% %CF% -c src\*.c
+@if errorlevel 1 goto error
+lib /nologo %BLIB% @b\dos16\bc.rsp;
+@if errorlevel 1 goto error
+
+%CC% %CF% -c examples\dict.c
+@if errorlevel 1 goto error
+link %LF% dict.obj,,,llibcewq.lib libw.lib %BLIB%;
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\lzopack.c
+@if errorlevel 1 goto error
+link %LF% lzopack.obj,,,llibcewq.lib libw.lib %BLIB%;
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp.c
+@if errorlevel 1 goto error
+link %LF% precomp.obj,,,llibcewq.lib libw.lib %BLIB%;
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp2.c
+@if errorlevel 1 goto error
+link %LF% precomp2.obj,,,llibcewq.lib libw.lib %BLIB%;
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\simple.c
+@if errorlevel 1 goto error
+link %LF% simple.obj,,,llibcewq.lib libw.lib %BLIB%;
+@if errorlevel 1 goto error
+
+%CC% %CF% -c lzotest\lzotest.c
+@if errorlevel 1 goto error
+link %LF% lzotest.obj,,,llibcewq.lib libw.lib %BLIB%;
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo -c minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+link %LF% testmini.obj minilzo.obj,,,llibcewq.lib libw.lib;
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win16/sc.bat b/B/win16/sc.bat
new file mode 100644
index 0000000..0dab9e3
--- /dev/null
+++ b/B/win16/sc.bat
@@ -0,0 +1,53 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 16-bit
+@echo // Symantec C/C++ (using WINIO)
+@echo //
+@echo // NOTE: LZO breaks the optimizer, so we disable optimizations
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=sc -ml -2 -W
+set CF=-w- %CFI%
+set LF=%BLIB% libw.lib commdlg.lib lwindos.lib /L/map/stack:8096
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+lib %BLIB% /b /c /n /noi @b\dos16\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -c examples\dict.c
+@if errorlevel 1 goto error
+%CC% dict.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\lzopack.c
+@if errorlevel 1 goto error
+%CC% lzopack.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp.c
+@if errorlevel 1 goto error
+%CC% precomp.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp2.c
+@if errorlevel 1 goto error
+%CC% precomp2.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\simple.c
+@if errorlevel 1 goto error
+%CC% simple.obj %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -c lzotest\lzotest.c
+@if errorlevel 1 goto error
+%CC% lzotest.obj %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win16/vc.bat b/B/win16/vc.bat
new file mode 100644
index 0000000..2c35cfc
--- /dev/null
+++ b/B/win16/vc.bat
@@ -0,0 +1,43 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 16-bit
+@echo // Microsoft Visual C/C++ (using QuickWin)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=cl -nologo -AL -G2 -Mq
+set CF=-O -Gf -Gs -Gy -W3 %CFI%
+set LF=%BLIB% -Fm /link /seg:256
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+lib /nologo %BLIB% @b\dos16\bc.rsp;
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+set LF=-Fm /link /seg:256
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win16/wc.bat b/B/win16/wc.bat
new file mode 100644
index 0000000..b5dbf22
--- /dev/null
+++ b/B/win16/wc.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 16-bit
+@echo // Watcom C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=wcl -zq -ml -2 -bw -bt#windows -l#windows
+set CF=-ox %CFI%
+set LF=%BLIB%
+
+%CC% %CF% -c src\*.c
+@if errorlevel 1 goto error
+wlib -q -b -n -t %BLIB% @b\dos16\wc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/bc.bat b/B/win32/bc.bat
new file mode 100644
index 0000000..2aa9028
--- /dev/null
+++ b/B/win32/bc.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Borland C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=bcc32
+set CF=-O2 -w -w-aus %CFI% -Iinclude\lzo %CFASM%
+set LF=%BLIB%
+
+%CC% %CF% -Isrc -c @b\src.rsp
+@if errorlevel 1 goto error
+tlib %BLIB% @b\win32\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -ls -Iexamples examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -ls -Iexamples examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -ls -Iexamples examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -ls -Iexamples examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -ls -Iexamples examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -ls -Ilzotest lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -ls -Iminilzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/bc.rsp b/B/win32/bc.rsp
new file mode 100644
index 0000000..477f1ff
--- /dev/null
+++ b/B/win32/bc.rsp
@@ -0,0 +1,79 @@
++lzo1.obj &
++lzo1_99.obj &
++lzo1a.obj &
++lzo1a_99.obj &
++lzo1b_1.obj &
++lzo1b_2.obj &
++lzo1b_3.obj &
++lzo1b_4.obj &
++lzo1b_5.obj &
++lzo1b_6.obj &
++lzo1b_7.obj &
++lzo1b_8.obj &
++lzo1b_9.obj &
++lzo1b_99.obj &
++lzo1b_9x.obj &
++lzo1b_cc.obj &
++lzo1b_d1.obj &
++lzo1b_d2.obj &
++lzo1b_rr.obj &
++lzo1b_xx.obj &
++lzo1c_1.obj &
++lzo1c_2.obj &
++lzo1c_3.obj &
++lzo1c_4.obj &
++lzo1c_5.obj &
++lzo1c_6.obj &
++lzo1c_7.obj &
++lzo1c_8.obj &
++lzo1c_9.obj &
++lzo1c_99.obj &
++lzo1c_9x.obj &
++lzo1c_cc.obj &
++lzo1c_d1.obj &
++lzo1c_d2.obj &
++lzo1c_rr.obj &
++lzo1c_xx.obj &
++lzo1f_1.obj &
++lzo1f_9x.obj &
++lzo1f_d1.obj &
++lzo1f_d2.obj &
++lzo1x_1.obj &
++lzo1x_1k.obj &
++lzo1x_1l.obj &
++lzo1x_1o.obj &
++lzo1x_9x.obj &
++lzo1x_d1.obj &
++lzo1x_d2.obj &
++lzo1x_d3.obj &
++lzo1x_o.obj &
++lzo1y_1.obj &
++lzo1y_9x.obj &
++lzo1y_d1.obj &
++lzo1y_d2.obj &
++lzo1y_d3.obj &
++lzo1y_o.obj &
++lzo1z_9x.obj &
++lzo1z_d1.obj &
++lzo1z_d2.obj &
++lzo1z_d3.obj &
++lzo2a_9x.obj &
++lzo2a_d1.obj &
++lzo2a_d2.obj &
++lzo_crc.obj &
++lzo_init.obj &
++lzo_ptr.obj &
++lzo_str.obj &
++lzo_util.obj &
++asm\i386\obj\omf32\lzo1c_s1.obj &
++asm\i386\obj\omf32\lzo1c_s2.obj &
++asm\i386\obj\omf32\lzo1f_f1.obj &
++asm\i386\obj\omf32\lzo1f_f2.obj &
++asm\i386\obj\omf32\lzo1x_f1.obj &
++asm\i386\obj\omf32\lzo1x_f2.obj &
++asm\i386\obj\omf32\lzo1x_s1.obj &
++asm\i386\obj\omf32\lzo1x_s2.obj &
++asm\i386\obj\omf32\lzo1y_f1.obj &
++asm\i386\obj\omf32\lzo1y_f2.obj &
++asm\i386\obj\omf32\lzo1y_s1.obj &
++asm\i386\obj\omf32\lzo1y_s2.obj
diff --git a/B/win32/cygwin.bat b/B/win32/cygwin.bat
new file mode 100644
index 0000000..661badb
--- /dev/null
+++ b/B/win32/cygwin.bat
@@ -0,0 +1,45 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // cygwin + gcc
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set BLIB=lib%BNAME%.a
+set CC=gcc
+set CF=-O2 -fomit-frame-pointer -Wall %CFI% %CFASM%
+set LF=%BLIB% -lwinmm -s
+
+%CC% %CF% -c src/*.c
+@if errorlevel 1 goto error
+%CC% -x assembler-with-cpp -c asm/i386/src_gas/*.S
+@if errorlevel 1 goto error
+ar rcs %BLIB% @b/win32/cygwin.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -o dict.exe examples/dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o lzopack.exe examples/lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o precomp.exe examples/precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o precomp2.exe examples/precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o simple.exe examples/simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -o lzotest.exe lzotest/lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude/lzo -o testmini.exe minilzo/testmini.c minilzo/minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/cygwin.rsp b/B/win32/cygwin.rsp
new file mode 100644
index 0000000..2c9c9f9
--- /dev/null
+++ b/B/win32/cygwin.rsp
@@ -0,0 +1,79 @@
+lzo1.o
+lzo1_99.o
+lzo1a.o
+lzo1a_99.o
+lzo1b_1.o
+lzo1b_2.o
+lzo1b_3.o
+lzo1b_4.o
+lzo1b_5.o
+lzo1b_6.o
+lzo1b_7.o
+lzo1b_8.o
+lzo1b_9.o
+lzo1b_99.o
+lzo1b_9x.o
+lzo1b_cc.o
+lzo1b_d1.o
+lzo1b_d2.o
+lzo1b_rr.o
+lzo1b_xx.o
+lzo1c_1.o
+lzo1c_2.o
+lzo1c_3.o
+lzo1c_4.o
+lzo1c_5.o
+lzo1c_6.o
+lzo1c_7.o
+lzo1c_8.o
+lzo1c_9.o
+lzo1c_99.o
+lzo1c_9x.o
+lzo1c_cc.o
+lzo1c_d1.o
+lzo1c_d2.o
+lzo1c_rr.o
+lzo1c_xx.o
+lzo1f_1.o
+lzo1f_9x.o
+lzo1f_d1.o
+lzo1f_d2.o
+lzo1x_1.o
+lzo1x_1k.o
+lzo1x_1l.o
+lzo1x_1o.o
+lzo1x_9x.o
+lzo1x_d1.o
+lzo1x_d2.o
+lzo1x_d3.o
+lzo1x_o.o
+lzo1y_1.o
+lzo1y_9x.o
+lzo1y_d1.o
+lzo1y_d2.o
+lzo1y_d3.o
+lzo1y_o.o
+lzo1z_9x.o
+lzo1z_d1.o
+lzo1z_d2.o
+lzo1z_d3.o
+lzo2a_9x.o
+lzo2a_d1.o
+lzo2a_d2.o
+lzo_crc.o
+lzo_init.o
+lzo_ptr.o
+lzo_str.o
+lzo_util.o
+lzo1c_s1.o
+lzo1c_s2.o
+lzo1f_f1.o
+lzo1f_f2.o
+lzo1x_f1.o
+lzo1x_f2.o
+lzo1x_s1.o
+lzo1x_s2.o
+lzo1y_f1.o
+lzo1y_f2.o
+lzo1y_s1.o
+lzo1y_s2.o
diff --git a/B/win32/dm.bat b/B/win32/dm.bat
new file mode 100644
index 0000000..c06498d
--- /dev/null
+++ b/B/win32/dm.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Digital Mars C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=dmc -mn
+set CF=-o -w- %CFI% %CFASM%
+set LF=%BLIB%
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+lib %BLIB% /b /c /n /noi @b\win32\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/ic.bat b/B/win32/ic.bat
new file mode 100644
index 0000000..807e33d
--- /dev/null
+++ b/B/win32/ic.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Intel C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=icl -nologo -MD
+set CF=-O2 -GF -W3 %CFI% %CFASM%
+set LF=%BLIB%
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+link -lib -nologo -out:%BLIB% @b\win32\vc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/lccwin32.bat b/B/win32/lccwin32.bat
new file mode 100644
index 0000000..e9a1c5f
--- /dev/null
+++ b/B/win32/lccwin32.bat
@@ -0,0 +1,59 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // lcc-win32
+@echo //
+@echo // NOTE: some lcc-win32 versions are buggy, so we disable optimizations
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=lcc
+set CF=-O -A %CFI% -Iinclude\lzo %CFASM%
+set CF=-A %CFI% -Iinclude\lzo %CFASM%
+set LF=%BLIB% winmm.lib
+
+for %%f in (src\*.c) do %CC% %CF% -c %%f
+@if errorlevel 1 goto error
+lcclib /out:%BLIB% @b\win32\vc.rsp
+@if errorlevel 1 goto error
+
+%CC% -c %CF% examples\dict.c
+@if errorlevel 1 goto error
+lc dict.obj %LF%
+@if errorlevel 1 goto error
+%CC% -c %CF% examples\lzopack.c
+@if errorlevel 1 goto error
+lc lzopack.obj %LF%
+@if errorlevel 1 goto error
+%CC% -c %CF% examples\precomp.c
+@if errorlevel 1 goto error
+lc precomp.obj %LF%
+@if errorlevel 1 goto error
+%CC% -c %CF% examples\precomp2.c
+@if errorlevel 1 goto error
+lc precomp2.obj %LF%
+@if errorlevel 1 goto error
+%CC% -c %CF% examples\simple.c
+@if errorlevel 1 goto error
+lc simple.obj %LF%
+@if errorlevel 1 goto error
+
+%CC% -c %CF% lzotest\lzotest.c
+@if errorlevel 1 goto error
+lc lzotest.obj %LF%
+@if errorlevel 1 goto error
+
+%CC% -c %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+lc testmini.obj minilzo.obj
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/mingw.bat b/B/win32/mingw.bat
new file mode 100644
index 0000000..1a747bb
--- /dev/null
+++ b/B/win32/mingw.bat
@@ -0,0 +1,45 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // MinGW + gcc
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set BLIB=lib%BNAME%.a
+set CC=gcc
+set CF=-O2 -fomit-frame-pointer -Wall %CFI% %CFASM%
+set LF=%BLIB% -lwinmm -s
+
+%CC% %CF% -c src/*.c
+@if errorlevel 1 goto error
+%CC% -x assembler-with-cpp -c asm/i386/src_gas/*.S
+@if errorlevel 1 goto error
+ar rcs %BLIB% *.o
+@if errorlevel 1 goto error
+
+%CC% %CF% -o dict.exe examples/dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o lzopack.exe examples/lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o precomp.exe examples/precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o precomp2.exe examples/precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o simple.exe examples/simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -o lzotest.exe lzotest/lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude/lzo -o testmini.exe minilzo/testmini.c minilzo/minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/mwerks.bat b/B/win32/mwerks.bat
new file mode 100644
index 0000000..99395cc
--- /dev/null
+++ b/B/win32/mwerks.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Metrowerks CodeWarrior C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=mwcc -gccinc
+set CF=-opt full %CFI% %CFASM%
+set LF=%BLIB% -lwinmm.lib
+
+%CC% -w on %CF% -w nounusedexpr -c @b\src.rsp
+@if errorlevel 1 goto error
+mwld -library -o %BLIB% @b\win32\vc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/pellesc.bat b/B/win32/pellesc.bat
new file mode 100644
index 0000000..4c9569f
--- /dev/null
+++ b/B/win32/pellesc.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Pelles C
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=cc -Ze -Go
+set CF=-O2 -W2 %CFI% %CFASM%
+set LF=%BLIB%
+
+%CC% %CF% -c src\*.c
+@if errorlevel 1 goto error
+polib -out:%BLIB% @b\win32\vc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/pgi.bat b/B/win32/pgi.bat
new file mode 100644
index 0000000..73be86e
--- /dev/null
+++ b/B/win32/pgi.bat
@@ -0,0 +1,43 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Portland Group PGI C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set BLIB=lib%BNAME%.a
+set CC=pgcc
+set CF=-fast %CFI% %CFASM%
+set LF=%BLIB% -lwinmm
+
+%CC% %CF% -c src\*.c
+@if errorlevel 1 goto error
+ar rcs %BLIB% *.o asm/i386/obj/win32/*.obj
+@if errorlevel 1 goto error
+
+%CC% %CF% -o dict.exe examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o lzopack.exe examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o precomp.exe examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o precomp2.exe examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o simple.exe examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -o lzotest.exe lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/pw32.bat b/B/win32/pw32.bat
new file mode 100644
index 0000000..b863dd0
--- /dev/null
+++ b/B/win32/pw32.bat
@@ -0,0 +1,45 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // PW32 + gcc
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set BLIB=lib%BNAME%.a
+set CC=gcc
+set CF=-O2 -fomit-frame-pointer -Wall %CFI% %CFASM%
+set LF=%BLIB% -lwinmm -s
+
+%CC% %CF% -c src/*.c
+@if errorlevel 1 goto error
+%CC% -x assembler-with-cpp -c asm/i386/src_gas/*.S
+@if errorlevel 1 goto error
+ar rcs %BLIB% *.o
+@if errorlevel 1 goto error
+
+%CC% %CF% -o dict.exe examples/dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o lzopack.exe examples/lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o precomp.exe examples/precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o precomp2.exe examples/precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o simple.exe examples/simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -o lzotest.exe lzotest/lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude/lzo -o testmini.exe minilzo/testmini.c minilzo/minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/rsxnt.bat b/B/win32/rsxnt.bat
new file mode 100644
index 0000000..8f7b579
--- /dev/null
+++ b/B/win32/rsxnt.bat
@@ -0,0 +1,45 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // rsxnt + gcc
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set BLIB=%BNAME%.a
+set CC=gcc -Zwin32 -Zsys -mprobe
+set CF=@b/dos32/dj2.opt %CFI% %CFASM%
+set LF=%BLIB% -s
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+%CC% -x assembler-with-cpp -c asm/i386/src_gas/*.S
+@if errorlevel 1 goto error
+ar rcs %BLIB% @b/win32/cygwin.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -o dict.exe examples/dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o lzopack.exe examples/lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o precomp.exe examples/precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o precomp2.exe examples/precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -o simple.exe examples/simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -o lzotest.exe lzotest/lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude/lzo -o testmini.exe minilzo/testmini.c minilzo/minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/sc.bat b/B/win32/sc.bat
new file mode 100644
index 0000000..83a4e56
--- /dev/null
+++ b/B/win32/sc.bat
@@ -0,0 +1,56 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Symantec C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=sc -mn
+set CF=-o -w- %CFI% %CFASM%
+set LF=%BLIB%
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+lib %BLIB% /b /c /n /noi @b\win32\bc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% -c examples\dict.c
+@if errorlevel 1 goto error
+%CC% dict.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\lzopack.c
+@if errorlevel 1 goto error
+%CC% lzopack.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp.c
+@if errorlevel 1 goto error
+%CC% precomp.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\precomp2.c
+@if errorlevel 1 goto error
+%CC% precomp2.obj %LF%
+@if errorlevel 1 goto error
+%CC% %CF% -c examples\simple.c
+@if errorlevel 1 goto error
+%CC% simple.obj %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -c lzotest\lzotest.c
+@if errorlevel 1 goto error
+%CC% lzotest.obj %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo -c minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+%CC% testmini.obj minilzo.obj
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/vc.bat b/B/win32/vc.bat
new file mode 100644
index 0000000..5a8a394
--- /dev/null
+++ b/B/win32/vc.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Microsoft Visual C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=cl -nologo -MD
+set CF=-O2 -GF -W3 %CFI% %CFASM%
+set LF=%BLIB%
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+link -lib -nologo -out:%BLIB% @b\win32\vc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/vc.rsp b/B/win32/vc.rsp
new file mode 100644
index 0000000..6c5ca7e
--- /dev/null
+++ b/B/win32/vc.rsp
@@ -0,0 +1,79 @@
+.\lzo1.obj
+.\lzo1_99.obj
+.\lzo1a.obj
+.\lzo1a_99.obj
+.\lzo1b_1.obj
+.\lzo1b_2.obj
+.\lzo1b_3.obj
+.\lzo1b_4.obj
+.\lzo1b_5.obj
+.\lzo1b_6.obj
+.\lzo1b_7.obj
+.\lzo1b_8.obj
+.\lzo1b_9.obj
+.\lzo1b_99.obj
+.\lzo1b_9x.obj
+.\lzo1b_cc.obj
+.\lzo1b_d1.obj
+.\lzo1b_d2.obj
+.\lzo1b_rr.obj
+.\lzo1b_xx.obj
+.\lzo1c_1.obj
+.\lzo1c_2.obj
+.\lzo1c_3.obj
+.\lzo1c_4.obj
+.\lzo1c_5.obj
+.\lzo1c_6.obj
+.\lzo1c_7.obj
+.\lzo1c_8.obj
+.\lzo1c_9.obj
+.\lzo1c_99.obj
+.\lzo1c_9x.obj
+.\lzo1c_cc.obj
+.\lzo1c_d1.obj
+.\lzo1c_d2.obj
+.\lzo1c_rr.obj
+.\lzo1c_xx.obj
+.\lzo1f_1.obj
+.\lzo1f_9x.obj
+.\lzo1f_d1.obj
+.\lzo1f_d2.obj
+.\lzo1x_1.obj
+.\lzo1x_1k.obj
+.\lzo1x_1l.obj
+.\lzo1x_1o.obj
+.\lzo1x_9x.obj
+.\lzo1x_d1.obj
+.\lzo1x_d2.obj
+.\lzo1x_d3.obj
+.\lzo1x_o.obj
+.\lzo1y_1.obj
+.\lzo1y_9x.obj
+.\lzo1y_d1.obj
+.\lzo1y_d2.obj
+.\lzo1y_d3.obj
+.\lzo1y_o.obj
+.\lzo1z_9x.obj
+.\lzo1z_d1.obj
+.\lzo1z_d2.obj
+.\lzo1z_d3.obj
+.\lzo2a_9x.obj
+.\lzo2a_d1.obj
+.\lzo2a_d2.obj
+.\lzo_crc.obj
+.\lzo_init.obj
+.\lzo_ptr.obj
+.\lzo_str.obj
+.\lzo_util.obj
+.\asm\i386\obj\win32\lzo1c_s1.obj
+.\asm\i386\obj\win32\lzo1c_s2.obj
+.\asm\i386\obj\win32\lzo1f_f1.obj
+.\asm\i386\obj\win32\lzo1f_f2.obj
+.\asm\i386\obj\win32\lzo1x_f1.obj
+.\asm\i386\obj\win32\lzo1x_f2.obj
+.\asm\i386\obj\win32\lzo1x_s1.obj
+.\asm\i386\obj\win32\lzo1x_s2.obj
+.\asm\i386\obj\win32\lzo1y_f1.obj
+.\asm\i386\obj\win32\lzo1y_f2.obj
+.\asm\i386\obj\win32\lzo1y_s1.obj
+.\asm\i386\obj\win32\lzo1y_s2.obj
diff --git a/B/win32/vc_dll.bat b/B/win32/vc_dll.bat
new file mode 100644
index 0000000..f6aa14c
--- /dev/null
+++ b/B/win32/vc_dll.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Microsoft Visual C/C++ (DLL)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=cl -nologo -MD
+set CF=-O2 -GF -W3 %CFI% %CFASM%
+set LF=%BLIB%
+
+%CC% %CF% -D__LZO_EXPORT1#__declspec(dllexport) -c @b\src.rsp
+@if errorlevel 1 goto error
+%CC% -LD -Fe%BDLL% @b\win32\vc.rsp /link /map /def:b\win32\vc_dll.def
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/vc_dll.def b/B/win32/vc_dll.def
new file mode 100644
index 0000000..cade569
--- /dev/null
+++ b/B/win32/vc_dll.def
@@ -0,0 +1,13 @@
+EXPORTS
+ _lzo1c_decompress_asm=lzo1c_decompress_asm
+ _lzo1c_decompress_asm_safe=lzo1c_decompress_asm_safe
+ _lzo1f_decompress_asm_fast=lzo1f_decompress_asm_fast
+ _lzo1f_decompress_asm_fast_safe=lzo1f_decompress_asm_fast_safe
+ _lzo1x_decompress_asm=lzo1x_decompress_asm
+ _lzo1x_decompress_asm_fast=lzo1x_decompress_asm_fast
+ _lzo1x_decompress_asm_fast_safe=lzo1x_decompress_asm_fast_safe
+ _lzo1x_decompress_asm_safe=lzo1x_decompress_asm_safe
+ _lzo1y_decompress_asm=lzo1y_decompress_asm
+ _lzo1y_decompress_asm_fast=lzo1y_decompress_asm_fast
+ _lzo1y_decompress_asm_fast_safe=lzo1y_decompress_asm_fast_safe
+ _lzo1y_decompress_asm_safe=lzo1y_decompress_asm_safe
diff --git a/B/win32/wc.bat b/B/win32/wc.bat
new file mode 100644
index 0000000..ffdbe63
--- /dev/null
+++ b/B/win32/wc.bat
@@ -0,0 +1,39 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 32-bit
+@echo // Watcom C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=wcl386 -zq -mf -5r -bt#nt -l#nt
+set CF=-ox -zc %CFI% %CFASM%
+set LF=%BLIB%
+
+%CC% %CF% -c src\*.c
+@if errorlevel 1 goto error
+wlib -q -b -n -t %BLIB% @b\win32\wc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win32/wc.rsp b/B/win32/wc.rsp
new file mode 100644
index 0000000..5bf8b8c
--- /dev/null
+++ b/B/win32/wc.rsp
@@ -0,0 +1,79 @@
++'lzo1.obj'
++'lzo1_99.obj'
++'lzo1a.obj'
++'lzo1a_99.obj'
++'lzo1b_1.obj'
++'lzo1b_2.obj'
++'lzo1b_3.obj'
++'lzo1b_4.obj'
++'lzo1b_5.obj'
++'lzo1b_6.obj'
++'lzo1b_7.obj'
++'lzo1b_8.obj'
++'lzo1b_9.obj'
++'lzo1b_99.obj'
++'lzo1b_9x.obj'
++'lzo1b_cc.obj'
++'lzo1b_d1.obj'
++'lzo1b_d2.obj'
++'lzo1b_rr.obj'
++'lzo1b_xx.obj'
++'lzo1c_1.obj'
++'lzo1c_2.obj'
++'lzo1c_3.obj'
++'lzo1c_4.obj'
++'lzo1c_5.obj'
++'lzo1c_6.obj'
++'lzo1c_7.obj'
++'lzo1c_8.obj'
++'lzo1c_9.obj'
++'lzo1c_99.obj'
++'lzo1c_9x.obj'
++'lzo1c_cc.obj'
++'lzo1c_d1.obj'
++'lzo1c_d2.obj'
++'lzo1c_rr.obj'
++'lzo1c_xx.obj'
++'lzo1f_1.obj'
++'lzo1f_9x.obj'
++'lzo1f_d1.obj'
++'lzo1f_d2.obj'
++'lzo1x_1.obj'
++'lzo1x_1k.obj'
++'lzo1x_1l.obj'
++'lzo1x_1o.obj'
++'lzo1x_9x.obj'
++'lzo1x_d1.obj'
++'lzo1x_d2.obj'
++'lzo1x_d3.obj'
++'lzo1x_o.obj'
++'lzo1y_1.obj'
++'lzo1y_9x.obj'
++'lzo1y_d1.obj'
++'lzo1y_d2.obj'
++'lzo1y_d3.obj'
++'lzo1y_o.obj'
++'lzo1z_9x.obj'
++'lzo1z_d1.obj'
++'lzo1z_d2.obj'
++'lzo1z_d3.obj'
++'lzo2a_9x.obj'
++'lzo2a_d1.obj'
++'lzo2a_d2.obj'
++'lzo_crc.obj'
++'lzo_init.obj'
++'lzo_ptr.obj'
++'lzo_str.obj'
++'lzo_util.obj'
++'asm\i386\obj\omf32\lzo1c_s1.obj'
++'asm\i386\obj\omf32\lzo1c_s2.obj'
++'asm\i386\obj\omf32\lzo1f_f1.obj'
++'asm\i386\obj\omf32\lzo1f_f2.obj'
++'asm\i386\obj\omf32\lzo1x_f1.obj'
++'asm\i386\obj\omf32\lzo1x_f2.obj'
++'asm\i386\obj\omf32\lzo1x_s1.obj'
++'asm\i386\obj\omf32\lzo1x_s2.obj'
++'asm\i386\obj\omf32\lzo1y_f1.obj'
++'asm\i386\obj\omf32\lzo1y_f2.obj'
++'asm\i386\obj\omf32\lzo1y_s1.obj'
++'asm\i386\obj\omf32\lzo1y_s2.obj'
diff --git a/B/win64/ic.bat b/B/win64/ic.bat
new file mode 100644
index 0000000..c5d367a
--- /dev/null
+++ b/B/win64/ic.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 64-bit (Itanium)
+@echo // Intel C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=icl -nologo -MD
+set CF=-O2 -GF -W3 %CFI%
+set LF=%BLIB%
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+link -lib -nologo -out:%BLIB% @b\win64\vc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win64/ic_dll.bat b/B/win64/ic_dll.bat
new file mode 100644
index 0000000..6e5b7df
--- /dev/null
+++ b/B/win64/ic_dll.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 64-bit (Itanium)
+@echo // Intel C/C++ (DLL)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=icl -nologo -MD
+set CF=-O2 -GF -W3 %CFI%
+set LF=%BLIB%
+
+%CC% %CF% -D__LZO_EXPORT1#__declspec(dllexport) -c @b\src.rsp
+@if errorlevel 1 goto error
+%CC% -LD -Fe%BDLL% @b\win64\vc.rsp /link /map /def:b\win64\vc_dll.def
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win64/vc.bat b/B/win64/vc.bat
new file mode 100644
index 0000000..6724546
--- /dev/null
+++ b/B/win64/vc.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 64-bit (AMD64 or Itanium)
+@echo // Microsoft Visual C/C++
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=cl -nologo -MD
+set CF=-O2 -GF -W3 -Wp64 %CFI%
+set LF=%BLIB%
+
+%CC% %CF% -c @b\src.rsp
+@if errorlevel 1 goto error
+link -lib -nologo -out:%BLIB% @b\win64\vc.rsp
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win64/vc.rsp b/B/win64/vc.rsp
new file mode 100644
index 0000000..182de60
--- /dev/null
+++ b/B/win64/vc.rsp
@@ -0,0 +1,67 @@
+.\lzo1.obj
+.\lzo1_99.obj
+.\lzo1a.obj
+.\lzo1a_99.obj
+.\lzo1b_1.obj
+.\lzo1b_2.obj
+.\lzo1b_3.obj
+.\lzo1b_4.obj
+.\lzo1b_5.obj
+.\lzo1b_6.obj
+.\lzo1b_7.obj
+.\lzo1b_8.obj
+.\lzo1b_9.obj
+.\lzo1b_99.obj
+.\lzo1b_9x.obj
+.\lzo1b_cc.obj
+.\lzo1b_d1.obj
+.\lzo1b_d2.obj
+.\lzo1b_rr.obj
+.\lzo1b_xx.obj
+.\lzo1c_1.obj
+.\lzo1c_2.obj
+.\lzo1c_3.obj
+.\lzo1c_4.obj
+.\lzo1c_5.obj
+.\lzo1c_6.obj
+.\lzo1c_7.obj
+.\lzo1c_8.obj
+.\lzo1c_9.obj
+.\lzo1c_99.obj
+.\lzo1c_9x.obj
+.\lzo1c_cc.obj
+.\lzo1c_d1.obj
+.\lzo1c_d2.obj
+.\lzo1c_rr.obj
+.\lzo1c_xx.obj
+.\lzo1f_1.obj
+.\lzo1f_9x.obj
+.\lzo1f_d1.obj
+.\lzo1f_d2.obj
+.\lzo1x_1.obj
+.\lzo1x_1k.obj
+.\lzo1x_1l.obj
+.\lzo1x_1o.obj
+.\lzo1x_9x.obj
+.\lzo1x_d1.obj
+.\lzo1x_d2.obj
+.\lzo1x_d3.obj
+.\lzo1x_o.obj
+.\lzo1y_1.obj
+.\lzo1y_9x.obj
+.\lzo1y_d1.obj
+.\lzo1y_d2.obj
+.\lzo1y_d3.obj
+.\lzo1y_o.obj
+.\lzo1z_9x.obj
+.\lzo1z_d1.obj
+.\lzo1z_d2.obj
+.\lzo1z_d3.obj
+.\lzo2a_9x.obj
+.\lzo2a_d1.obj
+.\lzo2a_d2.obj
+.\lzo_crc.obj
+.\lzo_init.obj
+.\lzo_ptr.obj
+.\lzo_str.obj
+.\lzo_util.obj
diff --git a/B/win64/vc_dll.bat b/B/win64/vc_dll.bat
new file mode 100644
index 0000000..73bf6d3
--- /dev/null
+++ b/B/win64/vc_dll.bat
@@ -0,0 +1,42 @@
+@echo // Copyright (C) 1996-2011 Markus F.X.J. Oberhumer
+@echo //
+@echo // Windows 64-bit (AMD64 or Itanium)
+@echo // Microsoft Visual C/C++ (DLL)
+@echo //
+@call b\prepare.bat
+@if "%BECHO%"=="n" echo off
+
+
+set CC=cl -nologo -MD
+set CF=-O2 -GF -W3 -Wp64 %CFI%
+set LF=%BLIB%
+
+%CC% %CF% -D__LZO_EXPORT1#__declspec(dllexport) -c @b\src.rsp
+@if errorlevel 1 goto error
+%CC% -LD -Fe%BDLL% @b\win64\vc.rsp /link /map /def:b\win64\vc_dll.def
+@if errorlevel 1 goto error
+
+%CC% %CF% examples\dict.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\lzopack.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\precomp2.c %LF%
+@if errorlevel 1 goto error
+%CC% %CF% examples\simple.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% lzotest\lzotest.c %LF%
+@if errorlevel 1 goto error
+
+%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
+@if errorlevel 1 goto error
+
+
+@call b\done.bat
+@goto end
+:error
+@echo ERROR during build!
+:end
+@call b\unset.bat
diff --git a/B/win64/vc_dll.def b/B/win64/vc_dll.def
new file mode 100644
index 0000000..e80a637
--- /dev/null
+++ b/B/win64/vc_dll.def
@@ -0,0 +1 @@
+EXPORTS