sshwot/Makefile

26 lines
712 B
Makefile
Raw Normal View History

2018-08-29 11:39:49 +00:00
BINS:=sshwot-export-known-hosts
2018-08-29 10:29:38 +00:00
SSHWOT_EXPORT_KNOWN_HOSTS_MAIN:=src/main-export-known-hosts.py
SSHWOT_EXPORT_KNOWN_HOSTS_DEPS:=$(SSHWOT_EXPORT_KNOWN_HOSTS_MAIN) src/entry.py src/hashing.py src/process_known_hosts.py src/write_file.py
all: $(BINS)
sshwot-export-known-hosts: $(SSHWOT_EXPORT_KNOWN_HOSTS_MAIN) $(SSHWOT_EXPORT_KNOWN_HOSTS_DEPS)
mkdir -p build/$@
cp $(SSHWOT_EXPORT_KNOWN_HOSTS_DEPS) build/$@/
cp $(SSHWOT_EXPORT_KNOWN_HOSTS_MAIN) build/$@/__main__.py
zip --quiet --junk-paths build/$@.zip build/$@/*.py
echo '#!/usr/bin/env python3' > $@
cat build/$@.zip >> $@
chmod +x $@
.PHONY: all clean distclean buildclean
clean:
rm -rf build $(BINS)
distclean: clean
buildclean:
rm -rf build