aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-05-31 14:09:34 +0200
committerMarc André Tanner <mat@brain-dump.org>2017-05-31 15:37:25 +0200
commitfae92a04cdfd5ebe8e07865446732b0287f4553a (patch)
tree8b505f958be45f0eff5ce5bec869402714ede975 /Makefile
parent2599e5c9be9fa8ef12ff92cff85f0c72be2b1aeb (diff)
downloadvis-fae92a04cdfd5ebe8e07865446732b0287f4553a.tar.gz
vis-fae92a04cdfd5ebe8e07865446732b0287f4553a.tar.xz
build: cleanup self contained executable
Set $PATH and $TERMINFO_DIRS environment variables, use chdir(2) to simplify extraction logic, improve error handling.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 8 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index b71238a..7950865 100644
--- a/Makefile
+++ b/Makefile
@@ -73,17 +73,17 @@ vis-digraph: vis-digraph.c
${CC} ${CFLAGS} ${CFLAGS_AUTO} ${CFLAGS_STD} ${CFLAGS_EXTRA} $< ${LDFLAGS} ${LDFLAGS_STD} ${LDFLAGS_AUTO} -o $@
vis-single-payload.inc: $(EXECUTABLES) lua/*
- echo '#ifndef VIS_SINGLE_PAYLOAD_H' > vis-single-payload.inc
- echo '#define VIS_SINGLE_PAYLOAD_H' >> vis-single-payload.inc
- echo 'unsigned char vis_single_payload[] = {' >> vis-single-payload.inc
- tar c $(EXECUTABLES) $$(find lua -name '*.lua') | xz | od -t x1 -A none -v | \
- sed 's/\([0-9a-f]\+\)/0x\1,/g;$$s/,$$/ };/' >> vis-single-payload.inc
- echo '#endif' >> vis-single-payload.inc
-
-vis-single: vis-single.c vis-single-payload.inc
for e in $(ELF); do \
${STRIP} "$$e"; \
done
+ echo '#ifndef VIS_SINGLE_PAYLOAD_H' > $@
+ echo '#define VIS_SINGLE_PAYLOAD_H' >> $@
+ echo 'static unsigned char vis_single_payload[] = {' >> $@
+ tar c $(EXECUTABLES) $$(find lua -name '*.lua') | xz | od -t x1 -A none -v | \
+ sed 's/\([0-9a-f]\+\)/0x\1,/g;$$s/,$$/ };/' >> $@
+ echo '#endif' >> $@
+
+vis-single: vis-single.c vis-single-payload.inc
${CC} ${CFLAGS} ${CFLAGS_AUTO} ${CFLAGS_STD} ${CFLAGS_EXTRA} $< ${LDFLAGS} ${LDFLAGS_STD} ${LDFLAGS_AUTO} -larchive -lacl -lbz2 -llzma -o $@
debug: clean