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