From 142996618953907929e393d19a1db7420c8fc4d9 Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Wed, 12 Oct 2022 02:27:47 +0200 Subject: [PATCH] Makefile for ./template --- template/Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 template/Makefile diff --git a/template/Makefile b/template/Makefile new file mode 100644 index 0000000..a42471b --- /dev/null +++ b/template/Makefile @@ -0,0 +1,27 @@ +# determine how many processors are present +CPU_CORES :=`cat /proc/cpuinfo | grep -m1 "cpu cores" | sed s/".*: "//` +# The command to run lilypond +LILYPOND := ../build +LILYFLAGS := -djob-count=$(CPU_CORES) -dno-preview + +# Suffixes used in this Makefile +.SUFFIXES: +.SUFFIXES: .ly .pdf + +SOURCES := $(wildcard ./*.ly) +OUTPUTS = $(patsubst %.ly,%.pdf,$(SOURCES)) + +.PHONY: all dist distclean clean + +all: dist + +clean: + rm -vf *.midi + +dist: $(OUTPUTS) + +distclean: clean + rm -f $(OUTPUTS) + +%.pdf: %.ly + $(LILYPOND) $(LILYFLAGS) $<