~pmikkelsen/apl-prolog

3171ba93343cb484208c97d7aa24606a4a5029de — Peter Mikkelsen 6 months ago 3b7a78f master
Fix for openbsd builds
2 files changed, 8 insertions(+), 6 deletions(-)

M .builds/openbsd.yml
M build.sh
M .builds/openbsd.yml => .builds/openbsd.yml +2 -2
@@ 4,7 4,7 @@ sources:
tasks:
- build: |
    cd apl-prolog
    make
    ./build.sh
- test: |
    cd apl-prolog
    ./out/clpl
    LC_ALL=en_US.UTF-8 ./out/clpl

M build.sh => build.sh +6 -4
@@ 19,6 19,8 @@ CC=cc
CFLAGS="-std=c99 -pedantic -Wall -Wextra -Werror -g -fPIC -Iinclude"
MAKEFILE=Makefile

HERE=$(pwd)

mkdir -p out
mkdir -p obj
mkdir -p obj/$PLATFORM


@@ 31,13 33,13 @@ cat > $MAKEFILE << EOF
all: $PROG $PROG.a $PROG.so

$PROG: $PLATFORMSRCS $PROG.a $LIBHEADER
	$CC $CFLAGS -Iinclude $PLATFORMSRCS $PROG.a -o $PROG
	cd $HERE; $CC $CFLAGS -Iinclude $PLATFORMSRCS $PROG.a -o $PROG

$PROG.a: $LIBOBJS
	ar rcs $PROG.a $LIBOBJS
	cd $HERE; ar rcs $PROG.a $LIBOBJS

$PROG.so: $LIBOBJS
	$CC -shared $LIBOBJS -o $PROG.so
	cd $HERE; $CC -shared $LIBOBJS -o $PROG.so

EOF



@@ 48,7 50,7 @@ do

cat >> $MAKEFILE << EOF
$OFILE: $CFILE $LIBHEADER $(echo $HFILES)
	$CC $CFLAGS -Ilibclpl/$PLATFORM/ -c $CFILE -o $OFILE
	cd $HERE; $CC $CFLAGS -Ilibclpl/$PLATFORM/ -c $CFILE -o $OFILE

EOF
done