aboutsummaryrefslogtreecommitdiff
path: root/editors/vis/build
blob: 571b43f4b2c40126f48adbc5150f915d8b093b34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh -e

(
    cd termkey

    make termkey.h libtermkey.la

    mkdir -p "../usr/lib" \
             "../usr/include"

    mv termkey.h "../usr/include"
    mv .libs/*.a "../usr/lib"

)

(
    # Lpeg doesn't have an option to create static libraries.
    cd lpeg
    for obj in lpcap lpcode lpprint lptree lpvm; do
        "${CC:-cc}" $CFLAGS -c -o $obj.o $obj.c
    done
    ar rcs ../usr/lib/liblpeg.a ./*.o
)

(
    cd vis

    export CFLAGS="$CFLAGS -static -I../usr/include"
    export LDFLAGS="$LDFLAGS -L../usr/lib"

    ./configure \
        --prefix=/usr \
        --enable-lua \
        --enable-liblpeg-static

    make
    make DESTDIR="$1" install
)