[hackers] [farbfeld] Makefile - expand targets for portability || Laslo Hunhold

From: <git_AT_suckless.org>
Date: Tue, 30 May 2017 22:26:12 +0200 (CEST)

commit 360eccf00a6de6287a3e4c19b59835ff5d4834dd
Author: Laslo Hunhold <dev_AT_frign.de>
AuthorDate: Tue May 30 22:25:17 2017 +0200
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Tue May 30 22:25:17 2017 +0200

    Makefile - expand targets for portability
    Reading the standard thoroughly revealed that the only way to really
    get a portable Makefile is to list each target explicitly, so that's
    what we'll do now here.

diff --git a/Makefile b/Makefile
index 5cf2e17..120ce25 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -11,16 +11,26 @@ SCR = 2ff
 MAN1 = 2ff.1 $(BIN:=.1)
 MAN5 = farbfeld.5
+all: $(BIN)
 png2ff-LDLIBS = $(PNG-LDLIBS)
 ff2png-LDLIBS = $(PNG-LDLIBS)
 jpg2ff-LDLIBS = $(JPG-LDLIBS)
 ff2jpg-LDLIBS = $(JPG-LDLIBS)
-all: $(BIN)
-$(BIN): $(_AT_:=.o) $(REQ:=.o)
+png2ff: png2ff.o $(REQ:=.o)
+ff2png: ff2png.o $(REQ:=.o)
+jpg2ff: jpg2ff.o $(REQ:=.o)
+ff2jpg: ff2jpg.o $(REQ:=.o)
+ff2pam: ff2pam.o $(REQ:=.o)
+ff2ppm: ff2ppm.o $(REQ:=.o)
-$(BIN:=.o): config.mk $(HDR) $(REQ:=.h)
+png2ff.o: png2ff.c config.mk $(HDR) $(REQ:=.h)
+ff2png.o: ff2png.c config.mk $(HDR) $(REQ:=.h)
+jpg2ff.o: jpg2ff.c config.mk $(HDR) $(REQ:=.h)
+ff2jpg.o: ff2jpg.c config.mk $(HDR) $(REQ:=.h)
+ff2pam.o: ff2pam.c config.mk $(HDR) $(REQ:=.h)
+ff2ppm.o: ff2ppm.c config.mk $(HDR) $(REQ:=.h)
         $(CC) -o $_AT_ $(LDFLAGS) $< $(REQ:=.o) $($*-LDLIBS)
Received on Tue May 30 2017 - 22:26:12 CEST

This archive was generated by hypermail 2.3.0 : Tue May 30 2017 - 22:36:17 CEST