From 64fca717c611841a1b38db47559855ece716a452 Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Thu, 11 May 2023 18:58:16 +1200 Subject: [PATCH] Reduce repetition in Makefile --- Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 8727760..b03e8bf 100644 --- a/Makefile +++ b/Makefile @@ -1,26 +1,25 @@ -PROG = esv IMPORT = import PREFIX = /usr/local MANPREFIX = /usr/share/man DC = ldc2 -CFLAGS = -O -I${IMPORT} +CFLAGS = -O -I${IMPORT} -w OBJS = main.o esv.o ini.o all: esv esv: ${OBJS} - ${DC} ${CFLAGS} -of=${PROG} ${OBJS} + ${DC} ${CFLAGS} -of$@ ${OBJS} # main executable main.o: main.d esv.o - ${DC} -c ${CFLAGS} main.d -of=main.o + ${DC} ${CFLAGS} -c main.d -of$@ esv.o: esv.d - ${DC} -c -i ${CFLAGS} esv.d -of=esv.o + ${DC} ${CFLAGS} -c esv.d -of$@ ini.o: ${IMPORT}/dini/*.d - ${DC} -c -i ${CFLAGS} ${IMPORT}/dini/*.d -of=ini.o + ${DC} ${CFLAGS} -c ${IMPORT}/dini/*.d -of$@ clean: rm -f ${PROG} ${OBJS}