123456789101112131415161718192021222324252627282930313233343536373839404142 |
- ALL=`echo static/img/*.svg | sed 's/svg/webp/g'` amuse
- all:V: $ALL
- reallyall:V: $ALL pymodule
- amuse: router.go go.mod go.sum `echo front/*.go i18n/*.go libamuse/*.go protocol/*.go tmdb/*.go utils/*.go wikidata/*.go`
- go build -ldflags "-s -w -linkmode external -extldflags -static"
- static/img/%.webp: static/img/%.svg
- rendersvg static/img/$stem.svg static/img/$stem.png
- cwebp -lossless static/img/$stem.png -o static/img/$stem.webp
- rm static/img/$stem.png
- PREFIX=`echo ${PREFIX:-/usr/local}`
- install:V: amuse
- mkdir -m755 -p $PREFIX/bin
- mkdir -m755 -p $PREFIX/share/amuse
- mkdir -m755 -p $PREFIX/share/amuse/templates
- mkdir -m755 -p $PREFIX/share/amuse/i18n
- mkdir -m755 -p $PREFIX/share/amuse/static/style
- mkdir -m755 -p $PREFIX/share/amuse/static/img
- mkdir -m755 -p $PREFIX/share/amuse/static/fonts
- install -m755 amuse $PREFIX/bin/amuse
- install -m644 templates/*.html $PREFIX/share/amuse/templates/
- install -m644 i18n/*-*.toml $PREFIX/share/amuse/i18n/
- ln -s $PREFIX/share/amuse/i18n/en-GB.toml $PREFIX/share/amuse/i18n/default.toml
- install -m644 static/style/style.css $PREFIX/share/amuse/static/style/style.css
- install -m644 static/img/*.webp $PREFIX/share/amuse/static/img/
- install -m644 static/fonts/MaterialIcons-Regular.woff2 $PREFIX/share/amuse/static/fonts/MaterialIcons-Regular.woff2
- uninstall:V:
- rm $PREFIX/bin/amuse
- rm -r $PREFIX/share/amuse
- # https://github.com/go-python/gopy
- pymodule:QV: `echo **/*.go`
- echo "NOTE: This only works with glibc"
- gopy build -output pymodule notabug.org/apiote/amuse/libamuse
- cd pymodule
- go build -ldflags "-s -w" -buildmode=c-archive -o libamuse_go.a .
- gcc libamuse.c libamuse_go.a -o _libamuse.so $(python3.7-config --cflags) $(python3.7-config --ldflags) -fPIC --shared
- rm -f Makefile __pycache__ build.py libamuse.c libamuse_go.h __init__.py libamuse.go libamuse_go.so libamuse_go.a
|