
include			../../../Makefile.top

XTARGETS		= ppc
CFLAGS			+= -msoft-float

ppc-OBJS		= $(obj-y)
obj-$(DARWIN)		+= darwin.c
obj-y			+= init.o mainloop_asm.o

all-local: $(ARCHINCLUDES)/asm_offsets.h
$(ODIR)/mainloop_asm.o: $(ARCHINCLUDES)/asm_offsets.h

$(ARCHINCLUDES)/asm_offsets.h: ../../shared/asm_offsets.c ../../shared/mac_registers.h
	cat $^ > asm_offsets.c
	$(COMPILE) -Wall -S asm_offsets.c
	@$(RM) $@
	@echo "/* WARNING! AUTOMATICALLY GENERATED FROM 'asm_offsets.c' - DO NOT EDIT! */" > $@
	@chmod u+rw $@
	grep '^#define' asm_offsets.s | sed 's/[$$]//' >> $@
	rm asm_offsets.s asm_offsets.c

CLEANFILES		+= asm_offsets.h $(ARCHINCLUDES)/asm_offsets.h

include			$(top_srcdir)/Rules.make
