# Makefile for Math-emu framework

.c.o:
	$(CC) $(CFLAGS) -c $<
.S.o:
	$(CC) -D__ASSEMBLY__ -traditional -Wa,-m68030 -m68881 -c $< -o $*.o

OBJS	= emul.o entry.o fpu_emul.o fpu_calc.o fpu_add.o fpu_div.o \
	fpu_exp.o fpu_expl.o fpu_fmov.o fpu_fsca.o fpu_fsto.o fpu_gete.o\
	fpu_hype.o fpu_impl.o fpu_int.o fpu_log.o fpu_mul.o fpu_rem.o \
	fpu_sqrt.o fpu_subr.o fpu_trig.o fpu_sin.o


all: fpu68881-emu.o

include ../../../versions.mk

fpu68881-emu.o: $(OBJS)
	$(LD) -r -o $@ $(OBJS)
	
clean:
	$(RM) $(RMFLAGS) *.o *.a

dep:
	$(CPP) -M *.[cS] > .depend

modules:

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
