diff options
Diffstat (limited to 'ship')
-rw-r--r-- | ship/Makefile | 32 | ||||
-rwxr-xr-x | ship/deploy | 9 | ||||
-rw-r--r-- | ship/develop | 5 | ||||
-rwxr-xr-x | ship/src/punani (renamed from ship/bin/punani) | 0 | ||||
-rw-r--r-- | ship/tmp/.placeholder (renamed from ship/out/.placeholder) | 0 |
5 files changed, 32 insertions, 14 deletions
diff --git a/ship/Makefile b/ship/Makefile new file mode 100644 index 00000000..0e9b8edf --- /dev/null +++ b/ship/Makefile @@ -0,0 +1,32 @@ +exesrcdir := src +libsrcdir := lib +tmpoutdir := tmp +finoutdir := ../bin + +exesrcs := $(notdir $(wildcard $(exesrcdir)/*)) +exetmpouts := $(addprefix $(tmpoutdir)/,$(exesrcs)) +exefinouts := $(addprefix $(finoutdir)/,$(exesrcs)) + +build := BUILD_PATH=$(libsrcdir) ./build + +.PHONY: all install clean distclean + +all: $(exetmpouts) + +install: $(exefinouts) + +clean: + rm -f $(exetmpouts) + +distclean: clean + rm -f $(exefinouts) + +define buildrule +$(tmpoutdir)/$(1): $(exesrcdir)/$(1) $(shell $(build) deps $(exesrcdir)/$(1)) + $(build) compile $$< $$@ +endef + +$(foreach exe, $(exesrcs), $(eval $(call buildrule,$(exe)))) + +$(finoutdir)/%: $(tmpoutdir)/% + cp $< $@ diff --git a/ship/deploy b/ship/deploy deleted file mode 100755 index 411f8eec..00000000 --- a/ship/deploy +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -set -xeuf -cd $(dirname $0) -bindir=$PWD/bin -libdir=$PWD/lib -outdir=$PWD/out -for file in `ls -1 $bindir`;do - BUILD_PATH=$libdir ./build compile $bindir/$file $outdir/$file -done diff --git a/ship/develop b/ship/develop deleted file mode 100644 index a961f9c2..00000000 --- a/ship/develop +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -source_all(){ - LIBDIR=${1:-.} - for i in $LIBDIR/*; do . "$i"; done -} diff --git a/ship/bin/punani b/ship/src/punani index ceabd667..ceabd667 100755 --- a/ship/bin/punani +++ b/ship/src/punani diff --git a/ship/out/.placeholder b/ship/tmp/.placeholder index e69de29b..e69de29b 100644 --- a/ship/out/.placeholder +++ b/ship/tmp/.placeholder |