diff --git a/sd-emutos/Makefile b/sd-emutos/Makefile index 9798148..f762ded 100644 --- a/sd-emutos/Makefile +++ b/sd-emutos/Makefile @@ -29,4 +29,12 @@ test: xhdi_test.c $(CC) $(CFLAGS) -Wl,-traditional-format xhdi_test.c -o xhditest.prg .PHONY clean: - - rm -rf *.o xhditest.prg \ No newline at end of file + - rm -rf *.o depend xhditest.prg + +depend: $(SOURCES) + $(CC) $(CFLAGS) $(INCLUDE) -M $(SOURCES) | sed -e 's/^\(.*\).o:/$(OBJDIR)\/\1.o:/' > depend + + +ifneq (clean,$(MAKECMDGOALS)) +-include depend +endif diff --git a/sd-emutos/cookie.h b/sd-emutos/cookie.h new file mode 100644 index 0000000..ccd0d60 --- /dev/null +++ b/sd-emutos/cookie.h @@ -0,0 +1,16 @@ +/* + * cookie.h + * + * Created on: 05.05.2013 + * Author: mfro + */ + +#ifndef _COOKIE_H_ +#define _COOKIE_H_ + +#include + +extern int getcookie(uint32_t cookie, uint32_t *p_value); +extern void setcookie(uint32_t cookie, uint32_t value); + +#endif /* _COOKIE_H_ */ diff --git a/sd-emutos/emusd.c b/sd-emutos/emusd.c index f40c0bf..524eb06 100644 --- a/sd-emutos/emusd.c +++ b/sd-emutos/emusd.c @@ -13,7 +13,7 @@ #include #include -//#include "cookie.h" +#include "cookie.h" #define XHDIMAGIC 0x27011992L @@ -55,7 +55,7 @@ cookie_fun bas_sd_vector(cookie_fun old_vector) : "g"(old_vector) : "d1","d2","d3","a0","a1","a2" ); - return retvalue; + return (cookie_fun) retvalue; } int main(int argc, char *argv[])