Update build script documentation

parent 3d3852c8
# This image is intended for deploying dukboot.
# E.g. "docker run dukboot/dukboot myscript.js"
# Warning: I haven't tested to see if it works yet!!!
FROM alpine:latest
COPY . .
RUN apk add --no-cache gcc musl-dev && \
sh build.sh && \
./dukboots && \
apk del --no-cache --purge gcc musl-dev
RUN apk add --no-cache build-base && \
make && \
mv dukboot /bin/dukboot && \
apk del --no-cache --purge build-base && \
rm -rf ./*
......@@ -66,8 +66,14 @@ just leave some quotes from this wise collector of quotes: http://quotes.cat-v.o
## So what IS this?
A C program. You can compile it with `build.sh` which just runs gcc with a bunch of arguments.
It sadly uses the C standard library for now, so you have to build it against something.
A C program. I eventually caved and wrote a Makefile for it, so now it has a dependency on `make`.
But it's a really simple Makefile so hopefully I can replace it with small build script
in the future. I'm using [makeheaders](http://www.hwaci.com/sw/mkhdr/) to avoid having
to write any header files. (It's a truly wonderful gem of a program and I think
more people should use it!) So mainly the Makefile is just used to select which
libraries get linked depending on the target platform.
It uses a couple parts of the C standard library, so for now you have to build it against something.
On Alpine Linux, that is `musl` and on Ubuntu Linux that's `glibc` I think.
Both Ubuntu and Alpine Linux are supported.
# /usr/bin/env bash
set -e
GITBASH="'/c/Program\ Files/Git/bin/bash'"
# Who needs a build system? KISS
$CC -o $NAME \
-Os -pedantic -std=c99 -Wall -fstrict-aliasing -fomit-frame-pointer \
-static -static-libgcc \
-fopenmp \
-I./lib/duktape \
lib/duktape/duktape.c \
src/main.c \
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment