Break down dirpath.c into fs_*.c by OS
I much prefer this to using ifdefs. Requires a little help from the build system but I find it worth it.
This commit is contained in:
+11
-8
@@ -2,10 +2,11 @@
|
||||
set -eu
|
||||
CC="${CC:-clang}"
|
||||
CFLAGS="-Wall -Wextra -Wno-strict-aliasing -std=gnu99"
|
||||
CFLAGS="$CFLAGS -O2" # -falign-functions
|
||||
CFLAGS="$CFLAGS -O2" # -falign-functions
|
||||
CFLAGS="$CFLAGS -I ../c -D NDEBUG -D USE_COMPUTED_GOTO"
|
||||
LFLAGS="-lm"
|
||||
builddir="build-$(uname | tr A-Z- a-z_)-$(uname -m | tr A-Z- a-z_)"
|
||||
os="$(uname | tr A-Z- a-z_)"
|
||||
builddir="build-$os-$(uname -m | tr A-Z- a-z_)"
|
||||
cd "$(dirname "$0")"/..
|
||||
echo "Entering directory '$PWD'"
|
||||
set -x
|
||||
@@ -15,14 +16,16 @@ find "$builddir" -mindepth 1 -delete
|
||||
cd "$builddir"
|
||||
echo "Entering directory '$PWD'"
|
||||
set -x
|
||||
ln -s ../scheme-boot/flisp.boot flisp.boot
|
||||
$CC $CFLAGS -c ../c/bitvector-ops.c
|
||||
$CC $CFLAGS -c ../c/bitvector.c
|
||||
$CC $CFLAGS -c ../c/builtins.c
|
||||
$CC $CFLAGS -c ../c/dirpath.c
|
||||
$CC $CFLAGS -c ../c/dump.c
|
||||
$CC $CFLAGS -c ../c/equalhash.c
|
||||
$CC $CFLAGS -c ../c/flisp.c
|
||||
$CC $CFLAGS -c ../c/flmain.c
|
||||
$CC $CFLAGS -c ../c/fs_"$os".c
|
||||
$CC $CFLAGS -c ../c/fs_unix.c
|
||||
$CC $CFLAGS -c ../c/hashing.c
|
||||
$CC $CFLAGS -c ../c/htable.c
|
||||
$CC $CFLAGS -c ../c/int2str.c
|
||||
@@ -37,11 +40,11 @@ $CC $CFLAGS -c ../c/table.c
|
||||
$CC $CFLAGS -c ../c/timefuncs.c
|
||||
$CC $CFLAGS -c ../c/utf8.c
|
||||
$CC $LFLAGS -o flisp -lm \
|
||||
bitvector-ops.o bitvector.o builtins.o dirpath.o dump.o \
|
||||
equalhash.o flisp.o flmain.o hashing.o htable.o int2str.o \
|
||||
ios.o iostream.o lltinit.o ptrhash.o random.o socket.o \
|
||||
string.o table.o timefuncs.o utf8.o
|
||||
ln -s ../scheme-boot/flisp.boot flisp.boot
|
||||
bitvector-ops.o bitvector.o builtins.o dump.o \
|
||||
equalhash.o flisp.o flmain.o fs_"$os".o fs_unix.o \
|
||||
hashing.o htable.o int2str.o \
|
||||
ios.o iostream.o lltinit.o ptrhash.o random.o socket.o \
|
||||
string.o table.o timefuncs.o utf8.o
|
||||
{ set +x; } 2>/dev/null
|
||||
cd ../scheme-core
|
||||
echo "Entering directory '$PWD'"
|
||||
|
||||
Reference in New Issue
Block a user