From e49999fa850147d2c0576af663cd38293483b529 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Sun, 3 May 2020 16:19:31 -0400 Subject: build fixes: installing dependencies --- Makefile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a1b41fa..4b8eb5a 100644 --- a/Makefile +++ b/Makefile @@ -12,9 +12,18 @@ SUBMODULES = fsmgr kiki openssh all: samizdat-paths.sh ${compiled_programs} ${SUBMODULES} -dynmenu: src/dynmenu.cpp +.PHONY: stack +stack: + which stack >/dev/null || curl -sSL https://get.haskellstack.org/ | sh + +build-deps: build-dep-stamp +build-dep-stamp: build-deps.txt + sudo apt-get install --no-upgrade $$(cat build-deps.txt) + touch $@ + +dynmenu: src/dynmenu.cpp build-deps $(CXX) $(CFLAGS) $< -o $@ -lcurses -samizdat-pinentry: src/samizdat-pinentry.c +samizdat-pinentry: src/samizdat-pinentry.c build-deps $(CC) $(CFLAGS) $< -o $@ -lcurses wait_for_files: src/wait_for_files.c $(CC) $(CFLAGS) $< -o $@ @@ -98,7 +107,7 @@ endif include user.mk .PHONY: submodule $(SUBMODULES) -$(SUBMODULES): +$(SUBMODULES): stack [ -e $@/Makefile ] || git submodule update --init $(MAKE) -C $@ $(cmd) -- cgit v1.2.3