ref: e1f5352ba57c15c8bc951edd1141e38158954d75
parent: 8cbc2f44718588433196edda36acdd3f488ec28e
author: Anthony Bentley <[email protected]>
date: Fri Nov 6 13:37:47 EST 2009
makefile now works with BSD make
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,12 @@
all:
+yacc_pre := \
+ src/asm/yaccprt1.y\
+ src/asm/gameboy/yaccprt2.y\
+ src/asm/yaccprt3.y\
+ src/asm/gameboy/yaccprt4.y
+
rgbasm_obj := \
src/asm/alloca.o \
src/asm/asmy.o \
@@ -43,22 +49,22 @@
rm -rf rgbfix $(rgbfix_obj)
rgbasm: $(rgbasm_obj)
- ${CC} $(cflags) -o $@ $^ -lm
+ ${CC} $(cflags) -o $@ $(rgbasm_obj) -lm
xlib: $(xlib_obj)
- ${CC} $(cflags) -o $@ $^
+ ${CC} $(cflags) -o $@ $(xlib_obj)
xlink: $(xlink_obj)
- ${CC} $(cflags) -o $@ $^
+ ${CC} $(cflags) -o $@ $(xlink_obj)
rgbfix: $(rgbfix_obj)
- ${CC} $(cflags) -o $@ $^
+ ${CC} $(cflags) -o $@ $(rgbfix_obj)
.c.o:
${CC} $(cflags) -DGAMEBOY -c -o $@ $<
-.y.c:
- ${YACC} -d -o $@ $^
+src/asm/asmy.c: src/asm/asmy.y
+ ${YACC} -d -o $@ $<
-src/asm/asmy.y: src/asm/yaccprt1.y src/asm/gameboy/yaccprt2.y src/asm/yaccprt3.y src/asm/gameboy/yaccprt4.y
- cat $^ > $@
+src/asm/asmy.y: $(yacc_pre)
+ cat $(yacc_pre) > $@