adjust build for BSDs, MinGW cross-compile, and more configuration
Includes joint work with @abmclin, @pmatos, and @jessealama. original commit: 2649600c68ff57efb63d6d5d10c9d9f73368f59a
This commit is contained in:
parent
dcffbe1d8b
commit
368d079d24
91
BUILDING
91
BUILDING
|
@ -40,8 +40,8 @@ Prerequisites:
|
||||||
|
|
||||||
* GNU Make
|
* GNU Make
|
||||||
* gcc
|
* gcc
|
||||||
* Header files and libraries for ncurses
|
* Header files and libraries for ncurses [unless --disable-curses]
|
||||||
* Header files and libraries for X windows
|
* Header files and libraries for X windows [unless --disable-x11]
|
||||||
* Header files and libraries for uuid
|
* Header files and libraries for uuid
|
||||||
|
|
||||||
Uninstalling on Unix-like systems is as simple as running:
|
Uninstalling on Unix-like systems is as simple as running:
|
||||||
|
@ -75,7 +75,7 @@ That's why the boot and header files are packaged with the sources.
|
||||||
if successful, creates several files and directories:
|
if successful, creates several files and directories:
|
||||||
|
|
||||||
* The directory nanopass containing the Nanopass Infrastructure,
|
* The directory nanopass containing the Nanopass Infrastructure,
|
||||||
retrieved from github.
|
retrieved from GitHub.
|
||||||
|
|
||||||
* A make file, Makefile, in the root (top level) directory.
|
* A make file, Makefile, in the root (top level) directory.
|
||||||
|
|
||||||
|
@ -117,9 +117,18 @@ The make file supports several targets:
|
||||||
Set SCHEMEHEAPDIRS to /usr/lib/csv%v/%m:/usr/local/lib/csv%v/%m on
|
Set SCHEMEHEAPDIRS to /usr/lib/csv%v/%m:/usr/local/lib/csv%v/%m on
|
||||||
Unix-like systems and to %x/../../boot/%m on Windows systems.
|
Unix-like systems and to %x/../../boot/%m on Windows systems.
|
||||||
|
|
||||||
To run Chez Scheme without installing, you need to tell the executable
|
Alternatively, if you have a build before the changes at full path
|
||||||
where to find the boot files. This can be done via command-line
|
<orig>, use
|
||||||
arguments, e.g.:
|
|
||||||
|
make from-orig ORIG=<orig>
|
||||||
|
|
||||||
|
To run Chez Scheme without installing, you need to tell the
|
||||||
|
executable where to find the boot files. The run target of the
|
||||||
|
makefile will do that
|
||||||
|
|
||||||
|
make run
|
||||||
|
|
||||||
|
or this can be done manually via command-line arguments, e.g.:
|
||||||
|
|
||||||
$W/bin/$M/scheme -b $W/boot/$M/petite.boot -b $W/boot/$M/scheme.boot
|
$W/bin/$M/scheme -b $W/boot/$M/petite.boot -b $W/boot/$M/scheme.boot
|
||||||
|
|
||||||
|
@ -194,15 +203,41 @@ The make file supports several targets:
|
||||||
'make distclean'
|
'make distclean'
|
||||||
removes nanopass, Makefile, and all workareas.
|
removes nanopass, Makefile, and all workareas.
|
||||||
|
|
||||||
|
OTHER UNIX VARIANTS
|
||||||
|
|
||||||
|
To build on Unix variants other than Linux and OS X, you will first
|
||||||
|
need to build boot files on a Linux or OS X machine. On that machine,
|
||||||
|
after building Chez Scheme, create boot files for the target machine
|
||||||
|
<machine> with:
|
||||||
|
|
||||||
|
make boot XM=<machine>
|
||||||
|
|
||||||
|
Copy the generated boot/<machine> directory to the target machine,
|
||||||
|
adding to or replacing the boot directory with pre-built boot files
|
||||||
|
there, and then build as on Linux.
|
||||||
|
|
||||||
|
Remember to use gmake if make is not GNU make. If you run into linker
|
||||||
|
trouble, try running configure with --libkernel so that the build
|
||||||
|
avoids running ld directly.
|
||||||
|
|
||||||
|
On OpenBSD, Chez Scheme must be built and installed on a filesystem
|
||||||
|
that is mounted with wxneeded.
|
||||||
|
|
||||||
|
On NetNSD, note that the makefiles run "paxctl +m" to enable WX pages
|
||||||
|
(i.e., pages that have both write and execute enabled).
|
||||||
|
|
||||||
WINDOWS
|
WINDOWS
|
||||||
|
|
||||||
Building Chez Scheme under 64-bit Windows with Bash/WSL, MinGW/MSYS,
|
Building Chez Scheme under 64-bit Windows with Bash/WSL, MinGW/MSYS,
|
||||||
or Cygwin follows the instructions above, except that 'make install'
|
or Cygwin follows the instructions above, except that 'make install'
|
||||||
and 'make uninstall' are not supported. On Bash/WSL, the build
|
and 'make uninstall' are not supported. Alternatively, the main Chez
|
||||||
directory must be in a location with a Windows path such as /mnt/c,
|
Scheme executable can be built from the Windows command line or
|
||||||
and the 'OS' environment variable must be set to 'Windows_NT' to
|
cross-compiled using MinGW as described further below.
|
||||||
indicate a build for Windows, as opposed to a build for Linux on
|
|
||||||
Windows:
|
On Bash/WSL, the build directory must be in a location with a Windows
|
||||||
|
path such as /mnt/c, and the 'OS' environment variable must be set to
|
||||||
|
'Windows_NT' to indicate a build for Windows, as opposed to a build
|
||||||
|
for Linux on Windows:
|
||||||
|
|
||||||
env OS=Windows_NT ./configure
|
env OS=Windows_NT ./configure
|
||||||
env OS=Windows_NT make
|
env OS=Windows_NT make
|
||||||
|
@ -267,3 +302,37 @@ the Cygwin values are incompatible with the Microsoft C Runtime
|
||||||
Library.
|
Library.
|
||||||
|
|
||||||
Use 'make test' described above to run the tests.
|
Use 'make test' described above to run the tests.
|
||||||
|
|
||||||
|
WINDOWS EXECUTABLE VIA COMMAND PROMPT
|
||||||
|
|
||||||
|
To build the Chez Scheme executable using Microsoft Visual Studio,
|
||||||
|
first set up command-line tools. The c\vs.bat script can help if you
|
||||||
|
supply amd64 for a 64-bit build or x86 for a 32-bit build:
|
||||||
|
|
||||||
|
c\vs.bat amd64
|
||||||
|
|
||||||
|
Then, run c\build/bat with a machine name, either ta6nt (64-bit
|
||||||
|
threaded), a6nt (64-bit non-threaded), ti3nt (32-bit threaded), or
|
||||||
|
i3nt (32-bit non-threaded):
|
||||||
|
|
||||||
|
c\build.bat ta6nt
|
||||||
|
|
||||||
|
The resulting executable in <machine>\bin\<machine> relies on
|
||||||
|
bootfiles in ..\boot\<machine> relative to the executable.
|
||||||
|
|
||||||
|
CROSS-COMPILING THE WINDOWS EXECUTABLE
|
||||||
|
|
||||||
|
To cross-compile the main Chez Scheme executable for Windows using
|
||||||
|
MinGW, specify suitable build tools to configure, perhaps using
|
||||||
|
--toolprefix= like this:
|
||||||
|
|
||||||
|
./configure -m=ta6nt --threads --toolprefix=x86_64-w64-mingw32-
|
||||||
|
|
||||||
|
Then, make with c/Mf-<machine> while supplying cross=t and o=o,
|
||||||
|
possibly like this:
|
||||||
|
|
||||||
|
(cd ta6nt/c && make -f Mf-ta6nt cross=t o=o)
|
||||||
|
|
||||||
|
The executable is written to <machine>/bin/<machine>, and it should be
|
||||||
|
installed with bootfiles in ../boot/<machine>/ relative to the
|
||||||
|
executable.
|
||||||
|
|
7
LOG
7
LOG
|
@ -1374,3 +1374,10 @@
|
||||||
BUILDING, c/vs.bat, wininstall/locate-vcredist.bat
|
BUILDING, c/vs.bat, wininstall/locate-vcredist.bat
|
||||||
- fixed open-string-input-port on immutable strings
|
- fixed open-string-input-port on immutable strings
|
||||||
cpnanopass.ss, io.ms, release_notes.stex
|
cpnanopass.ss, io.ms, release_notes.stex
|
||||||
|
- restore {Free,Open,Net}BSD build, support Windows cross-compile
|
||||||
|
via MinGW, add configuration options, and add helper makefile targets
|
||||||
|
expenditor.c, thread.c, stats.c, statics.c, scheme.c, main.c, types.h,
|
||||||
|
externs.h, globals.h, nocurses.h, version.h, system.h, segment.h,
|
||||||
|
a6ob.def, ta6ob.def, a6nb.def, ta6nb.def, i3nt.def, ti3nt.def,
|
||||||
|
c/Mf-*, build.bat, makefiles/Makefile.in, makefiles/Mf-install.in,
|
||||||
|
s/update-revision, BUILDING
|
||||||
|
|
13
c/Mf-a6fb
13
c/Mf-a6fb
|
@ -17,7 +17,7 @@ m = a6fb
|
||||||
Cpu = X86_64
|
Cpu = X86_64
|
||||||
|
|
||||||
mdinclude = -I/usr/local/include -I/usr/X11R6/include
|
mdinclude = -I/usr/local/include -I/usr/X11R6/include
|
||||||
mdclib = -L/usr/local/lib -liconv -lm -lncurses
|
mdclib = -L/usr/local/lib -liconv -lm ${ncursesLib} -lossp-uuid
|
||||||
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -31,11 +31,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
||||||
|
|
13
c/Mf-a6le
13
c/Mf-a6le
|
@ -16,7 +16,7 @@
|
||||||
m = a6le
|
m = a6le
|
||||||
Cpu = X86_64
|
Cpu = X86_64
|
||||||
|
|
||||||
mdclib = -lm -ldl -lncurses -lrt -luuid
|
mdclib = -lm -ldl ${ncursesLib} -lrt -luuid
|
||||||
C = ${CC} ${CPPFLAGS} -m64 -msse2 -Wpointer-arith -Wall -Wextra -Werror -Wno-implicit-fallthrough -O2 ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -m64 -msse2 -Wpointer-arith -Wall -Wextra -Werror -Wno-implicit-fallthrough -O2 ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -30,11 +30,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -melf_x86_64 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -melf_x86_64 -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
||||||
|
|
12
c/Mf-a6nb
12
c/Mf-a6nb
|
@ -31,11 +31,15 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
paxctl +m ${Scheme}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
||||||
|
|
28
c/Mf-a6nt
28
c/Mf-a6nt
|
@ -21,10 +21,11 @@ o = obj
|
||||||
mdobj=windows.$o
|
mdobj=windows.$o
|
||||||
mdsrc=windows.c Makefile.$m cs.ico scheme.rc make.bat
|
mdsrc=windows.c Makefile.$m cs.ico scheme.rc make.bat
|
||||||
mdclean=vs.bat make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe*
|
mdclean=vs.bat make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe*
|
||||||
|
cross=f
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Scheme}: make.bat
|
${Scheme}${cross:f=}: make.bat
|
||||||
cmd.exe /c make.bat
|
cmd.exe /c make.bat
|
||||||
cp ../bin/$m/scheme.exe ../bin/$m/petite.exe
|
cp ../bin/$m/scheme.exe ../bin/$m/petite.exe
|
||||||
cp ../bin/$m/scheme.pdb ../bin/$m/petite.pdb
|
cp ../bin/$m/scheme.pdb ../bin/$m/petite.pdb
|
||||||
|
@ -34,3 +35,28 @@ make.bat: vs.bat
|
||||||
echo 'set MAKEFLAGS=' >> $@
|
echo 'set MAKEFLAGS=' >> $@
|
||||||
echo 'vs.bat amd64 && nmake /f Makefile.$m /nologo %*' >> $@
|
echo 'vs.bat amd64 && nmake /f Makefile.$m /nologo %*' >> $@
|
||||||
chmod +x $@
|
chmod +x $@
|
||||||
|
|
||||||
|
# -------------------------------------------------------
|
||||||
|
# For cross-compilation, triggered by setting cross=t o=o
|
||||||
|
|
||||||
|
C = ${CC} ${CPPFLAGS} -O2 ${CFLAGS}
|
||||||
|
|
||||||
|
${Scheme}${cross:t=}: ${Main} ${Kernel} ${KernelLinkDeps}
|
||||||
|
$C -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS} -lshell32 -luser32 -lole32 -lrpcrt4 -luuid
|
||||||
|
|
||||||
|
.c.$o:
|
||||||
|
$C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c
|
||||||
|
|
||||||
|
${KernelLib}: ${kernelobj}
|
||||||
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
|
../zlib/configure.log:
|
||||||
|
echo "all:" >> ../zlib/Makefile
|
||||||
|
echo '\t$$(MAKE) -f win32/Makefile.gcc CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)" RC="$(WINDRES)"' >> ../zlib/Makefile
|
||||||
|
touch ../zlib/configure.log
|
||||||
|
|
||||||
|
../lz4/lib/liblz4.a: ${LZ4Sources}
|
||||||
|
(cd ../lz4/lib; CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)" ${MAKE} liblz4.a)
|
||||||
|
|
13
c/Mf-a6ob
13
c/Mf-a6ob
|
@ -17,7 +17,7 @@ m = a6ob
|
||||||
Cpu = X86_64
|
Cpu = X86_64
|
||||||
|
|
||||||
mdinclude = -I/usr/local/include -I/usr/X11R6/include
|
mdinclude = -I/usr/local/include -I/usr/X11R6/include
|
||||||
mdclib = -L/usr/local/lib -liconv -lm -lncurses
|
mdclib = -L/usr/local/lib -liconv -lm ${ncursesLib} -lossp-uuid
|
||||||
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Werror -O ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Werror -O ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -31,11 +31,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -Wl,--export-dynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -Wl,--export-dynamic -Wl,-zwxneeded -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
||||||
|
|
13
c/Mf-a6osx
13
c/Mf-a6osx
|
@ -16,7 +16,7 @@
|
||||||
m = a6osx
|
m = a6osx
|
||||||
Cpu = X86_64
|
Cpu = X86_64
|
||||||
|
|
||||||
mdclib = -liconv -lm -lncurses
|
mdclib = -liconv -lm ${ncursesLib}
|
||||||
C = ${CC} ${CPPFLAGS} -m64 -Wpointer-arith -Wall -Wextra -Wno-implicit-fallthrough -Werror -O2 -I/opt/X11/include/ ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -m64 -Wpointer-arith -Wall -Wextra -Wno-implicit-fallthrough -Werror -O2 -I/opt/X11/include/ ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -30,11 +30,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
||||||
|
|
13
c/Mf-a6s2
13
c/Mf-a6s2
|
@ -16,7 +16,7 @@
|
||||||
m = a6s2
|
m = a6s2
|
||||||
Cpu = X86_64
|
Cpu = X86_64
|
||||||
|
|
||||||
mdclib = -lnsl -ldl -lm -lcurses -lrt
|
mdclib = -lnsl -ldl -lm ${cursesLib} -lrt
|
||||||
C = ${CC} ${CPPFLAGS} -m64 -Wpointer-arith -Wextra -Werror -O ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -m64 -Wpointer-arith -Wextra -Werror -O ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -30,11 +30,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -melf_x86_64 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -melf_x86_64 -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
||||||
|
|
13
c/Mf-arm32le
13
c/Mf-arm32le
|
@ -16,7 +16,7 @@
|
||||||
m = arm32le
|
m = arm32le
|
||||||
Cpu = ARMV6
|
Cpu = ARMV6
|
||||||
|
|
||||||
mdclib = -lm -ldl -lncurses -lrt -luuid
|
mdclib = -lm -ldl ${ncursesLib} -lrt -luuid
|
||||||
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -Wno-implicit-fallthrough -O2 ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -Wno-implicit-fallthrough -O2 ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = arm32le.c
|
mdsrc = arm32le.c
|
||||||
|
@ -30,11 +30,14 @@ mdobj = arm32le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; ./configure)
|
(cd ../zlib; ./configure)
|
||||||
|
|
16
c/Mf-base
16
c/Mf-base
|
@ -18,17 +18,27 @@ include Mf-config
|
||||||
Include=../boot/$m
|
Include=../boot/$m
|
||||||
PetiteBoot=../boot/$m/petite.boot
|
PetiteBoot=../boot/$m/petite.boot
|
||||||
SchemeBoot=../boot/$m/scheme.boot
|
SchemeBoot=../boot/$m/scheme.boot
|
||||||
Kernel=../boot/$m/kernel.$o
|
|
||||||
Main=../boot/$m/main.$o
|
Main=../boot/$m/main.$o
|
||||||
Scheme=../bin/$m/scheme
|
Scheme=../bin/$m/scheme
|
||||||
|
|
||||||
|
# One of these sets is referenced in Mf-config to select between
|
||||||
|
# linking with kernel.o or libkernel.a
|
||||||
|
|
||||||
|
KernelO=../boot/$m/kernel.$o
|
||||||
|
KernelOLinkDeps=
|
||||||
|
KernelOLinkLibs=
|
||||||
|
|
||||||
|
KernelLib=../boot/$m/libkernel.a
|
||||||
|
KernelLibLinkDeps=${zlibDep} ${LZ4Dep}
|
||||||
|
KernelLibLinkLibs=${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
kernelsrc=statics.c segment.c alloc.c symbol.c intern.c gcwrapper.c gc-ocd.c gc-oce.c\
|
kernelsrc=statics.c segment.c alloc.c symbol.c intern.c gcwrapper.c gc-ocd.c gc-oce.c\
|
||||||
number.c schsig.c io.c new-io.c print.c fasl.c stats.c foreign.c prim.c prim5.c flushcache.c\
|
number.c schsig.c io.c new-io.c print.c fasl.c stats.c foreign.c prim.c prim5.c flushcache.c\
|
||||||
schlib.c thread.c expeditor.c scheme.c compress-io.c
|
schlib.c thread.c expeditor.c scheme.c compress-io.c
|
||||||
|
|
||||||
kernelobj=${kernelsrc:%.c=%.$o} ${mdobj}
|
kernelobj=${kernelsrc:%.c=%.$o} ${mdobj}
|
||||||
|
|
||||||
kernelhdr=system.h types.h version.h globals.h externs.h segment.h gc.c sort.h thread.h config.h compress-io.h itest.c
|
kernelhdr=system.h types.h version.h globals.h externs.h segment.h gc.c sort.h thread.h config.h compress-io.h itest.c nocurses.h
|
||||||
|
|
||||||
mainsrc=main.c
|
mainsrc=main.c
|
||||||
|
|
||||||
|
@ -51,7 +61,7 @@ endif
|
||||||
|
|
||||||
scheme.o: itest.c
|
scheme.o: itest.c
|
||||||
scheme.o main.o: config.h
|
scheme.o main.o: config.h
|
||||||
${kernelobj}: system.h types.h version.h externs.h globals.h segment.h thread.h sort.h compress-io.h
|
${kernelobj}: system.h types.h version.h externs.h globals.h segment.h thread.h sort.h compress-io.h nocurses.h
|
||||||
${kernelobj}: ${Include}/equates.h ${Include}/scheme.h
|
${kernelobj}: ${Include}/equates.h ${Include}/scheme.h
|
||||||
${mainobj}: ${Include}/scheme.h
|
${mainobj}: ${Include}/scheme.h
|
||||||
${kernelobj}: ${zlibHeaderDep} ${LZ4HeaderDep}
|
${kernelobj}: ${zlibHeaderDep} ${LZ4HeaderDep}
|
||||||
|
|
13
c/Mf-i3fb
13
c/Mf-i3fb
|
@ -17,7 +17,7 @@ m = i3fb
|
||||||
Cpu = I386
|
Cpu = I386
|
||||||
|
|
||||||
mdinclude = -I/usr/local/include -I/usr/X11R6/include
|
mdinclude = -I/usr/local/include -I/usr/X11R6/include
|
||||||
mdclib = -L/usr/local/lib -liconv -lm -lncurses
|
mdclib = -L/usr/local/lib -liconv -lm ${ncursesLib} -lossp-uuid
|
||||||
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -31,11 +31,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
||||||
|
|
13
c/Mf-i3le
13
c/Mf-i3le
|
@ -16,7 +16,7 @@
|
||||||
m = i3le
|
m = i3le
|
||||||
Cpu = I386
|
Cpu = I386
|
||||||
|
|
||||||
mdclib = -lm -ldl -lncurses -lrt -luuid
|
mdclib = -lm -ldl ${ncursesLib} -lrt -luuid
|
||||||
C = ${CC} ${CPPFLAGS} -m32 -msse2 -Wpointer-arith -Wall -Wextra -Werror -Wno-implicit-fallthrough -O2 -fno-stack-protector ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -m32 -msse2 -Wpointer-arith -Wall -Wextra -Werror -Wno-implicit-fallthrough -O2 -fno-stack-protector ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -30,11 +30,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -melf_i386 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -melf_i386 -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
||||||
|
|
12
c/Mf-i3nb
12
c/Mf-i3nb
|
@ -31,11 +31,15 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
paxctl +m ${Scheme}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
||||||
|
|
28
c/Mf-i3nt
28
c/Mf-i3nt
|
@ -21,10 +21,11 @@ o = obj
|
||||||
mdobj=windows.$o
|
mdobj=windows.$o
|
||||||
mdsrc=windows.c Makefile.$m cs.ico scheme.rc make.bat
|
mdsrc=windows.c Makefile.$m cs.ico scheme.rc make.bat
|
||||||
mdclean=vs.bat make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe*
|
mdclean=vs.bat make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe*
|
||||||
|
cross=f
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Scheme}: make.bat
|
${Scheme}${cross:f=}: make.bat
|
||||||
cmd.exe /c make.bat
|
cmd.exe /c make.bat
|
||||||
cp ../bin/$m/scheme.exe ../bin/$m/petite.exe
|
cp ../bin/$m/scheme.exe ../bin/$m/petite.exe
|
||||||
cp ../bin/$m/scheme.pdb ../bin/$m/petite.pdb
|
cp ../bin/$m/scheme.pdb ../bin/$m/petite.pdb
|
||||||
|
@ -34,3 +35,28 @@ make.bat: vs.bat
|
||||||
echo 'set MAKEFLAGS=' >> $@
|
echo 'set MAKEFLAGS=' >> $@
|
||||||
echo 'vs.bat x86 && nmake /f Makefile.$m /nologo %*' >> $@
|
echo 'vs.bat x86 && nmake /f Makefile.$m /nologo %*' >> $@
|
||||||
chmod +x $@
|
chmod +x $@
|
||||||
|
|
||||||
|
# -------------------------------------------------------
|
||||||
|
# For cross-compilation, triggered by setting cross=t o=o
|
||||||
|
|
||||||
|
C = ${CC} ${CPPFLAGS} -O2 ${CFLAGS}
|
||||||
|
|
||||||
|
${Scheme}${cross:t=}: ${Main} ${Kernel} ${KernelLinkDeps}
|
||||||
|
$C -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS} -lshell32 -luser32 -lole32 -lrpcrt4 -luuid
|
||||||
|
|
||||||
|
.c.$o:
|
||||||
|
$C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c
|
||||||
|
|
||||||
|
${KernelLib}: ${kernelobj}
|
||||||
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
|
../zlib/configure.log:
|
||||||
|
echo "all:" >> ../zlib/Makefile
|
||||||
|
echo '\t$$(MAKE) -f win32/Makefile.gcc CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)" RC="$(WINDRES)"' >> ../zlib/Makefile
|
||||||
|
touch ../zlib/configure.log
|
||||||
|
|
||||||
|
../lz4/lib/liblz4.a: ${LZ4Sources}
|
||||||
|
(cd ../lz4/lib; CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)" ${MAKE} liblz4.a)
|
||||||
|
|
13
c/Mf-i3ob
13
c/Mf-i3ob
|
@ -17,7 +17,7 @@ m = i3ob
|
||||||
Cpu = I386
|
Cpu = I386
|
||||||
|
|
||||||
mdinclude = -I/usr/local/include -I/usr/X11R6/include
|
mdinclude = -I/usr/local/include -I/usr/X11R6/include
|
||||||
mdclib = -L/usr/local/lib -liconv -lm -lncurses
|
mdclib = -L/usr/local/lib -liconv -lm ${ncursesLib} -lossp-uuid
|
||||||
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Werror -O ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Werror -O ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -31,11 +31,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -Wl,--export-dynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -Wl,--export-dynamic -Wl,-zwxneeded -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
||||||
|
|
13
c/Mf-i3osx
13
c/Mf-i3osx
|
@ -16,7 +16,7 @@
|
||||||
m = i3osx
|
m = i3osx
|
||||||
Cpu = I386
|
Cpu = I386
|
||||||
|
|
||||||
mdclib = -liconv -lm -lncurses
|
mdclib = -liconv -lm ${ncursesLib}
|
||||||
C = ${CC} ${CPPFLAGS} -m32 -Wpointer-arith -Wall -Wextra -Wno-implicit-fallthrough -Werror -O2 -msse2 -I/opt/X11/include/ ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -m32 -Wpointer-arith -Wall -Wextra -Wno-implicit-fallthrough -Werror -O2 -msse2 -I/opt/X11/include/ ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -30,11 +30,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
||||||
|
|
13
c/Mf-i3qnx
13
c/Mf-i3qnx
|
@ -16,7 +16,7 @@
|
||||||
m = i3qnx
|
m = i3qnx
|
||||||
Cpu = I386
|
Cpu = I386
|
||||||
|
|
||||||
mdclib = -lm /usr/local/lib/libiconv.so -lsocket -lncurses
|
mdclib = -lm /usr/local/lib/libiconv.so -lsocket ${ncursesLib}
|
||||||
C = qcc ${CPPFLAGS} -m32 -Wpointer-arith -Wextra -Werror -O2 -N2048K ${CFLAGS}
|
C = qcc ${CPPFLAGS} -m32 -Wpointer-arith -Wextra -Werror -O2 -N2048K ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -31,11 +31,14 @@ LocalInclude = /usr/local/include
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -mi386nto -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -mi386nto -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -Wl,--export-dynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -Wl,--export-dynamic -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
||||||
|
|
13
c/Mf-i3s2
13
c/Mf-i3s2
|
@ -16,7 +16,7 @@
|
||||||
m = i3s2
|
m = i3s2
|
||||||
Cpu = I386
|
Cpu = I386
|
||||||
|
|
||||||
mdclib = -lnsl -ldl -lm -lcurses -lrt
|
mdclib = -lnsl -ldl -lm ${cursesLib} -lrt
|
||||||
C = ${CC} ${CFLAGS} -m32 -Wpointer-arith -Wextra -Werror -O ${CPPFLAGS}
|
C = ${CC} ${CFLAGS} -m32 -Wpointer-arith -Wextra -Werror -O ${CPPFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -30,11 +30,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -melf_i386 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -melf_i386 -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
||||||
|
|
13
c/Mf-ppc32le
13
c/Mf-ppc32le
|
@ -16,7 +16,7 @@
|
||||||
m = ppc32le
|
m = ppc32le
|
||||||
Cpu = PPC32
|
Cpu = PPC32
|
||||||
|
|
||||||
mdclib = -lm -ldl -lncurses -lrt -luuid
|
mdclib = -lm -ldl ${ncursesLib} -lrt -luuid
|
||||||
C = ${CC} ${CPPFLAGS} -m32 -Wpointer-arith -Wextra -Werror -Wno-implicit-fallthrough -O2 ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -m32 -Wpointer-arith -Wextra -Werror -Wno-implicit-fallthrough -O2 ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = ppc32.c
|
mdsrc = ppc32.c
|
||||||
|
@ -30,11 +30,14 @@ mdobj = ppc32.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
||||||
|
|
13
c/Mf-ta6fb
13
c/Mf-ta6fb
|
@ -17,7 +17,7 @@ m = ta6fb
|
||||||
Cpu = X86_64
|
Cpu = X86_64
|
||||||
|
|
||||||
mdinclude = -I/usr/local/include -I/usr/X11R6/include
|
mdinclude = -I/usr/local/include -I/usr/X11R6/include
|
||||||
mdclib = -L/usr/local/lib -liconv -lm -lncurses -lpthread
|
mdclib = -L/usr/local/lib -liconv -lm ${ncursesLib} -lpthread -lossp-uuid
|
||||||
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -31,11 +31,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
||||||
|
|
13
c/Mf-ta6le
13
c/Mf-ta6le
|
@ -16,7 +16,7 @@
|
||||||
m = ta6le
|
m = ta6le
|
||||||
Cpu = X86_64
|
Cpu = X86_64
|
||||||
|
|
||||||
mdclib = -lm -ldl -lncurses -lpthread -lrt -luuid
|
mdclib = -lm -ldl ${ncursesLib} -lpthread -lrt -luuid
|
||||||
C = ${CC} ${CPPFLAGS} -m64 -msse2 -Wpointer-arith -Wall -Wextra -Werror -Wno-implicit-fallthrough -O2 -D_REENTRANT -pthread ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -m64 -msse2 -Wpointer-arith -Wall -Wextra -Werror -Wno-implicit-fallthrough -O2 -D_REENTRANT -pthread ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -30,11 +30,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -melf_x86_64 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -melf_x86_64 -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
||||||
|
|
12
c/Mf-ta6nb
12
c/Mf-ta6nb
|
@ -31,11 +31,15 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
paxctl +m ${Scheme}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
||||||
|
|
28
c/Mf-ta6nt
28
c/Mf-ta6nt
|
@ -21,10 +21,11 @@ o = obj
|
||||||
mdobj=windows.$o
|
mdobj=windows.$o
|
||||||
mdsrc=windows.c Makefile.$m cs.ico scheme.rc make.bat
|
mdsrc=windows.c Makefile.$m cs.ico scheme.rc make.bat
|
||||||
mdclean=vs.bat make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe*
|
mdclean=vs.bat make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe*
|
||||||
|
cross=f
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Scheme}: make.bat
|
${Scheme}${cross:f=}: make.bat
|
||||||
cmd.exe /c make.bat
|
cmd.exe /c make.bat
|
||||||
cp ../bin/$m/scheme.exe ../bin/$m/petite.exe
|
cp ../bin/$m/scheme.exe ../bin/$m/petite.exe
|
||||||
cp ../bin/$m/scheme.pdb ../bin/$m/petite.pdb
|
cp ../bin/$m/scheme.pdb ../bin/$m/petite.pdb
|
||||||
|
@ -34,3 +35,28 @@ make.bat: vs.bat
|
||||||
echo 'set MAKEFLAGS=' >> $@
|
echo 'set MAKEFLAGS=' >> $@
|
||||||
echo 'vs.bat amd64 && nmake /f Makefile.$m /nologo %*' >> $@
|
echo 'vs.bat amd64 && nmake /f Makefile.$m /nologo %*' >> $@
|
||||||
chmod +x $@
|
chmod +x $@
|
||||||
|
|
||||||
|
# -------------------------------------------------------
|
||||||
|
# For cross-compilation, triggered by setting cross=t o=o
|
||||||
|
|
||||||
|
C = ${CC} ${CPPFLAGS} -O2 ${CFLAGS}
|
||||||
|
|
||||||
|
${Scheme}${cross:t=}: ${Main} ${Kernel} ${KernelLinkDeps}
|
||||||
|
$C -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS} -lshell32 -luser32 -lole32 -lrpcrt4 -luuid
|
||||||
|
|
||||||
|
.c.$o:
|
||||||
|
$C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c
|
||||||
|
|
||||||
|
${KernelLib}: ${kernelobj}
|
||||||
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
|
../zlib/configure.log:
|
||||||
|
echo "all:" >> ../zlib/Makefile
|
||||||
|
echo '\t$$(MAKE) -f win32/Makefile.gcc CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)" RC="$(WINDRES)"' >> ../zlib/Makefile
|
||||||
|
touch ../zlib/configure.log
|
||||||
|
|
||||||
|
../lz4/lib/liblz4.a: ${LZ4Sources}
|
||||||
|
(cd ../lz4/lib; CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)" ${MAKE} liblz4.a)
|
||||||
|
|
13
c/Mf-ta6ob
13
c/Mf-ta6ob
|
@ -17,7 +17,7 @@ m = ta6ob
|
||||||
Cpu = X86_64
|
Cpu = X86_64
|
||||||
|
|
||||||
mdinclude = -I/usr/local/include -I/usr/X11R6/include
|
mdinclude = -I/usr/local/include -I/usr/X11R6/include
|
||||||
mdclib = -L/usr/local/lib -liconv -lm -lncurses -lpthread
|
mdclib = -L/usr/local/lib -liconv -lm ${ncursesLib} -lpthread -lossp-uuid
|
||||||
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Werror -O2 -D_REENTRANT -pthread ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Werror -O2 -D_REENTRANT -pthread ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -31,11 +31,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -Wl,--export-dynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -Wl,--export-dynamic -Wl,-zwxneeded -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
||||||
|
|
13
c/Mf-ta6osx
13
c/Mf-ta6osx
|
@ -16,7 +16,7 @@
|
||||||
m = ta6osx
|
m = ta6osx
|
||||||
Cpu = X86_64
|
Cpu = X86_64
|
||||||
|
|
||||||
mdclib = -liconv -lm -lncurses
|
mdclib = -liconv -lm ${ncursesLib}
|
||||||
C = ${CC} ${CPPFLAGS} -m64 -Wpointer-arith -Wall -Wextra -Wno-implicit-fallthrough -Werror -O2 -I/opt/X11/include/ ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -m64 -Wpointer-arith -Wall -Wextra -Wno-implicit-fallthrough -Werror -O2 -I/opt/X11/include/ ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -30,11 +30,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
||||||
|
|
13
c/Mf-ta6s2
13
c/Mf-ta6s2
|
@ -16,7 +16,7 @@
|
||||||
m = ta6s2
|
m = ta6s2
|
||||||
Cpu = X86_64
|
Cpu = X86_64
|
||||||
|
|
||||||
mdclib = -lnsl -ldl -lm -lpthread -lcurses -lrt
|
mdclib = -lnsl -ldl -lm -lpthread ${cursesLib} -lrt
|
||||||
C = ${CC} ${CPPFLAGS} -m64 -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -m64 -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -30,11 +30,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -melf_x86_64 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -melf_x86_64 -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m64" ./configure --64)
|
||||||
|
|
13
c/Mf-ti3fb
13
c/Mf-ti3fb
|
@ -17,7 +17,7 @@ m = ti3fb
|
||||||
Cpu = I386
|
Cpu = I386
|
||||||
|
|
||||||
mdinclude = -I/usr/local/include -I/usr/X11R6/include
|
mdinclude = -I/usr/local/include -I/usr/X11R6/include
|
||||||
mdclib = -L/usr/local/lib -liconv -lm -lncurses -lpthread
|
mdclib = -L/usr/local/lib -liconv -lm ${ncursesLib} -lpthread -lossp-uuid
|
||||||
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT -pthread ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -31,11 +31,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
||||||
|
|
13
c/Mf-ti3le
13
c/Mf-ti3le
|
@ -16,7 +16,7 @@
|
||||||
m = ti3le
|
m = ti3le
|
||||||
Cpu = I386
|
Cpu = I386
|
||||||
|
|
||||||
mdclib = -lm -ldl -lncurses -lpthread -lrt -luuid
|
mdclib = -lm -ldl ${ncursesLib} -lpthread -lrt -luuid
|
||||||
C = ${CC} ${CPPFLAGS} -m32 -msse2 -Wpointer-arith -Wall -Wextra -Werror -Wno-implicit-fallthrough -O2 -D_REENTRANT -pthread ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -m32 -msse2 -Wpointer-arith -Wall -Wextra -Werror -Wno-implicit-fallthrough -O2 -D_REENTRANT -pthread ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -30,11 +30,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -melf_i386 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -melf_i386 -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
||||||
|
|
12
c/Mf-ti3nb
12
c/Mf-ti3nb
|
@ -31,11 +31,15 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -m elf_i386 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -m elf_i386 -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
paxctl +m ${Scheme}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
||||||
|
|
28
c/Mf-ti3nt
28
c/Mf-ti3nt
|
@ -21,10 +21,11 @@ o = obj
|
||||||
mdobj=windows.$o
|
mdobj=windows.$o
|
||||||
mdsrc=windows.c Makefile.$m cs.ico scheme.rc make.bat
|
mdsrc=windows.c Makefile.$m cs.ico scheme.rc make.bat
|
||||||
mdclean=vs.bat make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe*
|
mdclean=vs.bat make.bat scheme.res ../bin/$m/*.exp mtscheme.exe* mdscheme.exe*
|
||||||
|
cross=f
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Scheme}: make.bat
|
${Scheme}${cross:f=}: make.bat
|
||||||
cmd.exe /c make.bat
|
cmd.exe /c make.bat
|
||||||
cp ../bin/$m/scheme.exe ../bin/$m/petite.exe
|
cp ../bin/$m/scheme.exe ../bin/$m/petite.exe
|
||||||
cp ../bin/$m/scheme.pdb ../bin/$m/petite.pdb
|
cp ../bin/$m/scheme.pdb ../bin/$m/petite.pdb
|
||||||
|
@ -34,3 +35,28 @@ make.bat: vs.bat
|
||||||
echo 'set MAKEFLAGS=' >> $@
|
echo 'set MAKEFLAGS=' >> $@
|
||||||
echo 'vs.bat x86 && nmake /f Makefile.$m /nologo %*' >> $@
|
echo 'vs.bat x86 && nmake /f Makefile.$m /nologo %*' >> $@
|
||||||
chmod +x $@
|
chmod +x $@
|
||||||
|
|
||||||
|
# -------------------------------------------------------
|
||||||
|
# For cross-compilation, triggered by setting cross=t o=o
|
||||||
|
|
||||||
|
C = ${CC} ${CPPFLAGS} -O2 ${CFLAGS} -D__MINGW_USE_VC2005_COMPAT
|
||||||
|
|
||||||
|
${Scheme}${cross:t=}: ${Main} ${Kernel} ${KernelLinkDeps}
|
||||||
|
$C -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS} -lshell32 -luser32 -lole32 -lrpcrt4 -luuid
|
||||||
|
|
||||||
|
.c.$o:
|
||||||
|
$C -c -D${Cpu} -I${Include} ${zlibInc} ${LZ4Inc} $*.c
|
||||||
|
|
||||||
|
${KernelLib}: ${kernelobj}
|
||||||
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
|
../zlib/configure.log:
|
||||||
|
echo "all:" >> ../zlib/Makefile
|
||||||
|
echo '\t$$(MAKE) -f win32/Makefile.gcc CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)" RC="$(WINDRES)"' >> ../zlib/Makefile
|
||||||
|
touch ../zlib/configure.log
|
||||||
|
|
||||||
|
../lz4/lib/liblz4.a: ${LZ4Sources}
|
||||||
|
(cd ../lz4/lib; CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)" ${MAKE} liblz4.a)
|
||||||
|
|
13
c/Mf-ti3ob
13
c/Mf-ti3ob
|
@ -17,7 +17,7 @@ m = ti3ob
|
||||||
Cpu = I386
|
Cpu = I386
|
||||||
|
|
||||||
mdinclude = -I/usr/local/include -I/usr/X11R6/include
|
mdinclude = -I/usr/local/include -I/usr/X11R6/include
|
||||||
mdclib = -L/usr/local/lib -liconv -lm -lncurses -lpthread
|
mdclib = -L/usr/local/lib -liconv -lm ${ncursesLib} -lpthread -lossp-uuid
|
||||||
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Werror -O2 -D_REENTRANT -pthread ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -Wpointer-arith -Werror -O2 -D_REENTRANT -pthread ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -31,11 +31,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -Wl,--export-dynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -Wl,--export-dynamic -Wl,-zwxneeded -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
||||||
|
|
13
c/Mf-ti3osx
13
c/Mf-ti3osx
|
@ -16,7 +16,7 @@
|
||||||
m = ti3osx
|
m = ti3osx
|
||||||
Cpu = I386
|
Cpu = I386
|
||||||
|
|
||||||
mdclib = -liconv -lm -lncurses
|
mdclib = -liconv -lm ${ncursesLib}
|
||||||
C = ${CC} ${CPPFLAGS} -m32 -Wpointer-arith -Wall -Wextra -Wno-implicit-fallthrough -Werror -O2 -msse2 -I/opt/X11/include/ ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -m32 -Wpointer-arith -Wall -Wextra -Wno-implicit-fallthrough -Werror -O2 -msse2 -I/opt/X11/include/ ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -30,11 +30,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
||||||
|
|
13
c/Mf-ti3s2
13
c/Mf-ti3s2
|
@ -16,7 +16,7 @@
|
||||||
m = ti3s2
|
m = ti3s2
|
||||||
Cpu = I386
|
Cpu = I386
|
||||||
|
|
||||||
mdclib = -lnsl -ldl -lm -lpthread -lcurses -lrt
|
mdclib = -lnsl -ldl -lm -lpthread ${cursesLib} -lrt
|
||||||
C = ${CC} ${CPPFLAGS} -m32 -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -m32 -Wpointer-arith -Wextra -Werror -O2 -D_REENTRANT ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = i3le.c
|
mdsrc = i3le.c
|
||||||
|
@ -30,11 +30,14 @@ mdobj = i3le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -melf_i386 -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -melf_i386 -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
m = tppc32le
|
m = tppc32le
|
||||||
Cpu = PPC32
|
Cpu = PPC32
|
||||||
|
|
||||||
mdclib = -lm -ldl -lncurses -lpthread -lrt -luuid
|
mdclib = -lm -ldl ${ncursesLib} -lpthread -lrt -luuid
|
||||||
C = ${CC} ${CPPFLAGS} -m32 -Wpointer-arith -Wextra -Werror -Wno-implicit-fallthrough -O2 -D_REENTRANT -pthread ${CFLAGS}
|
C = ${CC} ${CPPFLAGS} -m32 -Wpointer-arith -Wextra -Werror -Wno-implicit-fallthrough -O2 -D_REENTRANT -pthread ${CFLAGS}
|
||||||
o = o
|
o = o
|
||||||
mdsrc = ppc32le.c
|
mdsrc = ppc32le.c
|
||||||
|
@ -30,11 +30,14 @@ mdobj = ppc32le.o
|
||||||
|
|
||||||
include Mf-base
|
include Mf-base
|
||||||
|
|
||||||
${Kernel}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
${KernelO}: ${kernelobj} ${zlibDep} ${LZ4Dep}
|
||||||
ld -r -X -o ${Kernel} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
${LD} -r -X -o ${KernelO} ${kernelobj} ${zlibLib} ${LZ4Lib}
|
||||||
|
|
||||||
${Scheme}: ${Kernel} ${Main}
|
${KernelLib}: ${kernelobj}
|
||||||
$C -rdynamic -o ${Scheme} ${Kernel} ${Main} ${mdclib} ${LDFLAGS}
|
${AR} ${ARFLAGS} ${KernelLib} ${kernelobj}
|
||||||
|
|
||||||
|
${Scheme}: ${Kernel} ${KernelLinkDeps} ${Main}
|
||||||
|
$C -rdynamic -o ${Scheme} ${Main} ${Kernel} ${mdclib} ${KernelLinkLibs} ${LDFLAGS}
|
||||||
|
|
||||||
../zlib/configure.log:
|
../zlib/configure.log:
|
||||||
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
(cd ../zlib; CFLAGS="${CFLAGS} -m32" ./configure)
|
||||||
|
|
30
c/build.bat
Normal file
30
c/build.bat
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
set M=%1
|
||||||
|
set WORKAREA=%M%
|
||||||
|
|
||||||
|
if "%WORKAREA%"=="" goto needargument
|
||||||
|
|
||||||
|
xcopy /s /i /y c %WORKAREA%\c
|
||||||
|
xcopy /s /i /y s %WORKAREA%\s
|
||||||
|
xcopy /s /i /y boot %WORKAREA%\boot
|
||||||
|
xcopy /s /i /y zlib %WORKAREA%\zlib
|
||||||
|
xcopy /s /i /y lz4 %WORKAREA%\lz4
|
||||||
|
|
||||||
|
mkdir %WORKAREA%\bin\%M%
|
||||||
|
|
||||||
|
echo #define SCHEME_SCRIPT "scheme-script" > %WORKAREA%\c\config.h
|
||||||
|
|
||||||
|
cd %WORKAREA%\c
|
||||||
|
nmake Makefile.%M%
|
||||||
|
cd ..\..
|
||||||
|
|
||||||
|
goto donebuilding
|
||||||
|
|
||||||
|
:needargument
|
||||||
|
|
||||||
|
echo Please supply the machine name as an argument
|
||||||
|
exit /B 1
|
||||||
|
|
||||||
|
:donebuilding
|
|
@ -528,7 +528,9 @@ static void s_ee_write_char(wchar_t c) {
|
||||||
|
|
||||||
#else /* WIN32 */
|
#else /* WIN32 */
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#ifdef SOLARIS
|
#ifdef DISABLE_CURSES
|
||||||
|
#include "nocurses.h"
|
||||||
|
#elif defined(SOLARIS)
|
||||||
#define NCURSES_CONST
|
#define NCURSES_CONST
|
||||||
#define CHTYPE int
|
#define CHTYPE int
|
||||||
#include </usr/include/curses.h>
|
#include </usr/include/curses.h>
|
||||||
|
@ -547,7 +549,7 @@ static void s_ee_write_char(wchar_t c) {
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#ifndef __GLIBC__
|
#if !defined(__GLIBC__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
|
||||||
#include <xlocale.h>
|
#include <xlocale.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -555,6 +557,17 @@ static void s_ee_write_char(wchar_t c) {
|
||||||
#define HANDLE_SIGWINCH
|
#define HANDLE_SIGWINCH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_MBRTOWC_L
|
||||||
|
static locale_t the_locale;
|
||||||
|
static locale_t uselocale_alt(locale_t l) {
|
||||||
|
locale_t old = the_locale;
|
||||||
|
the_locale = l;
|
||||||
|
return old;
|
||||||
|
}
|
||||||
|
# define uselocale(v) uselocale_alt(v)
|
||||||
|
# define mbrtowc(pwc, s, n, ps) mbrtowc_l(pwc, s, n, ps, the_locale)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* locally defined functions */
|
/* locally defined functions */
|
||||||
static int eeputc(tputsputcchar c);
|
static int eeputc(tputsputcchar c);
|
||||||
#ifdef HANDLE_SIGWINCH
|
#ifdef HANDLE_SIGWINCH
|
||||||
|
|
15
c/externs.h
15
c/externs.h
|
@ -314,13 +314,13 @@ extern void S_handle_overflow PROTO((void));
|
||||||
extern void S_handle_overflood PROTO((void));
|
extern void S_handle_overflood PROTO((void));
|
||||||
extern void S_handle_apply_overflood PROTO((void));
|
extern void S_handle_apply_overflood PROTO((void));
|
||||||
extern void S_overflow PROTO((ptr tc, iptr frame_request));
|
extern void S_overflow PROTO((ptr tc, iptr frame_request));
|
||||||
extern void S_error_reset PROTO((const char *s));
|
extern NORETURN void S_error_reset PROTO((const char *s));
|
||||||
extern NORETURN void S_error_abort PROTO((const char *s));
|
extern NORETURN void S_error_abort PROTO((const char *s));
|
||||||
extern NORETURN void S_abnormal_exit PROTO((void));
|
extern NORETURN void S_abnormal_exit PROTO((void));
|
||||||
extern void S_error PROTO((const char *who, const char *s));
|
extern NORETURN void S_error PROTO((const char *who, const char *s));
|
||||||
extern void S_error1 PROTO((const char *who, const char *s, ptr x));
|
extern NORETURN void S_error1 PROTO((const char *who, const char *s, ptr x));
|
||||||
extern void S_error2 PROTO((const char *who, const char *s, ptr x, ptr y));
|
extern NORETURN void S_error2 PROTO((const char *who, const char *s, ptr x, ptr y));
|
||||||
extern void S_error3 PROTO((const char *who, const char *s, ptr x, ptr y, ptr z));
|
extern NORETURN void S_error3 PROTO((const char *who, const char *s, ptr x, ptr y, ptr z));
|
||||||
extern NORETURN void S_boot_error PROTO((const ptr who, ptr s, ptr args));
|
extern NORETURN void S_boot_error PROTO((const ptr who, ptr s, ptr args));
|
||||||
extern void S_handle_docall_error PROTO((void));
|
extern void S_handle_docall_error PROTO((void));
|
||||||
extern void S_handle_arg_error PROTO((void));
|
extern void S_handle_arg_error PROTO((void));
|
||||||
|
@ -329,7 +329,7 @@ extern void S_handle_values_error PROTO((void));
|
||||||
extern void S_handle_mvlet_error PROTO((void));
|
extern void S_handle_mvlet_error PROTO((void));
|
||||||
extern void S_register_scheme_signal PROTO((iptr sig));
|
extern void S_register_scheme_signal PROTO((iptr sig));
|
||||||
extern void S_fire_collector PROTO((void));
|
extern void S_fire_collector PROTO((void));
|
||||||
extern void S_noncontinuable_interrupt PROTO((void));
|
extern NORETURN void S_noncontinuable_interrupt PROTO((void));
|
||||||
extern void S_schsig_init PROTO((void));
|
extern void S_schsig_init PROTO((void));
|
||||||
#ifdef DEFINE_MATHERR
|
#ifdef DEFINE_MATHERR
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
@ -402,3 +402,6 @@ extern char *S_windows_getcwd(char *buffer, int maxlen);
|
||||||
/* expeditor.c */
|
/* expeditor.c */
|
||||||
extern void S_expeditor_init PROTO((void));
|
extern void S_expeditor_init PROTO((void));
|
||||||
#endif /* FEATURE_EXPEDITOR */
|
#endif /* FEATURE_EXPEDITOR */
|
||||||
|
|
||||||
|
/* statics.c */
|
||||||
|
extern void scheme_statics();
|
||||||
|
|
|
@ -63,7 +63,7 @@ EXTERN ptr S_foreign_dynamic;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* globals that do need to be preserved in a saved heap */
|
/* globals that do need to be preserved in a saved heap */
|
||||||
EXTERN struct {
|
EXTERN struct S_G_struct {
|
||||||
/* scheme.c */
|
/* scheme.c */
|
||||||
double thread_context[size_tc / sizeof(double)];
|
double thread_context[size_tc / sizeof(double)];
|
||||||
ptr active_threads_id;
|
ptr active_threads_id;
|
||||||
|
|
5
c/main.c
5
c/main.c
|
@ -59,12 +59,13 @@ static const char *path_last(const char *p) {
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#if defined(WIN32) && !defined(__MINGW32__)
|
||||||
#define GETENV Sgetenv
|
#define GETENV Sgetenv
|
||||||
#define GETENV_FREE free
|
#define GETENV_FREE free
|
||||||
int wmain(int argc, wchar_t* wargv[], wchar_t* wenvp[]) {
|
int wmain(int argc, wchar_t* wargv[], wchar_t* wenvp[]) {
|
||||||
const char** argv = (char**)malloc((argc + 1) * sizeof(char*));
|
const char** argv = (char**)malloc((argc + 1) * sizeof(char*));
|
||||||
for (int i = 0; i < argc; i++) {
|
int i;
|
||||||
|
for (i = 0; i < argc; i++) {
|
||||||
wchar_t* warg = wargv[i];
|
wchar_t* warg = wargv[i];
|
||||||
if (NULL == (argv[i] = Swide_to_utf8(warg))) {
|
if (NULL == (argv[i] = Swide_to_utf8(warg))) {
|
||||||
fprintf_s(stderr, "Invalid argument: %S\n", warg);
|
fprintf_s(stderr, "Invalid argument: %S\n", warg);
|
||||||
|
|
24
c/nocurses.h
Normal file
24
c/nocurses.h
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#ifndef ERR
|
||||||
|
# define ERR -1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define setupterm(a, b, e) (*(e) = 0, ERR)
|
||||||
|
#define tputs(c, x, f) (f(c))
|
||||||
|
|
||||||
|
#define lines 0
|
||||||
|
#define columns 0
|
||||||
|
|
||||||
|
#define cursor_left 0
|
||||||
|
#define cursor_right 0
|
||||||
|
#define cursor_up 0
|
||||||
|
#define cursor_down 0
|
||||||
|
#define enter_am_mode 0
|
||||||
|
#define exit_am_mode 0
|
||||||
|
#define clr_eos 0
|
||||||
|
#define clr_eol 0
|
||||||
|
#define clear_screen 0
|
||||||
|
#define carriage_return 0
|
||||||
|
#define bell 0
|
||||||
|
#define scroll_reverse 0
|
||||||
|
#define auto_right_margin 0
|
||||||
|
#define eat_newline_glitch 0
|
|
@ -39,11 +39,16 @@ static void main_init PROTO((void));
|
||||||
static void idiot_checks PROTO((void));
|
static void idiot_checks PROTO((void));
|
||||||
static INT run_script PROTO((const char *who, const char *scriptfile, INT argc, const char *argv[], IBOOL programp));
|
static INT run_script PROTO((const char *who, const char *scriptfile, INT argc, const char *argv[], IBOOL programp));
|
||||||
|
|
||||||
|
extern void scheme_include(void);
|
||||||
|
|
||||||
static void main_init() {
|
static void main_init() {
|
||||||
ptr tc = get_thread_context();
|
ptr tc = get_thread_context();
|
||||||
ptr p;
|
ptr p;
|
||||||
INT i;
|
INT i;
|
||||||
|
|
||||||
|
/* create dependency for linker */
|
||||||
|
scheme_statics();
|
||||||
|
|
||||||
/* force thread inline allocation to go through find_room until ready */
|
/* force thread inline allocation to go through find_room until ready */
|
||||||
AP(tc) = (ptr)0;
|
AP(tc) = (ptr)0;
|
||||||
EAP(tc) = (ptr)0;
|
EAP(tc) = (ptr)0;
|
||||||
|
@ -385,7 +390,7 @@ void S_generic_invoke(tc, code) ptr tc; ptr code; {
|
||||||
hdr.env = (I32)0;
|
hdr.env = (I32)0;
|
||||||
p = (ugly)((I32)&hdr + 2);
|
p = (ugly)((I32)&hdr + 2);
|
||||||
p(tc);
|
p(tc);
|
||||||
#elif defined(WIN32)
|
#elif defined(WIN32) && !defined(__MINGW32__)
|
||||||
__try {
|
__try {
|
||||||
(*((void (*) PROTO((ptr)))(void *)&CODEIT(code,0)))(tc);
|
(*((void (*) PROTO((ptr)))(void *)&CODEIT(code,0)))(tc);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
static void S_promote_to_multishot PROTO((ptr k));
|
static void S_promote_to_multishot PROTO((ptr k));
|
||||||
static void split PROTO((ptr k, ptr *s));
|
static void split PROTO((ptr k, ptr *s));
|
||||||
static void reset_scheme PROTO((void));
|
static void reset_scheme PROTO((void));
|
||||||
static void do_error PROTO((iptr type, const char *who, const char *s, ptr args));
|
static NORETURN void do_error PROTO((iptr type, const char *who, const char *s, ptr args));
|
||||||
static void handle_call_error PROTO((ptr tc, iptr type, ptr x));
|
static void handle_call_error PROTO((ptr tc, iptr type, ptr x));
|
||||||
static void init_signal_handlers PROTO((void));
|
static void init_signal_handlers PROTO((void));
|
||||||
static void keyboard_interrupt PROTO((ptr tc));
|
static void keyboard_interrupt PROTO((ptr tc));
|
||||||
|
|
|
@ -15,8 +15,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
# ifndef __MINGW32__
|
||||||
# undef FORCEINLINE
|
# undef FORCEINLINE
|
||||||
# define FORCEINLINE static __forceinline
|
# define FORCEINLINE static __forceinline
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
#define FORCEINLINE static inline
|
#define FORCEINLINE static inline
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -16,3 +16,8 @@
|
||||||
|
|
||||||
#define EXTERN
|
#define EXTERN
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
|
/* The C linker may require a reference to a function to pull in all
|
||||||
|
the common declarations. */
|
||||||
|
#include "externs.h"
|
||||||
|
void scheme_statics() { }
|
||||||
|
|
51
c/stats.c
51
c/stats.c
|
@ -65,7 +65,50 @@ ptr S_unique_id() {
|
||||||
Sunsigned32(u.foo[3]))));
|
Sunsigned32(u.foo[3]))));
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* WIN32 */
|
#elif defined(USE_OSSP_UUID) /* WIN32 */
|
||||||
|
|
||||||
|
#include <ossp/uuid.h>
|
||||||
|
|
||||||
|
ptr S_unique_id() {
|
||||||
|
uuid_t *uuid;
|
||||||
|
U32 bin[4];
|
||||||
|
void *bin_ptr = &bin;
|
||||||
|
size_t bin_len = sizeof(bin);
|
||||||
|
|
||||||
|
uuid_create(&uuid);
|
||||||
|
uuid_make(uuid, UUID_MAKE_V4);
|
||||||
|
uuid_export(uuid, UUID_FMT_BIN, &bin_ptr, &bin_len);
|
||||||
|
uuid_destroy(uuid);
|
||||||
|
|
||||||
|
return S_add(S_ash(Sunsigned32(bin[0]), Sinteger(8*3*sizeof(U32))),
|
||||||
|
S_add(S_ash(Sunsigned32(bin[1]), Sinteger(8*2*sizeof(U32))),
|
||||||
|
S_add(S_ash(Sunsigned32(bin[2]), Sinteger(8*sizeof(U32))),
|
||||||
|
Sunsigned32(bin[3]))));
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif defined(USE_NETBSD_UUID) /* USE_OSSP_UUID */
|
||||||
|
|
||||||
|
#include <uuid.h>
|
||||||
|
|
||||||
|
ptr S_unique_id() {
|
||||||
|
uuid_t uuid;
|
||||||
|
uint32_t status;
|
||||||
|
unsigned char bin[16];
|
||||||
|
ptr n;
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
|
uuid_create(&uuid, &status);
|
||||||
|
uuid_enc_le(bin, &uuid);
|
||||||
|
|
||||||
|
n = Sinteger(0);
|
||||||
|
for (i = 0; i < sizeof(bin); i++) {
|
||||||
|
n = S_add(n, S_ash(Sinteger(bin[i]), Sinteger(8*i)));
|
||||||
|
}
|
||||||
|
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else /* USE_NETBSD_UUID */
|
||||||
|
|
||||||
#include <uuid/uuid.h>
|
#include <uuid/uuid.h>
|
||||||
|
|
||||||
|
@ -210,7 +253,8 @@ void S_gettime(INT typeno, struct timespec *tp) {
|
||||||
#ifdef CLOCK_THREAD_CPUTIME_ID
|
#ifdef CLOCK_THREAD_CPUTIME_ID
|
||||||
if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, tp) == 0) return;
|
if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, tp) == 0) return;
|
||||||
#endif
|
#endif
|
||||||
/* fall through to utc case in case no thread timer */
|
/* fall through */
|
||||||
|
/* to utc case in case no thread timer */
|
||||||
case time_process:
|
case time_process:
|
||||||
#ifdef CLOCK_PROCESS_CPUTIME_ID
|
#ifdef CLOCK_PROCESS_CPUTIME_ID
|
||||||
if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, tp) == 0) return;
|
if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, tp) == 0) return;
|
||||||
|
@ -240,7 +284,8 @@ void S_gettime(INT typeno, struct timespec *tp) {
|
||||||
#ifdef CLOCK_HIGHRES
|
#ifdef CLOCK_HIGHRES
|
||||||
if (clock_gettime(CLOCK_HIGHRES, tp) == 0) return;
|
if (clock_gettime(CLOCK_HIGHRES, tp) == 0) return;
|
||||||
#endif
|
#endif
|
||||||
/* fall through to utc case in case no monotonic timer */
|
/* fall through */
|
||||||
|
/* to utc case in case no monotonic timer */
|
||||||
case time_utc:
|
case time_utc:
|
||||||
#ifdef CLOCK_REALTIME_HR
|
#ifdef CLOCK_REALTIME_HR
|
||||||
if (clock_gettime(CLOCK_REALTIME_HR, tp) == 0) return;
|
if (clock_gettime(CLOCK_REALTIME_HR, tp) == 0) return;
|
||||||
|
|
|
@ -17,6 +17,10 @@
|
||||||
#include "scheme.h"
|
#include "scheme.h"
|
||||||
#include "equates.h"
|
#include "equates.h"
|
||||||
#ifdef FEATURE_WINDOWS
|
#ifdef FEATURE_WINDOWS
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
# undef WINVER
|
||||||
|
# undef _WIN32_WINNT
|
||||||
|
#endif
|
||||||
#define WINVER 0x0601 // Windows 7
|
#define WINVER 0x0601 // Windows 7
|
||||||
#define _WIN32_WINNT WINVER
|
#define _WIN32_WINNT WINVER
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
|
@ -433,6 +433,10 @@ IBOOL S_condition_wait(c, m, t) s_thread_cond_t *c; scheme_mutex_t *m; ptr t; {
|
||||||
typeno = Sinteger32_value(Srecord_ref(t,0));
|
typeno = Sinteger32_value(Srecord_ref(t,0));
|
||||||
sec = Sinteger32_value(Scar(Srecord_ref(t,1)));
|
sec = Sinteger32_value(Scar(Srecord_ref(t,1)));
|
||||||
nsec = Sinteger32_value(Scdr(Srecord_ref(t,1)));
|
nsec = Sinteger32_value(Scdr(Srecord_ref(t,1)));
|
||||||
|
} else {
|
||||||
|
typeno = 0;
|
||||||
|
sec = 0;
|
||||||
|
nsec = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c == &S_collect_cond || DISABLECOUNT(tc) == 0) {
|
if (c == &S_collect_cond || DISABLECOUNT(tc) == 0) {
|
||||||
|
|
12
c/types.h
12
c/types.h
|
@ -338,11 +338,23 @@ typedef struct {
|
||||||
#define tc_mutex_release() {}
|
#define tc_mutex_release() {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
/* With MinGW on 64-bit Windows, setjmp/longjmp is not reliable. Using
|
||||||
|
__builtin_setjmp/__builtin_longjmp is reliable, but
|
||||||
|
__builtin_longjmp requires 1 as its second argument. So, allocate
|
||||||
|
room in the buffer for a return value. */
|
||||||
|
# define JMPBUF_RET(jb) (*(int *)((char *)(jb)+sizeof(jmp_buf)))
|
||||||
|
# define CREATEJMPBUF() malloc(sizeof(jmp_buf)+sizeof(int))
|
||||||
|
# define FREEJMPBUF(jb) free(jb)
|
||||||
|
# define SETJMP(jb) (JMPBUF_RET(jb) = 0, __builtin_setjmp(jb), JMPBUF_RET(jb))
|
||||||
|
# define LONGJMP(jb,n) (JMPBUF_RET(jb) = n, __builtin_longjmp(jb, 1))
|
||||||
|
#else
|
||||||
/* assuming malloc will give us required alignment */
|
/* assuming malloc will give us required alignment */
|
||||||
# define CREATEJMPBUF() malloc(sizeof(jmp_buf))
|
# define CREATEJMPBUF() malloc(sizeof(jmp_buf))
|
||||||
# define FREEJMPBUF(jb) free(jb)
|
# define FREEJMPBUF(jb) free(jb)
|
||||||
# define SETJMP(jb) _setjmp(jb)
|
# define SETJMP(jb) _setjmp(jb)
|
||||||
# define LONGJMP(jb,n) _longjmp(jb, n)
|
# define LONGJMP(jb,n) _longjmp(jb, n)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DOUNDERFLOW\
|
#define DOUNDERFLOW\
|
||||||
&CODEIT(CLOSCODE(S_lookup_library_entry(library_dounderflow, 1)),size_rp_header)
|
&CODEIT(CLOSCODE(S_lookup_library_entry(library_dounderflow, 1)),size_rp_header)
|
||||||
|
|
14
c/version.h
14
c/version.h
|
@ -152,6 +152,7 @@ typedef int tputsputcchar;
|
||||||
#define NSECMTIME(sb) (sb).st_mtimespec.tv_nsec
|
#define NSECMTIME(sb) (sb).st_mtimespec.tv_nsec
|
||||||
#define ICONV_INBUF_TYPE char **
|
#define ICONV_INBUF_TYPE char **
|
||||||
#define UNUSED __attribute__((__unused__))
|
#define UNUSED __attribute__((__unused__))
|
||||||
|
#define USE_OSSP_UUID
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (machine_type == machine_type_i3nb || machine_type == machine_type_ti3nb || machine_type == machine_type_a6nb || machine_type == machine_type_ta6nb)
|
#if (machine_type == machine_type_i3nb || machine_type == machine_type_ti3nb || machine_type == machine_type_a6nb || machine_type == machine_type_ta6nb)
|
||||||
|
@ -169,6 +170,7 @@ typedef int tputsputcchar;
|
||||||
#define ARCHYPERBOLIC
|
#define ARCHYPERBOLIC
|
||||||
#define GETPAGESIZE() getpagesize()
|
#define GETPAGESIZE() getpagesize()
|
||||||
typedef char *memcpy_t;
|
typedef char *memcpy_t;
|
||||||
|
struct timespec;
|
||||||
#define MAKE_NAN(x) { x = 0.0; x = x / x; }
|
#define MAKE_NAN(x) { x = 0.0; x = x / x; }
|
||||||
#define GETWD(x) getcwd((x),PATH_MAX)
|
#define GETWD(x) getcwd((x),PATH_MAX)
|
||||||
typedef int tputsputcchar;
|
typedef int tputsputcchar;
|
||||||
|
@ -185,6 +187,8 @@ typedef int tputsputcchar;
|
||||||
#define NSECMTIME(sb) (sb).st_mtimespec.tv_nsec
|
#define NSECMTIME(sb) (sb).st_mtimespec.tv_nsec
|
||||||
#define ICONV_INBUF_TYPE const char **
|
#define ICONV_INBUF_TYPE const char **
|
||||||
#define UNUSED __attribute__((__unused__))
|
#define UNUSED __attribute__((__unused__))
|
||||||
|
#define USE_NETBSD_UUID
|
||||||
|
#define USE_MBRTOWC_L
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (machine_type == machine_type_i3nt || machine_type == machine_type_ti3nt || machine_type == machine_type_a6nt || machine_type == machine_type_ta6nt)
|
#if (machine_type == machine_type_i3nt || machine_type == machine_type_ti3nt || machine_type == machine_type_a6nt || machine_type == machine_type_ta6nt)
|
||||||
|
@ -199,11 +203,18 @@ typedef int tputsputcchar;
|
||||||
#define USE_VIRTUAL_ALLOC
|
#define USE_VIRTUAL_ALLOC
|
||||||
#define NAN_INCLUDE <math.h>
|
#define NAN_INCLUDE <math.h>
|
||||||
#define MAKE_NAN(x) { x = sqrt(-1.0); }
|
#define MAKE_NAN(x) { x = sqrt(-1.0); }
|
||||||
|
#ifndef PATH_MAX
|
||||||
# define PATH_MAX _MAX_PATH
|
# define PATH_MAX _MAX_PATH
|
||||||
|
#endif
|
||||||
typedef char *memcpy_t;
|
typedef char *memcpy_t;
|
||||||
|
struct timespec;
|
||||||
|
#ifndef __MINGW32__
|
||||||
# define _setjmp setjmp
|
# define _setjmp setjmp
|
||||||
# define _longjmp longjmp
|
# define _longjmp longjmp
|
||||||
|
#endif
|
||||||
|
#ifndef __MINGW32__
|
||||||
#define ftruncate _chsize_s
|
#define ftruncate _chsize_s
|
||||||
|
#endif
|
||||||
#define LOCK_SH 1
|
#define LOCK_SH 1
|
||||||
#define LOCK_EX 2
|
#define LOCK_EX 2
|
||||||
#define LOCK_NB 4
|
#define LOCK_NB 4
|
||||||
|
@ -238,6 +249,7 @@ typedef char *memcpy_t;
|
||||||
#define NSECCTIME(sb) 0
|
#define NSECCTIME(sb) 0
|
||||||
#define NSECMTIME(sb) 0
|
#define NSECMTIME(sb) 0
|
||||||
#define ICONV_INBUF_TYPE char **
|
#define ICONV_INBUF_TYPE char **
|
||||||
|
struct timespec;
|
||||||
#define UNUSED
|
#define UNUSED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -255,6 +267,7 @@ typedef char *memcpy_t;
|
||||||
#define ARCHYPERBOLIC
|
#define ARCHYPERBOLIC
|
||||||
#define GETPAGESIZE() getpagesize()
|
#define GETPAGESIZE() getpagesize()
|
||||||
typedef char *memcpy_t;
|
typedef char *memcpy_t;
|
||||||
|
struct timespec;
|
||||||
#define MAKE_NAN(x) { x = 0.0; x = x / x; }
|
#define MAKE_NAN(x) { x = 0.0; x = x / x; }
|
||||||
#define GETWD(x) getcwd((x),PATH_MAX)
|
#define GETWD(x) getcwd((x),PATH_MAX)
|
||||||
typedef int tputsputcchar;
|
typedef int tputsputcchar;
|
||||||
|
@ -271,6 +284,7 @@ typedef int tputsputcchar;
|
||||||
#define NSECMTIME(sb) (sb).st_mtimespec.tv_nsec
|
#define NSECMTIME(sb) (sb).st_mtimespec.tv_nsec
|
||||||
#define ICONV_INBUF_TYPE char **
|
#define ICONV_INBUF_TYPE char **
|
||||||
#define UNUSED __attribute__((__unused__))
|
#define UNUSED __attribute__((__unused__))
|
||||||
|
#define USE_OSSP_UUID
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (machine_type == machine_type_i3osx || machine_type == machine_type_ti3osx || machine_type == machine_type_a6osx || machine_type == machine_type_ta6osx)
|
#if (machine_type == machine_type_i3osx || machine_type == machine_type_ti3osx || machine_type == machine_type_a6osx || machine_type == machine_type_ta6osx)
|
||||||
|
|
96
configure
vendored
96
configure
vendored
|
@ -38,10 +38,20 @@ installschemename="scheme"
|
||||||
installpetitename="petite"
|
installpetitename="petite"
|
||||||
installscriptname="scheme-script"
|
installscriptname="scheme-script"
|
||||||
disablex11=no
|
disablex11=no
|
||||||
|
disablecurses=no
|
||||||
: ${CC:="gcc"}
|
: ${CC:="gcc"}
|
||||||
: ${CPPFLAGS:=""}
|
: ${CPPFLAGS:=""}
|
||||||
: ${CFLAGS:=""}
|
: ${CFLAGS:=""}
|
||||||
|
: ${LD:="ld"}
|
||||||
: ${LDFLAGS:=""}
|
: ${LDFLAGS:=""}
|
||||||
|
: ${AR:="ar"}
|
||||||
|
: ${ARFLAGS:="rc"}
|
||||||
|
: ${RANLIB:="ranlib"}
|
||||||
|
: ${WINDRES:="windres"}
|
||||||
|
: ${AR:="ar"}
|
||||||
|
: ${ARFLAGS:="ruv"}
|
||||||
|
: ${RANLIB:="ranlib"}
|
||||||
|
: ${WINDRES:="windres"}
|
||||||
zlibInc=-I../zlib
|
zlibInc=-I../zlib
|
||||||
LZ4Inc=-I../lz4/lib
|
LZ4Inc=-I../lz4/lib
|
||||||
zlibDep=../zlib/libz.a
|
zlibDep=../zlib/libz.a
|
||||||
|
@ -50,6 +60,10 @@ zlibLib=../zlib/libz.a
|
||||||
LZ4Lib=../lz4/lib/liblz4.a
|
LZ4Lib=../lz4/lib/liblz4.a
|
||||||
zlibHeaderDep="../zlib/zconf.h ../zlib/zlib.h"
|
zlibHeaderDep="../zlib/zconf.h ../zlib/zlib.h"
|
||||||
LZ4HeaderDep="../lz4/lib/lz4.h ../lz4/lib/lz4frame.h"
|
LZ4HeaderDep="../lz4/lib/lz4.h ../lz4/lib/lz4frame.h"
|
||||||
|
Kernel=KernelO
|
||||||
|
installkerneltarget=installkernelobj
|
||||||
|
installzlibtarget=
|
||||||
|
installlz4target=
|
||||||
|
|
||||||
# On WSL, set OS to "Windows_NT" to create a Windows
|
# On WSL, set OS to "Windows_NT" to create a Windows
|
||||||
# build instead of a Linux (on Windows) build:
|
# build instead of a Linux (on Windows) build:
|
||||||
|
@ -194,6 +208,14 @@ while [ $# != 0 ] ; do
|
||||||
--installscriptname=*)
|
--installscriptname=*)
|
||||||
installscriptname=`echo $1 | sed -e 's/^--installscriptname=//'`
|
installscriptname=`echo $1 | sed -e 's/^--installscriptname=//'`
|
||||||
;;
|
;;
|
||||||
|
--toolprefix=*)
|
||||||
|
toolprefix=`echo $1 | sed -e 's/^--toolprefix=//'`
|
||||||
|
CC="${toolprefix}${CC}"
|
||||||
|
LD="${toolprefix}${LD}"
|
||||||
|
AR="${toolprefix}${AR}"
|
||||||
|
RANLIB="${toolprefix}${RANLIB}"
|
||||||
|
WINDRES="${toolprefix}${WINDRES}"
|
||||||
|
;;
|
||||||
--gzip-man-pages)
|
--gzip-man-pages)
|
||||||
gzipmanpages=yes
|
gzipmanpages=yes
|
||||||
;;
|
;;
|
||||||
|
@ -212,6 +234,25 @@ while [ $# != 0 ] ; do
|
||||||
--disable-x11)
|
--disable-x11)
|
||||||
disablex11=yes
|
disablex11=yes
|
||||||
;;
|
;;
|
||||||
|
--disable-curses)
|
||||||
|
disablecurses=yes
|
||||||
|
;;
|
||||||
|
--libkernel)
|
||||||
|
Kernel=KernelLib
|
||||||
|
installkerneltarget=installkernellib
|
||||||
|
if [ "$zlibInc" != "" ]; then
|
||||||
|
installzlibtarget=installzlib
|
||||||
|
fi
|
||||||
|
if [ "$LZ4Inc" != "" ]; then
|
||||||
|
installlz4target=installlz4
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
--kernelobj)
|
||||||
|
Kernel=KernelO
|
||||||
|
installkerneltarget=installkernelobj
|
||||||
|
installzlibtarget=
|
||||||
|
installlz4target=
|
||||||
|
;;
|
||||||
CC=*)
|
CC=*)
|
||||||
CC=`echo $1 | sed -e 's/^CC=//'`
|
CC=`echo $1 | sed -e 's/^CC=//'`
|
||||||
;;
|
;;
|
||||||
|
@ -221,20 +262,37 @@ while [ $# != 0 ] ; do
|
||||||
CFLAGS=*)
|
CFLAGS=*)
|
||||||
CFLAGS=`echo $1 | sed -e 's/^CFLAGS=//'`
|
CFLAGS=`echo $1 | sed -e 's/^CFLAGS=//'`
|
||||||
;;
|
;;
|
||||||
|
LD=*)
|
||||||
|
LD=`echo $1 | sed -e 's/^LD=//'`
|
||||||
|
;;
|
||||||
LDFLAGS=*)
|
LDFLAGS=*)
|
||||||
LDFLAGS=`echo $1 | sed -e 's/^LDFLAGS=//'`
|
LDFLAGS=`echo $1 | sed -e 's/^LDFLAGS=//'`
|
||||||
;;
|
;;
|
||||||
|
AR=*)
|
||||||
|
AR=`echo $1 | sed -e 's/^AR=//'`
|
||||||
|
;;
|
||||||
|
ARFLAGS=*)
|
||||||
|
ARFLAGS=`echo $1 | sed -e 's/^ARFLAGS=//'`
|
||||||
|
;;
|
||||||
|
RANLIB=*)
|
||||||
|
RANLIB=`echo $1 | sed -e 's/^RANLIB=//'`
|
||||||
|
;;
|
||||||
|
WINDRES=*)
|
||||||
|
WINDRES=`echo $1 | sed -e 's/^WINDRES=//'`
|
||||||
|
;;
|
||||||
ZLIB=*)
|
ZLIB=*)
|
||||||
zlibLib=`echo $1 | sed -e 's/^ZLIB=//'`
|
zlibLib=`echo $1 | sed -e 's/^ZLIB=//'`
|
||||||
zlibInc=
|
zlibInc=
|
||||||
zlibDep=
|
zlibDep=
|
||||||
zlibHeaderDep=
|
zlibHeaderDep=
|
||||||
|
installzlibtarget=
|
||||||
;;
|
;;
|
||||||
LZ4=*)
|
LZ4=*)
|
||||||
LZ4Lib=`echo $1 | sed -e 's/^LZ4=//'`
|
LZ4Lib=`echo $1 | sed -e 's/^LZ4=//'`
|
||||||
LZ4Inc=
|
LZ4Inc=
|
||||||
LZ4Dep=
|
LZ4Dep=
|
||||||
LZ4HeaderDep=
|
LZ4HeaderDep=
|
||||||
|
installlz4target=
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "option '$1' unrecognized or missing an argument; try $0 --help"
|
echo "option '$1' unrecognized or missing an argument; try $0 --help"
|
||||||
|
@ -298,7 +356,10 @@ if [ "$help" = "yes" ]; then
|
||||||
echo " -m=<machine type> same as --machine <machine type> ($m)"
|
echo " -m=<machine type> same as --machine <machine type> ($m)"
|
||||||
echo " --threads specify threaded version ($threads)"
|
echo " --threads specify threaded version ($threads)"
|
||||||
echo " --32|--64 specify 32/64-bit version ($bits)"
|
echo " --32|--64 specify 32/64-bit version ($bits)"
|
||||||
echo " --disable-x11 disabling x11"
|
echo " --disable-x11 disable X11 support"
|
||||||
|
echo " --disable-curses disable [n]curses support"
|
||||||
|
echo " --libkernel build libkernel.a instead of kernel.o"
|
||||||
|
echo " --kernelobj build kernel.o (the default)"
|
||||||
echo " --installprefix=<pathname> final installation root ($installprefix)"
|
echo " --installprefix=<pathname> final installation root ($installprefix)"
|
||||||
echo " --installbin=<pathname> bin directory ($installbin)"
|
echo " --installbin=<pathname> bin directory ($installbin)"
|
||||||
echo " --installlib=<pathname> lib directory ($installlib)"
|
echo " --installlib=<pathname> lib directory ($installlib)"
|
||||||
|
@ -309,13 +370,20 @@ if [ "$help" = "yes" ]; then
|
||||||
echo " --installschemename=<schemename> install with group ($installschemename)"
|
echo " --installschemename=<schemename> install with group ($installschemename)"
|
||||||
echo " --installpetitename=<petitename> install with group ($installpetitename)"
|
echo " --installpetitename=<petitename> install with group ($installpetitename)"
|
||||||
echo " --installscriptname=<scriptname> install with group ($installscriptname)"
|
echo " --installscriptname=<scriptname> install with group ($installscriptname)"
|
||||||
|
echo " --toolprefix=<prefix> prefix tool (compiler, linker, ...) names"
|
||||||
echo " --[no]gzip-man-pages compress manual pages ($gzipmanpages)"
|
echo " --[no]gzip-man-pages compress manual pages ($gzipmanpages)"
|
||||||
echo " --workarea=<pathname> build directory ($w)"
|
echo " --workarea=<pathname> build directory ($w)"
|
||||||
|
echo " CC=<C compiler> C compiler"
|
||||||
echo " CPPFLAGS=<C preprocessor flags> additional C preprocessor flags ($CPPFLAGS)"
|
echo " CPPFLAGS=<C preprocessor flags> additional C preprocessor flags ($CPPFLAGS)"
|
||||||
echo " CFLAGS=<C compiler flags> additional C compiler flags ($CFLAGS)"
|
echo " CFLAGS=<C compiler flags> additional C compiler flags ($CFLAGS)"
|
||||||
|
echo " LD=<linker> linker"
|
||||||
echo " LDFLAGS=<linker flags> additional linker flags ($LDFLAGS)"
|
echo " LDFLAGS=<linker flags> additional linker flags ($LDFLAGS)"
|
||||||
echo " ZLIB=<lib> link to static <lib> instead of own zlib"
|
echo " AR=<archiver> archiver"
|
||||||
echo " LZ4=<lib> link to static <lib> instead of own LZ4"
|
echo " ARFLAGS=<archiver flgs> archiver flags"
|
||||||
|
echo " RANLIB=<archive indexer> archive indexer"
|
||||||
|
echo " WINDRES=<resource compiler> resource compiler"
|
||||||
|
echo " ZLIB=<lib> link to <lib> instead of own zlib"
|
||||||
|
echo " LZ4=<lib> link to <lib> instead of own LZ4"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Available machine types: $machs"
|
echo "Available machine types: $machs"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -402,6 +470,9 @@ sed -e "s;^m=none\$;m=$m;"\
|
||||||
-e "s;^InstallSchemeName=.*$;InstallSchemeName=$installschemename;"\
|
-e "s;^InstallSchemeName=.*$;InstallSchemeName=$installschemename;"\
|
||||||
-e "s;^InstallPetiteName=.*$;InstallPetiteName=$installpetitename;"\
|
-e "s;^InstallPetiteName=.*$;InstallPetiteName=$installpetitename;"\
|
||||||
-e "s;^InstallScriptName=.*$;InstallScriptName=$installscriptname;"\
|
-e "s;^InstallScriptName=.*$;InstallScriptName=$installscriptname;"\
|
||||||
|
-e "s;^InstallKernelTarget=.*$;InstallKernelTarget=$installkerneltarget;"\
|
||||||
|
-e "s;^InstallZlibTarget=.*$;InstallZlibTarget=$installzlibtarget;"\
|
||||||
|
-e "s;^InstallLZ4Target=.*$;InstallLZ4Target=$installlz4target;"\
|
||||||
makefiles/Mf-install.in > $w/Mf-install
|
makefiles/Mf-install.in > $w/Mf-install
|
||||||
|
|
||||||
cat > $w/c/config.h << END
|
cat > $w/c/config.h << END
|
||||||
|
@ -415,11 +486,27 @@ if [ "$disablex11" = "yes" ]; then
|
||||||
echo '#define DISABLE_X11' >> $w/c/config.h
|
echo '#define DISABLE_X11' >> $w/c/config.h
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cursesLib=-lcurses
|
||||||
|
ncursesLib=-lncurses
|
||||||
|
|
||||||
|
if [ "$disablecurses" = "yes" ]; then
|
||||||
|
echo '#define DISABLE_CURSES' >> $w/c/config.h
|
||||||
|
cursesLib=
|
||||||
|
ncursesLib=
|
||||||
|
fi
|
||||||
|
|
||||||
cat > $w/c/Mf-config << END
|
cat > $w/c/Mf-config << END
|
||||||
CC=$CC
|
CC=$CC
|
||||||
CPPFLAGS=$CPPFLAGS
|
CPPFLAGS=$CPPFLAGS
|
||||||
CFLAGS=$CFLAGS
|
CFLAGS=$CFLAGS
|
||||||
|
LD=$LD
|
||||||
LDFLAGS=$LDFLAGS
|
LDFLAGS=$LDFLAGS
|
||||||
|
AR=$AR
|
||||||
|
ARFLAGS=$ARFLAGS
|
||||||
|
RANLIB=$RANLIB
|
||||||
|
WINDRES=$WINDRES
|
||||||
|
cursesLib=$cursesLib
|
||||||
|
ncursesLib=$ncursesLib
|
||||||
zlibInc=$zlibInc
|
zlibInc=$zlibInc
|
||||||
LZ4Inc=$LZ4Inc
|
LZ4Inc=$LZ4Inc
|
||||||
zlibDep=$zlibDep
|
zlibDep=$zlibDep
|
||||||
|
@ -428,4 +515,7 @@ zlibLib=$zlibLib
|
||||||
LZ4Lib=$LZ4Lib
|
LZ4Lib=$LZ4Lib
|
||||||
zlibHeaderDep=$zlibHeaderDep
|
zlibHeaderDep=$zlibHeaderDep
|
||||||
LZ4HeaderDep=$LZ4HeaderDep
|
LZ4HeaderDep=$LZ4HeaderDep
|
||||||
|
Kernel=\${${Kernel}}
|
||||||
|
KernelLinkDeps=\${${Kernel}LinkDeps}
|
||||||
|
KernelLinkLibs=\${${Kernel}LinkLibs}
|
||||||
END
|
END
|
||||||
|
|
|
@ -18,6 +18,9 @@ MAKEFLAGS += --no-print-directory
|
||||||
build:
|
build:
|
||||||
(cd $(workarea) && $(MAKE) build)
|
(cd $(workarea) && $(MAKE) build)
|
||||||
|
|
||||||
|
run:
|
||||||
|
env SCHEMEHEAPDIRS=$(workarea)/boot/$(m) $(workarea)/bin/$(m)/scheme
|
||||||
|
|
||||||
install:
|
install:
|
||||||
(cd $(workarea) && $(MAKE) install)
|
(cd $(workarea) && $(MAKE) install)
|
||||||
|
|
||||||
|
@ -30,6 +33,16 @@ test:
|
||||||
bootfiles:
|
bootfiles:
|
||||||
(cd $(workarea) && $(MAKE) bootfiles)
|
(cd $(workarea) && $(MAKE) bootfiles)
|
||||||
|
|
||||||
|
# Supply XM=<machine> to build boot files for <machine>
|
||||||
|
boot: build
|
||||||
|
mkdir -p boot/$(XM)
|
||||||
|
(cd $(workarea) && $(MAKE) -f Mf-boot $(XM).boot)
|
||||||
|
|
||||||
|
# Supply ORIG=<dir> to build using existing at <dir>
|
||||||
|
from-orig:
|
||||||
|
(cd $(m)/s && $(MAKE) -f Mf-cross m=$(m) xm=$(m) base=$(ORIG)/$(m))
|
||||||
|
$(MAKE) build
|
||||||
|
|
||||||
docs: build
|
docs: build
|
||||||
(cd csug && $(MAKE) m=$(m))
|
(cd csug && $(MAKE) m=$(m))
|
||||||
(cd release_notes && $(MAKE) m=$(m))
|
(cd release_notes && $(MAKE) m=$(m))
|
||||||
|
|
|
@ -51,6 +51,13 @@ InstallSchemeName=scheme
|
||||||
InstallPetiteName=petite
|
InstallPetiteName=petite
|
||||||
InstallScriptName=scheme-script
|
InstallScriptName=scheme-script
|
||||||
|
|
||||||
|
# Whether to install "kernel.o" or "libkernel.a"
|
||||||
|
InstallKernelTarget=installkernellib
|
||||||
|
|
||||||
|
# Maybe install libz.a and liblz4.a by setting to "installzlib" and "installliz4"
|
||||||
|
InstallZlibTarget=
|
||||||
|
InstallLZ4Target=
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# no changes should be needed below this point #
|
# no changes should be needed below this point #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -74,7 +81,7 @@ PetitePath=${Bin}/${InstallPetiteName}
|
||||||
SchemePath=${Bin}/${InstallSchemeName}
|
SchemePath=${Bin}/${InstallSchemeName}
|
||||||
SchemeScriptPath=${Bin}/${InstallScriptName}
|
SchemeScriptPath=${Bin}/${InstallScriptName}
|
||||||
|
|
||||||
install: bininstall libbininstall maninstall liblibinstall
|
install: bininstall libbininstall maninstall liblibinstall ${InstallKernelTarget}
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -rf ${Lib}
|
rm -rf ${Lib}
|
||||||
|
@ -116,11 +123,22 @@ libbininstall: ${LibBin}
|
||||||
ln -f ${LibBin}/scheme.boot ${LibBin}/${InstallSchemeName}.boot;\
|
ln -f ${LibBin}/scheme.boot ${LibBin}/${InstallSchemeName}.boot;\
|
||||||
fi
|
fi
|
||||||
ln -f ${LibBin}/scheme.boot ${LibBin}/${InstallScriptName}.boot;
|
ln -f ${LibBin}/scheme.boot ${LibBin}/${InstallScriptName}.boot;
|
||||||
$I -m 444 ${Include}/kernel.o ${LibBin}
|
|
||||||
$I -m 444 ${Include}/main.o ${LibBin}
|
$I -m 444 ${Include}/main.o ${LibBin}
|
||||||
$I -m 444 ${Include}/scheme.h ${LibBin}
|
$I -m 444 ${Include}/scheme.h ${LibBin}
|
||||||
$I -m 444 ${Revision} ${LibBin}/revision
|
$I -m 444 ${Revision} ${LibBin}/revision
|
||||||
|
|
||||||
|
installkernelobj: ${LibBin}
|
||||||
|
$I -m 444 ${Include}/kernel.o ${LibBin}
|
||||||
|
|
||||||
|
installkernellib: ${LibBin} ${InstallZlibTarget} ${InstallLZ4Target}
|
||||||
|
$I -m 444 ${Include}/libkernel.a ${LibBin}
|
||||||
|
|
||||||
|
installzlib: ${LibBin}
|
||||||
|
$I -m 444 zlib/libz.a ${LibBin}
|
||||||
|
|
||||||
|
installlz4: ${LibBin}
|
||||||
|
$I -m 444 lz4/lib/liblz4.a ${LibBin}
|
||||||
|
|
||||||
maninstall: scheme.1 petite.1 ${Man}
|
maninstall: scheme.1 petite.1 ${Man}
|
||||||
$I -m 444 scheme.1 ${Man}/${InstallSchemeName}.1
|
$I -m 444 scheme.1 ${Man}/${InstallSchemeName}.1
|
||||||
if [ ${GzipManPages} = yes ] ; then gzip -f ${Man}/${InstallSchemeName}.1 ; fi
|
if [ ${GzipManPages} = yes ] ; then gzip -f ${Man}/${InstallSchemeName}.1 ; fi
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
(define-constant size_t-bits 64)
|
(define-constant size_t-bits 64)
|
||||||
(define-constant ptrdiff_t-bits 64)
|
(define-constant ptrdiff_t-bits 64)
|
||||||
(define-constant wchar-bits 32)
|
(define-constant wchar-bits 32)
|
||||||
(define-constant time-t-bits 32)
|
(define-constant time-t-bits 64)
|
||||||
(define-constant max-float-alignment 8)
|
(define-constant max-float-alignment 8)
|
||||||
(define-constant max-integer-alignment 8)
|
(define-constant max-integer-alignment 8)
|
||||||
(define-constant asm-arg-reg-max 5)
|
(define-constant asm-arg-reg-max 5)
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
(define-constant size_t-bits 64)
|
(define-constant size_t-bits 64)
|
||||||
(define-constant ptrdiff_t-bits 64)
|
(define-constant ptrdiff_t-bits 64)
|
||||||
(define-constant wchar-bits 32)
|
(define-constant wchar-bits 32)
|
||||||
(define-constant time-t-bits 32)
|
(define-constant time-t-bits 64)
|
||||||
(define-constant max-float-alignment 8)
|
(define-constant max-float-alignment 8)
|
||||||
(define-constant max-integer-alignment 8)
|
(define-constant max-integer-alignment 8)
|
||||||
(define-constant asm-arg-reg-max 5)
|
(define-constant asm-arg-reg-max 5)
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
(define-constant typedef-u16 "unsigned short")
|
(define-constant typedef-u16 "unsigned short")
|
||||||
(define-constant typedef-i32 "int")
|
(define-constant typedef-i32 "int")
|
||||||
(define-constant typedef-u32 "unsigned int")
|
(define-constant typedef-u32 "unsigned int")
|
||||||
(define-constant typedef-i64 "__int64")
|
(define-constant typedef-i64 "long long")
|
||||||
(define-constant typedef-u64 "unsigned __int64")
|
(define-constant typedef-u64 "unsigned long long")
|
||||||
(define-constant typedef-string-char "unsigned int")
|
(define-constant typedef-string-char "unsigned int")
|
||||||
(define-constant thread-handle-uptrs 1)
|
(define-constant thread-handle-uptrs 1)
|
||||||
(define-constant native-endianness 'little)
|
(define-constant native-endianness 'little)
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
(define-constant size_t-bits 64)
|
(define-constant size_t-bits 64)
|
||||||
(define-constant ptrdiff_t-bits 64)
|
(define-constant ptrdiff_t-bits 64)
|
||||||
(define-constant wchar-bits 32)
|
(define-constant wchar-bits 32)
|
||||||
(define-constant time-t-bits 32)
|
(define-constant time-t-bits 64)
|
||||||
(define-constant max-float-alignment 8)
|
(define-constant max-float-alignment 8)
|
||||||
(define-constant max-integer-alignment 8)
|
(define-constant max-integer-alignment 8)
|
||||||
(define-constant asm-arg-reg-max 5)
|
(define-constant asm-arg-reg-max 5)
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
(define-constant size_t-bits 64)
|
(define-constant size_t-bits 64)
|
||||||
(define-constant ptrdiff_t-bits 64)
|
(define-constant ptrdiff_t-bits 64)
|
||||||
(define-constant wchar-bits 32)
|
(define-constant wchar-bits 32)
|
||||||
(define-constant time-t-bits 32)
|
(define-constant time-t-bits 64)
|
||||||
(define-constant max-float-alignment 8)
|
(define-constant max-float-alignment 8)
|
||||||
(define-constant max-integer-alignment 8)
|
(define-constant max-integer-alignment 8)
|
||||||
(define-constant asm-arg-reg-max 5)
|
(define-constant asm-arg-reg-max 5)
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
(define-constant typedef-u16 "unsigned short")
|
(define-constant typedef-u16 "unsigned short")
|
||||||
(define-constant typedef-i32 "int")
|
(define-constant typedef-i32 "int")
|
||||||
(define-constant typedef-u32 "unsigned int")
|
(define-constant typedef-u32 "unsigned int")
|
||||||
(define-constant typedef-i64 "__int64")
|
(define-constant typedef-i64 "long long")
|
||||||
(define-constant typedef-u64 "unsigned __int64")
|
(define-constant typedef-u64 "unsigned long long")
|
||||||
(define-constant typedef-string-char "unsigned int")
|
(define-constant typedef-string-char "unsigned int")
|
||||||
(define-constant thread-handle-uptrs 2)
|
(define-constant thread-handle-uptrs 2)
|
||||||
(define-constant native-endianness 'little)
|
(define-constant native-endianness 'little)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user