OSDN Git Service

Convert to monolithic configuration procedure.
[pf3gnuchains/pf3gnuchains3x.git] / winsup / mingw / mingwex / Makefile.in
index 3dd91a5..2ccffe1 100644 (file)
@@ -4,16 +4,24 @@
 # This makefile requires GNU make.
 
 srcdir = @srcdir@
+top_srcdir = @top_srcdir@
 VPATH = $(srcdir):$(srcdir)/math:$(srcdir)/stdio:$(srcdir)/complex $(srcdir)/gdtoa
+
+# FIXME: I see no reason to define `objdir';
+# it appears to be unused, and could be removed.
 objdir = .
 
 target_alias = @target_alias@
 prefix = @prefix@
 
+datarootdir = @datarootdir@
 program_transform_name = @program_transform_name@
 exec_prefix = @exec_prefix@
 bindir = @bindir@
 libdir = @libdir@
+
+# FIXME: Use of `target_alias' is extremely suspect here;
+# (see relevant note in top level Makefile).
 tooldir = $(exec_prefix)/$(target_alias)
 datadir = @datadir@
 infodir = @infodir@
@@ -25,7 +33,9 @@ INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
-DISTFILES = Makefile.in configure configure.in aclocal.m4 \
+
+DISTFILES = \
+       Makefile.in configure configure.in aclocal.m4 \
        _Exit.c atoll.c dirent.c feclearexcept.c fegetenv.c \
        fegetexceptflag.c fegetround.c feholdexcept.c feraiseexcept.c \
        fesetenv.c fesetexceptflag.c fesetround.c fetestexcept.c \
@@ -37,7 +47,7 @@ DISTFILES = Makefile.in configure configure.in aclocal.m4 \
        wdirent.c wmemchr.c wmemcmp.c wmemcpy.c wmemmove.c wmemset.c wtoll.c \
        wcrtomb.c wctob.c mbrtowc.c btowc.c mb_wc_common.h \
        gettimeofday.c isblank.c iswblank.c \
-       basename.c dirname.c \
+       basename.c dirname.c usleep.c \
        tsearch.c twalk.c tdelete.c tfind.c
 
 MATH_DISTFILES = \
@@ -53,26 +63,27 @@ MATH_DISTFILES = \
        fpclassify.c fpclassifyf.c fpclassifyl.c \
        frexpf.c frexpl.S fucom.c hypotf.c hypotl.c ilogb.S ilogbf.S \
        ilogbl.S isnan.c isnanf.c isnanl.c ldexpf.c ldexpl.c \
-       lgamma.c lgammaf.c lgammal.c llrint.c \
-       llrintf.c llrintl.c llround.c llroundf.c llroundl.c \
+       lgamma.c lgammaf.c lgammal.c llrint.c llrintf.c llrintl.c \
        log10f.S log10l.S log1p.S log1pf.S log1pl.S log2.S log2f.S \
        log2l.S logb.c logbf.c logbl.c logf.S logl.S lrint.c lrintf.c \
-       lrintl.c lround.c lroundf.c lroundl.c modff.c modfl.c \
+       lrintl.c lround_generic.c modff.c modfl.c \
        nearbyint.S nearbyintf.S nearbyintl.S \
        nextafterf.c nextafterl.c nexttowardf.c nexttoward.c \
        powf.c powi.c powif.c powil.c powl.c \
        remainder.S remainderf.S remainderl.S remquo.S \
-       remquof.S remquol.S rint.c rintf.c rintl.c round.c roundf.c \
-       roundl.c scalbn.S scalbnf.S scalbnl.S s_erf.c sf_erf.c \
+       remquof.S remquol.S rint.c rintf.c rintl.c round_internal.h \
+       round_generic.c scalbn.S scalbnf.S scalbnl.S s_erf.c sf_erf.c \
        signbit.c signbitf.c signbitl.c sinf.S sinhf.c sinhl.c sinl.S \
        sqrtf.c sqrtl.c tanf.S tanhf.c tanhl.c tanl.S tgamma.c \
        tgammaf.c tgammal.c trunc.c truncf.c truncl.c \
-       acosh.c acoshf.c acoshl.c  asinh.c asinhf.c asinhl.c \
+       acosh.c acoshf.c acoshl.c asinh.c asinhf.c asinhl.c \
        atanh.c atanhf.c atanhl.c fastmath.h
 
 STDIO_DISTFILES = \
        fopen64.c fseeko64.c ftello64.c lseek64.c \
        vfscanf.c vfwscanf.c vscanf.c vsscanf.c vswscanf.c vwscanf.c \
+       pformat.c pformat.h printf.c fprintf.c sprintf.c snprintf.c \
+       vprintf.c vfprintf.c vsprintf.c vsnprintf.c \
        snwprintf.c vsnwprintf.c
 
 COMPLEX_DISTFILES = \
@@ -90,7 +101,8 @@ GDTOA_DISTFILES = \
        arithchk.c dmisc.c dtoa.c  g__fmt.c g_dfmt.c g_ffmt.c g_xfmt.c \
        gd_arith.h  gd_qnan.h gdtoa.c gdtoa.h gdtoaimp.h gethex.c gmisc.c \
        hd_init.c hexnan.c  misc.c qnan.c README smisc.c strtodg.c strtodnrp.c \
-       strtof.c strtopx.c sum.c ulp.c mingw_snprintf.c
+       strtof.c strtopx.c sum.c ulp.c
+
 CC = @CC@
 # FIXME: Which is it, CC or CC_FOR_TARGET?
 CC_FOR_TARGET = $(CC)
@@ -102,14 +114,24 @@ WARNFLAGS = -Wall
 
 
 # compiling with Cygwin?
-MNO_CYGWIN = @MNO_CYGWIN@
+NO_CYGWIN := @NO_CYGWIN@
+ifdef NO_CYGWIN
+#
+# FIXME: What is the purpose of this hideous kludge?
+#
+# `CC' should have been appropriately set by the configure script;
+# to mess with it, in this fashion, should neither be necessary,
+# nor accepted.
+#
+override CC := ${NO_CYGWIN} $(firstword $(filter-out ${NO_CYGWIN},${CC}))
+endif
 
 W32API_INCLUDE = @W32API_INCLUDE@
-INCLUDES = -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../include \
+INCLUDES = -I${srcdir} -I${top_srcdir} -I${top_srcdir}/include \
   -nostdinc \
   -iwithprefixbefore include
-ALL_CFLAGS = $(CFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(INCLUDES) $(W32API_INCLUDE) $(MNO_CYGWIN)
-ALL_CXXFLAGS = $(CXXFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(INCLUDES) -nostdinc++ $(W32API_INCLUDE) $(MNO_CYGWIN)
+ALL_CFLAGS = $(CFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(INCLUDES) $(W32API_INCLUDE)
+ALL_CXXFLAGS = $(CXXFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(INCLUDES) -nostdinc++ $(W32API_INCLUDE)
 
 AS = @AS@
 AR = @AR@
@@ -139,7 +161,8 @@ STDLIB_STUB_OBJS = \
 STDIO_OBJS = \
        fopen64.o fseeko64.o ftello64.o lseek64.o \
        vfscanf.o vfwscanf.o vscanf.o vsscanf.o vswscanf.o vwscanf.o \
-       snwprintf.o vsnwprintf.o
+       pformat.o snprintf.o vsnprintf.o snwprintf.o vsnwprintf.o \
+       printf.o fprintf.o sprintf.o vprintf.o vfprintf.o vsprintf.o
 MATH_OBJS = \
        acosf.o acosl.o asinf.o asinl.o atan2f.o atan2l.o \
        atanf.o atanl.o cbrt.o cbrtf.o cbrtl.o ceilf.o ceill.o \
@@ -152,28 +175,30 @@ MATH_OBJS = \
        fpclassify.o fpclassifyf.o fpclassifyl.o \
        frexpf.o frexpl.o fucom.o hypotf.o hypotl.o ilogb.o ilogbf.o \
        ilogbl.o isnan.o isnanf.o isnanl.o ldexpf.o ldexpl.o \
-       lgamma.o lgammaf.o lgammal.o llrint.o \
-       llrintf.o llrintl.o llround.o llroundf.o llroundl.o \
+       lgamma.o lgammaf.o lgammal.o llrint.o llrintf.o llrintl.o \
        log10f.o log10l.o log1p.o log1pf.o log1pl.o log2.o log2f.o \
-       log2l.o logb.o logbf.o logbl.o logf.o logl.o lrint.o lrintf.o \
-       lrintl.o lround.o lroundf.o lroundl.o modff.o modfl.o \
+       log2l.o logb.o logbf.o logbl.o logf.o logl.o \
+       lrint.o lrintf.o lrintl.o modff.o modfl.o \
        nearbyint.o nearbyintf.o nearbyintl.o \
        nextafterf.o nextafterl.o nexttowardf.o nexttoward.o \
        powf.o powi.o powif.o powil.o powl.o \
        remainder.o remainderf.o remainderl.o remquo.o \
-       remquof.o remquol.o rint.o rintf.o rintl.o round.o roundf.o \
-       roundl.o scalbn.o scalbnf.o scalbnl.o s_erf.o sf_erf.o \
+       remquof.o remquol.o rint.o rintf.o rintl.o \
+       scalbn.o scalbnf.o scalbnl.o s_erf.o sf_erf.o \
        signbit.o signbitf.o signbitl.o sinf.o sinhf.o sinhl.o sinl.o \
        sqrtf.o sqrtl.o tanf.o tanhf.o tanhl.o tanl.o tgamma.o \
        tgammaf.o tgammal.o trunc.o truncf.o truncl.o \
        acosh.o acoshf.o acoshl.o asinh.o asinhf.o asinhl.o \
        atanh.o atanhf.o atanhl.o
+MATH_ROUND_OBJS = round.o roundf.o roundl.o
+MATH_LROUND_OBJS = lround.o lroundf.o lroundl.o
+MATH_LLROUND_OBJS = llround.o llroundf.o llroundl.o
 FENV_OBJS = fesetround.o  fegetround.o \
        fegetenv.o fesetenv.o feupdateenv.o \
        feclearexcept.o feholdexcept.o fegetexceptflag.o \
        feraiseexcept.o fetestexcept.o fesetexceptflag.o
 POSIX_OBJS = \
-       dirent.o wdirent.o getopt.o ftruncate.o gettimeofday.o \
+       dirent.o wdirent.o getopt.o ftruncate.o gettimeofday.o usleep.o \
        basename.o dirname.o tsearch.o twalk.o tdelete.o tfind.o
 REPLACE_OBJS = \
        mingw-aligned-malloc.o mingw-fseek.o
@@ -190,11 +215,11 @@ COMPLEX_OBJS = \
 GDTOA_OBJS = \
        dmisc.o dtoa.o g__fmt.o g_dfmt.o g_ffmt.o g_xfmt.o gdtoa.o \
        gethex.o gmisc.o hd_init.o hexnan.o misc.o smisc.o \
-       strtodg.o strtodnrp.o strtof.o strtopx.o sum.o ulp.o \
-       mingw_snprintf.o
+       strtodg.o strtodnrp.o strtof.o strtopx.o sum.o ulp.o
 
 LIB_OBJS = $(Q8_OBJS)  $(CTYPE_OBJS) $(STDLIB_STUB_OBJS) \
-       $(STDIO_OBJS) $(MATH_OBJS)  $(FENV_OBJS) \
+       $(STDIO_OBJS) $(MATH_OBJS) $(MATH_ROUND_OBJS) \
+       $(MATH_LROUND_OBJS) $(MATH_LLROUND_OBJS) $(FENV_OBJS) \
        $(POSIX_OBJS) $(REPLACE_OBJS) $(COMPLEX_OBJS) \
        $(GDTOA_OBJS)
 
@@ -208,11 +233,21 @@ $(LIBMINGWEX_A): $(LIB_OBJS)
        $(AR) $(ARFLAGS) $@ $(LIB_OBJS)
        $(RANLIB) $@
 
-Makefile: Makefile.in config.status configure
-       $(SHELL) config.status
+$(MATH_ROUND_OBJS): round_generic.c
+       $(CC) $(ALL_CFLAGS) -I$(srcdir)/math -c -o $@ \
+         -D FUNCTION=$* $(srcdir)/math/round_generic.c
 
-config.status: configure
-       $(SHELL) config.status --recheck
+$(MATH_LROUND_OBJS) $(MATH_LLROUND_OBJS): lround_generic.c
+       $(CC) $(ALL_CFLAGS) -I$(srcdir)/math -c -o $@ \
+         -D FUNCTION=$* $(srcdir)/math/lround_generic.c
+
+top_builddir = @top_builddir@
+
+Makefile: Makefile.in ${top_builddir}/config.status ${top_srcdir}/configure
+       cd ${top_builddir}; $(SHELL) config.status
+
+${top_builddir}/config.status: ${top_srcdir}/configure
+       cd ${top_builddir}; $(SHELL) config.status --recheck
 
 info:
 
@@ -240,6 +275,14 @@ distclean:
 .s.o:
        $(CC) -c  $< -o $@
 
+# pformat.o needs an explicit build rule; we always build it
+# assuming __MSVCRT_VERSION__ >= 0x0800, relying on ofmt_stub.s
+# (in the parent directory) to maintain forward compatibility
+# for earlier versions of MSVCRT.DLL
+#
+PFORMAT_CFLAGS = $(ALL_CFLAGS) -I $(srcdir)/gdtoa -D__MSVCRT_VERSION__=0x0800
+pformat.o: pformat.c pformat.h
+       $(CC) -c $(PFORMAT_CFLAGS) $(srcdir)/stdio/$*.c -o $@
 
 #
 # Dependencies
@@ -253,6 +296,17 @@ mbrtowc.o wcrtomb.o wcstof.o wcstold.o: mb_wc_common.h
 
 $(GDTOA_OBJS): gd_arith.h gdtoa.h gdtoaimp.h gd_qnan.h
 
+$(MATH_ROUND_OBJS) $(MATH_LROUND_OBJS) $(MATH_LLROUND_OBJS): round_internal.h
+
+printf.o:     printf.c     pformat.h
+fprintf.o:    fprintf.c    pformat.h
+sprintf.o:    sprintf.c    pformat.h
+snprintf.o:   snprintf.c   pformat.h
+vprintf.o:    vprintf.c    pformat.h
+vfprintf.o:   vfprintf.c   pformat.h
+vsprintf.o:   vsprintf.c   pformat.h
+vsnprintf.o:  vsnprintf.c  pformat.h
+
 dist:
        mkdir $(distdir)/mingwex
        chmod 755 $(distdir)/mingwex
@@ -279,3 +333,5 @@ dist:
        @for i in $(GDTOA_DISTFILES); do\
                cp -p $(srcdir)/gdtoa/$$i $(distdir)/mingwex/gdtoa/$$i ; \
        done
+
+# $RCSfile$: end of file