From 457cb99f57292bc855e53abcdcb7b12d6681e847 Mon Sep 17 00:00:00 2001 From: letoh Date: Wed, 9 Sep 2020 15:30:29 +0800 Subject: [PATCH] use pattern rules instead of suffix rules in the Makefile Both the two suffix rules in current Makefile include prerequisites, so a make with POSIX mode enabled will treat them as rules to build two normal files with strange names (.c.o and .c.eo), rather than create pattern rules implicitly. According to the release note from make 4.3, the POSIX behavior will be adopted as the only behavior in a future release, so use the pattern rules instead. --- build/unix/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/unix/Makefile b/build/unix/Makefile index e80b56d..626d0ce 100644 --- a/build/unix/Makefile +++ b/build/unix/Makefile @@ -73,10 +73,10 @@ LINK = $(CC) $(LDFLAGS) PFOBJS = $(PFSOURCE:.c=.o) PFEMBOBJS = $(PFSOURCE:.c=.eo) -.c.o: $(PFINCLUDES) +%.o: %.c $(PFINCLUDES) $(COMPILE) -c -o $@ $< -.c.eo: $(PFINCLUDES) pfdicdat.h +%.eo: %.c $(PFINCLUDES) pfdicdat.h $(COMPILE) $(EMBCCOPTS) -c -o $@ $< .PHONY: all clean test -- 2.20.1