From 73e44cb803809f1dacaeb1de203ecf42ab1e96a4 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Fri, 26 Sep 2014 15:27:52 -0600 Subject: [PATCH] Fix dependencies for Yacc files. Improve Makefile POSIX compliance. Parallel building issue pointed out by murphm8 and chastai. --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c693c21e..350fc79f 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +.POSIX: + REALCFLAGS = ${CFLAGS} -Wall -Iinclude -Iinclude/asm/gameboy -g -std=c99 # User-defined variables @@ -77,11 +79,14 @@ rgblink: ${rgblink_obj} rgbfix: ${rgbfix_obj} $Q${CC} ${REALCFLAGS} -o $@ ${rgbfix_obj} +.y.c: + $Q${YACC} -d ${YFLAGS} -o $@ $< + .c.o: $Q${CC} ${REALCFLAGS} -c -o $@ $< -src/asm/asmy.c: src/asm/asmy.y - $Q${YACC} -d -o $@ $< +src/asm/gameboy/locallex.c src/asm/globlex.c src/asm/lexer.c: src/asm/asmy.h +src/asm/asmy.h: src/asm/asmy.c src/asm/asmy.y: ${yacc_pre} $Qcat ${yacc_pre} > $@ @@ -112,5 +117,3 @@ wwwman: rgbfix.html $Qmandoc ${MANDOC} src/link/rgblink.1 | sed s/OpenBSD/General/ > \ rgblink.html - -.POSIX: