#### Start of system configuration section. ####

srcdir =	@srcdir@
VPATH =		@srcdir@

# Common prefix for machine-independent installed files.
prefix =	@prefix@

# Common prefix for machine-dependent installed files.
exec_prefix =	@exec_prefix@

bindir =	$(exec_prefix)/bin
libdir =	$(exec_prefix)/Sys/libs

INSTALL =	@INSTALL@
INSTALL_DATA =	@INSTALL_DATA@

CC =		@CC@

CFLAGS =	@CFLAGS@
LDFLAGS =	@LDFLAGS@

RANLIB =	@RANLIB@
AR =		ar

#### End system configuration section ####

FLAVOR_CFLAGS =	-m$(CPU) -m$(FPU)
OTHER_CFLAGS =	-fomit-frame-pointer
ALL_CFLAGS =	$(CFLAGS) $(FLAVOR_CFLAGS) $(OTHER_CFLAGS) $(INCS) $(DEFS)

DEFS =		-DIEEE_SINGBAS -DHAVE_ATEXIT
INCS =		-I$(srcdir) -I$(srcdir)/../gnulib -I$(srcdir)/../library -I$(srcdir)/../include
LIB =		libgnu.a
SHELL =		/bin/sh

.c.o:
		$(CC) $(ALL_CFLAGS) -c $< -o $@

.s.o:
		cp $< x.c
		$(CC) $(ALL_CFLAGS) -traditional -E x.c -o x.s
		$(CC) $(ALL_CFLAGS) -c x.s -o $@
		rm -f x.c x.s

SRC =		adddf3.s addsf3.s cmpdf2.s cmpsf2.s divdf3.s divsf3.s divsi3.s \
		extendsfdf2.s fabs.s fixdfsi.s fixunsdfsi.s floatsidf.s frexp.s \
		ldexp.s modf.s modsi3.s muldf3.s mulsf3.s mulsi3.s negdf2.s \
		negsf2.s subdf3.s subsf3.s truncdfsf2.s udivsi3.s umodsi3.s \
		umulsi3.s

OBJ =		adddf3.o addsf3.o cmpdf2.o cmpsf2.o divdf3.o divsf3.o divsi3.o \
		extendsfdf2.o fabs.o fixdfsi.o fixunsdfsi.o floatsidf.o frexp.o \
		ldexp.o modf.o modsi3.o muldf3.o mulsf3.o mulsi3.o negdf2.o \
		negsf2.o subdf3.o subsf3.o truncdfsf2.o udivsi3.o umodsi3.o \
		umulsi3.o

$(LIB):		$(OBJ)
		rm -f $@
		$(AR) rv $@ $(OBJ)
		$(RANLIB) $@

clean:
		rm -f *!

clobber:	clean
		rm -f $(OBJ) $(LIB)
