# Generated automatically from Makefile.in by configure.
# Copyright (C) 2001  MandrakeSoft S.A.
#
#   MandrakeSoft S.A.
#   43, rue d'Aboukir
#   75002 Paris - France
#   http://www.linux-mandrake.com/
#   http://www.mandrakesoft.com/
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA

.SUFFIXES: .cc


SHELL = /bin/sh



CC       = cl
CFLAGS   = /nologo /G6 /MT /W3 /GX /O2 /DNDEBUG /DWIN32 /D_WINDOWS
CXX      = cl
CXXFLAGS = /nologo /G6 /MT /W3 /GX /O2 /DNDEBUG /DWIN32 /D_WINDOWS

#CFLAGS  = -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -mpreferred-stack-boundary=2 -DCPU=686 -march=i686

LDFLAGS    = 
LIBS       = 
X_LIBS     =  -L/usr/X11R6/lib
X_PRE_LIBS =  -lSM -lICE
RANLIB     = echo

#DEBUG	 = -DDEBUGGING
PARANOID = -DPARANOID

L_TARGET = libfpu.a


BX_INCDIRS = -I.. -I../instrument/stubs -I. -I./stubs

FPU_FLAGS = -DUSE_WITH_CPU_SIM $(PARANOID) $(DEBUG) \
	-fno-builtin -DNO_ASSEMBLER
FPU_GLUE_OBJ = wmFPUemu_glue.o

# From 'C' language sources:
C_OBJS = fpu_entry.o errors.o reg_ld_str.o load_store.o \
	fpu_arith.o fpu_aux.o fpu_etc.o fpu_tags.o fpu_trig.o \
	poly_atan.o poly_l2.o poly_2xm1.o poly_sin.o poly_tan.o \
	reg_add_sub.o reg_compare.o reg_constant.o reg_convert.o \
	reg_divide.o reg_mul.o

# From 80x86 assembler sources:
A_OBJS =reg_u_add.o reg_u_div.o reg_u_mul.o reg_u_sub.o \
	div_small.o reg_norm.o reg_round.o \
	wm_shrx.o wm_sqrt.o \
	div_Xsig.o polynom_Xsig.o round_Xsig.o \
	shr_Xsig.o mul_Xsig.o

L_OBJS = $(C_OBJS) $(A_OBJS)

OBJS = \
	fpu.o \
	 \
	$(L_OBJS)


BX_INCLUDES = ../bochs.h ../config.h


.cc.o:
	$(CXX) /c $(CXXFLAGS) $(FPU_FLAGS) $(BX_INCDIRS) /Tp$< /Fo$@

.S.o:
	$(CC) -I./stubs -D__ASSEMBLY__ $(PARANOID) -c $<

.c.o:
	$(CC) /c $(CFLAGS) $(FPU_FLAGS) $(BX_INCDIRS) $< /Fo$@


libfpu.a: $(OBJS)
	-del libfpu.a
	lib.exe /nologo /subsystem:console /machine:I386 /verbose /out:$@ $(OBJS)
	$(RANLIB) libfpu.a

$(OBJS): $(BX_INCLUDES)

clean:
	-del *.o
	-del *.a

dist-clean: clean
	-del Makefile
