#
# Makefile for FPU emulation
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definition is now in the main makefile...

O_TARGET := math-emu.o
O_OBJS   := math.o fsqrtq.o faddq.o fsubq.o fmulq.o fdivq.o fdmulq.o	\
	fqtos.o fqtod.o fitoq.o fstoq.o fdtoq.o fqtoi.o fcmpq.o		\
	fcmpeq.o fsqrts.o fsqrtd.o fadds.o faddd.o fsubs.o fsubd.o	\
	fmuls.o fmuld.o fdivs.o fdivd.o fsmuld.o fdtos.o fstod.o	\
	fstoi.o fdtoi.o	fabss.o fcmps.o fcmpes.o fcmpd.o fcmped.o 	\
	fmovs.o	fnegs.o fitos.o fitod.o	udivmodti4.o ashldi3.o

# if V9_MATHEMU is defined in math.c you should add these to O_OBJS:
#	fmovq.o fnegq.o fabsq.o fqtox.o fxtoq.o fstox.o fdtox.o
#	fabsd.o fmovd.o fnegd.o fxtos.o fxtod.o
ifeq ($(CONFIG_MATHEMU),m)
M_OBJS   := $(O_TARGET)
endif
.S.s:
	$(CPP) -D__ASSEMBLY__ -ansi $< -o $*.s

.S.o:
	$(CC) -D__ASSEMBLY__ -ansi -c $< -o $*.o

ifneq ($(CONFIG_MATHEMU),y)
do_it_all:
endif

include $(TOPDIR)/Rules.make
