From 1024c308660c595e8c32f42abf808fe8c8d4f997 Mon Sep 17 00:00:00 2001 From: Vegard Nossum Date: Thu, 11 Jun 2009 06:50:48 +0200 Subject: [PATCH] asm: make rgbasm compile on Linux Signed-off-by: Vegard Nossum --- src/asm/Makefile | 13 +++++++++++++ src/asm/include/output.h | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/asm/Makefile diff --git a/src/asm/Makefile b/src/asm/Makefile new file mode 100644 index 00000000..9957c2ca --- /dev/null +++ b/src/asm/Makefile @@ -0,0 +1,13 @@ +all: rgbasm + +asmy.y: yaccprt1.y gameboy/yaccprt2.y yaccprt3.y gameboy/yaccprt4.y + cat $^ > $@ + +.y.c: + bison -d -o $@ $^ + +.c.o: + gcc -Wall -DGAMEBOY -I. -I.. -Iinclude -Igameboy -g -c -o $@ $< + +rgbasm: $(patsubst %.c,%.o,$(wildcard *.c) $(wildcard gameboy/*.c)) + gcc -Wall -o $@ $^ -lm diff --git a/src/asm/include/output.h b/src/asm/include/output.h index 17b3519a..c96c43aa 100644 --- a/src/asm/include/output.h +++ b/src/asm/include/output.h @@ -1,6 +1,7 @@ #ifndef OUTPUT_H #define OUTPUT_H 1 +#include "rpn.h" #include "types.h" struct Section @@ -32,4 +33,4 @@ void out_RelLong (struct Expression *expr); void out_PushSection( void ); void out_PopSection( void ); -#endif \ No newline at end of file +#endif