2000-02-18 03:38:33 +08:00
|
|
|
# Makefile.in for the winsup/mingw directory.
|
2008-02-02 22:14:49 +08:00
|
|
|
# Copyright (c) 1995-2008, 1996, 1997, 1998 Cygnus Solutions
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program 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 General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
# This makefile requires GNU make.
|
|
|
|
|
2009-07-28 04:27:09 +08:00
|
|
|
PACKAGE = @PACKAGE_TARNAME@
|
2006-11-25 23:55:05 +08:00
|
|
|
VERSION = @PACKAGE_VERSION@
|
2007-08-04 06:51:23 +08:00
|
|
|
CYGRELEASE = 1
|
2000-11-22 09:51:53 +08:00
|
|
|
|
2000-02-18 03:38:33 +08:00
|
|
|
VPATH = @srcdir@
|
|
|
|
srcdir = @srcdir@
|
2009-07-28 04:27:09 +08:00
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
top_builddir = @top_builddir@
|
|
|
|
|
|
|
|
# FIXME: I see no reason to define `objdir';
|
|
|
|
# it appears to be unused, and could be removed.
|
2000-02-18 03:38:33 +08:00
|
|
|
objdir = .
|
|
|
|
|
2001-09-17 20:38:45 +08:00
|
|
|
host_alias = @host_alias@
|
|
|
|
build_alias = @build_alias@
|
2000-02-18 03:38:33 +08:00
|
|
|
target_alias = @target_alias@
|
2006-08-30 21:05:05 +08:00
|
|
|
with_cross_host = @with_cross_host@
|
2000-02-18 03:38:33 +08:00
|
|
|
prefix = @prefix@
|
2002-06-15 22:06:21 +08:00
|
|
|
conf_prefix = @prefix@
|
2009-07-28 04:27:09 +08:00
|
|
|
host_os = @host_os@
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2009-07-28 04:27:09 +08:00
|
|
|
datarootdir = @datarootdir@
|
2000-02-18 03:38:33 +08:00
|
|
|
program_transform_name = @program_transform_name@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
bindir = @bindir@
|
|
|
|
libdir = @libdir@
|
2009-07-28 04:27:09 +08:00
|
|
|
|
2007-04-06 04:44:29 +08:00
|
|
|
ifneq (,$(findstring cygwin,$(target_alias)))
|
2009-07-28 04:27:09 +08:00
|
|
|
#
|
|
|
|
# FIXME: What is the purpose of such logic, testing `target_alias'?
|
|
|
|
#
|
|
|
|
# Firstly, there is no code generator being built here. The concept
|
|
|
|
# of `target' is meaningless, and there is no valid reason to expect
|
|
|
|
# that `target_alias' would be anything other than an empty string.
|
|
|
|
# Thus, the validity of such tests is extremely suspect.
|
|
|
|
#
|
|
|
|
# Secondly, the decisions being taken, on the basis of these tests,
|
|
|
|
# rightfully belong in the configure script; all this logic should be
|
|
|
|
# removed, and properly implemented in `configure.in'.
|
|
|
|
#
|
2007-04-06 04:44:29 +08:00
|
|
|
mandir = $(prefix)/share/man
|
|
|
|
mansection = mingw
|
|
|
|
else
|
2007-03-11 08:15:00 +08:00
|
|
|
mandir = @mandir@
|
2007-04-07 18:16:52 +08:00
|
|
|
mansection = 3
|
2007-04-06 04:44:29 +08:00
|
|
|
endif
|
2007-03-21 07:19:34 +08:00
|
|
|
manpage_transform = @mingw_manpage_transform@
|
2001-09-17 20:38:45 +08:00
|
|
|
ifeq ($(target_alias),$(host_alias))
|
|
|
|
ifeq ($(build_alias),$(host_alias))
|
|
|
|
tooldir:=$(exec_prefix)
|
|
|
|
else
|
|
|
|
tooldir:=$(exec_prefix)/$(target_alias)
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
tooldir:=$(exec_prefix)/$(target_alias)
|
|
|
|
endif
|
2000-02-18 03:38:33 +08:00
|
|
|
datadir = @datadir@
|
|
|
|
infodir = @infodir@
|
|
|
|
includedir = @includedir@
|
2001-09-17 20:38:45 +08:00
|
|
|
ifneq (,$(findstring cygwin,$(target_alias)))
|
2009-07-28 04:27:09 +08:00
|
|
|
#
|
|
|
|
# FIXME: Doubtful use of `target_alias', again.
|
|
|
|
#
|
|
|
|
# Here we not only have a dubious test, based on `target_alias',
|
|
|
|
# but we also assign local alternatives for the standard autoconf
|
|
|
|
# installation path macros. This should not be necessary; the
|
|
|
|
# configure script should simply assign appropriate values to
|
|
|
|
# the standard macros, which should be used herein.
|
|
|
|
#
|
2001-09-19 23:37:19 +08:00
|
|
|
inst_bindir:=$(tooldir)/bin
|
|
|
|
inst_includedir:=$(tooldir)/include/mingw
|
|
|
|
inst_libdir:=$(tooldir)/lib/mingw
|
2005-01-04 00:32:25 +08:00
|
|
|
inst_docdir:=$(tooldir)/share/doc/mingw-runtime
|
2009-10-30 05:53:47 +08:00
|
|
|
need-DESTDIR-compatibility = prefix exec_prefix tooldir mandir
|
2001-09-17 20:38:45 +08:00
|
|
|
else
|
2006-10-04 20:52:42 +08:00
|
|
|
ifneq (,$(with_cross_host))
|
2009-07-28 04:27:09 +08:00
|
|
|
#
|
|
|
|
# FIXME: What is the intended purpose of `with_cross_host'?
|
|
|
|
#
|
|
|
|
# Notwithstanding that this conforms to no known standard, and
|
|
|
|
# is completely undocumented, it does not belong here; every one
|
|
|
|
# of these settings is the prerogative of the configure script,
|
|
|
|
# and they should use standard names, as noted above.
|
|
|
|
#
|
2006-10-04 20:52:42 +08:00
|
|
|
inst_bindir:=$(tooldir)/bin
|
|
|
|
inst_includedir:=$(tooldir)/include
|
|
|
|
inst_libdir:=$(tooldir)/lib
|
|
|
|
inst_docdir:=$(tooldir)/share/doc/mingw-runtime
|
2009-10-30 05:53:47 +08:00
|
|
|
need-DESTDIR-compatibility = prefix exec_prefix tooldir mandir
|
2006-10-04 20:52:42 +08:00
|
|
|
else
|
2001-09-17 20:38:45 +08:00
|
|
|
inst_bindir:=$(bindir)
|
|
|
|
inst_includedir:=$(includedir)
|
|
|
|
inst_libdir:=$(libdir)
|
2008-09-07 10:07:29 +08:00
|
|
|
inst_docdir:=$(prefix)/doc/runtime
|
2009-10-30 05:53:47 +08:00
|
|
|
need-DESTDIR-compatibility = prefix bindir includedir libdir mandir
|
2001-09-17 20:38:45 +08:00
|
|
|
endif
|
2006-10-04 20:52:42 +08:00
|
|
|
endif
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2006-06-26 09:41:48 +08:00
|
|
|
# The Mingw headers are installed under a subdirectory of
|
2000-02-18 03:38:33 +08:00
|
|
|
# $(tooldir)/include when configuring in Cygwin.
|
|
|
|
HEADER_SUBDIR = @HEADER_SUBDIR@
|
|
|
|
|
|
|
|
SHELL = /bin/sh
|
|
|
|
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
mkinstalldirs = $(SHELL) @MKINSTALLDIRS@
|
|
|
|
|
2004-07-17 12:31:14 +08:00
|
|
|
CC := @CC@
|
2006-08-30 21:05:05 +08:00
|
|
|
ifneq (,$(findstring cygwin,$(target_alias)))
|
2009-07-28 04:27:09 +08:00
|
|
|
#
|
|
|
|
# FIXME: What is the purpose of this hideous kludge?
|
|
|
|
#
|
|
|
|
# Again, we have a dubious use of `target_alias'. Worse, `CC'
|
|
|
|
# should have been appropriately set by the configure script; to
|
|
|
|
# mess with it, in this fashion, should neither be necessary,
|
|
|
|
# nor accepted.
|
|
|
|
#
|
2004-07-17 12:31:14 +08:00
|
|
|
override CC := ${filter-out -L% -B%,${shell echo $(CC) | sed -e 's%\(-isystem\|-iwithprefixbefore\) *[^ ]*\( \|$$\)% %g'}}
|
2006-08-30 21:05:05 +08:00
|
|
|
endif
|
2000-02-18 03:38:33 +08:00
|
|
|
# FIXME: Which is it, CC or CC_FOR_TARGET?
|
|
|
|
CC_FOR_TARGET = $(CC)
|
|
|
|
AS_FOR_TARGET = $(AS)
|
|
|
|
CFLAGS = @CFLAGS@
|
|
|
|
CXXFLAGS = @CXXFLAGS@
|
|
|
|
|
|
|
|
# compiling with Cygwin?
|
2008-10-13 07:58:17 +08:00
|
|
|
NO_CYGWIN := @NO_CYGWIN@
|
|
|
|
ifdef NO_CYGWIN
|
2009-07-28 04:27:09 +08:00
|
|
|
#
|
|
|
|
# FIXME: Again, this should have been resolved by `configure',
|
|
|
|
# and this kludge should be unnecessary.
|
|
|
|
#
|
2008-10-13 07:58:17 +08:00
|
|
|
override CC := ${NO_CYGWIN} $(firstword ${CC})
|
2000-11-20 09:52:26 +08:00
|
|
|
endif
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
# Either crtdll (CRT_ID 1) or msvcrt (CRT_ID 2).
|
|
|
|
RUNTIME = @RUNTIME@
|
|
|
|
CRT_ID = @CRT_ID@
|
|
|
|
|
|
|
|
# Needed for threading dll.
|
|
|
|
THREAD_DLL = @THREAD_DLL@
|
|
|
|
THREAD_DLL_VERSION = 10
|
|
|
|
THREAD_DLL_NAME = $(THREAD_DLL)$(THREAD_DLL_VERSION).dll
|
|
|
|
|
|
|
|
# Various libraries.
|
|
|
|
LIBM_A=@LIBM_A@
|
|
|
|
|
2003-05-07 00:04:25 +08:00
|
|
|
W32API_INCLUDE = @W32API_INCLUDE@
|
2007-02-15 07:42:07 +08:00
|
|
|
INCLUDES = -I$(srcdir)/include \
|
2004-07-15 18:40:37 +08:00
|
|
|
-I$(srcdir)/../include \
|
2004-07-13 19:23:08 +08:00
|
|
|
-nostdinc \
|
2002-06-13 18:20:48 +08:00
|
|
|
-iwithprefixbefore include
|
2008-10-13 07:58:17 +08:00
|
|
|
ALL_CFLAGS = $(CFLAGS) $(INCLUDES) $(W32API_INCLUDE)
|
|
|
|
ALL_CXXFLAGS = $(CXXFLAGS) $(INCLUDES) -nostdinc++ $(W32API_INCLUDE)
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
AS = @AS@
|
|
|
|
AR = @AR@
|
|
|
|
LD = @LD@
|
|
|
|
AR_FLAGS = rcv
|
|
|
|
RANLIB = @RANLIB@
|
|
|
|
DLLTOOL = @DLLTOOL@
|
2006-06-26 09:41:48 +08:00
|
|
|
DLLTOOLFLAGS =
|
2000-02-18 03:38:33 +08:00
|
|
|
DLLTOOL_FOR_TARGET = $(DLLTOOL)
|
|
|
|
DLLTOOL_FLAGS = --as $(AS_FOR_TARGET)
|
|
|
|
DLLWRAP = @DLLWRAP@
|
|
|
|
DLLWRAP_FOR_TARGET = $(DLLWRAP)
|
|
|
|
DLLWRAP_FLAGS = --dlltool $(DLLTOOL) --as $(AS) --driver-name $(CC)
|
2008-07-29 06:57:43 +08:00
|
|
|
OBJCOPY = @OBJCOPY@
|
|
|
|
NM = @NM@
|
2002-04-10 06:22:17 +08:00
|
|
|
|
2000-11-22 09:51:53 +08:00
|
|
|
TAR = tar
|
2002-04-10 06:22:17 +08:00
|
|
|
TARFLAGS = z
|
|
|
|
TARFILEEXT = .tar.gz
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2009-07-28 04:27:09 +08:00
|
|
|
SUBDIRS = mingwex profile
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2009-07-28 04:27:09 +08:00
|
|
|
# FIXME: Most of these are either redundant, or should be set
|
|
|
|
# directly in the subdirectories' Makefiles, by `configure'.
|
2000-02-18 03:38:33 +08:00
|
|
|
FLAGS_TO_PASS:=\
|
|
|
|
AS="$(AS)" \
|
|
|
|
CC="$(CC)" \
|
|
|
|
CFLAGS="$(CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_CONFIG)" \
|
|
|
|
CXXFLAGS="$(CXXFLAGS) $(CFLAGS_COMMON) $(CFLAGS_CONFIG)" \
|
|
|
|
EXE_LDFLAGS="$(EXE_LDFLAGS)" \
|
|
|
|
AR="$(AR)" \
|
|
|
|
RANLIB="$(RANLIB)" \
|
|
|
|
LD="$(LD)" \
|
2000-11-23 07:43:23 +08:00
|
|
|
DLLTOOL="$(DLLTOOL)" \
|
|
|
|
exec_prefix="$(exec_prefix)" \
|
|
|
|
bindir="$(bindir)" \
|
|
|
|
libdir="$(libdir)" \
|
|
|
|
tooldir="$(tooldir)" \
|
|
|
|
datadir="$(datadir)" \
|
|
|
|
infodir="$(infodir)" \
|
|
|
|
includedir="$(includedir)" \
|
2001-09-17 20:38:45 +08:00
|
|
|
inst_bindir="$(inst_bindir)" \
|
|
|
|
inst_includedir="$(inst_includedir)" \
|
|
|
|
inst_libdir="$(inst_libdir)" \
|
2004-04-23 00:16:25 +08:00
|
|
|
inst_docdir="$(inst_docdir)" \
|
2000-11-23 07:43:23 +08:00
|
|
|
prefix="$(prefix)" \
|
2002-04-10 06:22:17 +08:00
|
|
|
target_alias="$(target_alias)" \
|
|
|
|
TAR="$(TAR)" \
|
|
|
|
TARFLAGS="$(TARFLAGS)" \
|
|
|
|
TARFILEEXT="$(TARFILEEXT)"
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2002-06-13 18:20:48 +08:00
|
|
|
CRT0S = crt1.o dllcrt1.o crt2.o dllcrt2.o CRT_noglob.o crtmt.o crtst.o \
|
2007-06-13 16:26:13 +08:00
|
|
|
CRT_fp8.o CRT_fp10.o txtmode.o binmode.o
|
2002-06-13 18:20:48 +08:00
|
|
|
MINGW_OBJS = CRTglob.o CRTfmode.o CRTinit.o dllmain.o gccmain.o \
|
2010-01-26 06:58:03 +08:00
|
|
|
main.o crtst.o CRT_fp10.o txtmode.o \
|
|
|
|
pseudo-reloc.o pseudo-reloc-list.o cpu_features.o \
|
|
|
|
tlsmcrt.o tlsmthread.o tlssup.o tlsthrd.o
|
2003-05-15 08:21:12 +08:00
|
|
|
|
|
|
|
MOLD_OBJS = isascii.o iscsym.o iscsymf.o toascii.o \
|
|
|
|
strcasecmp.o strncasecmp.o wcscmpi.o
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2003-06-18 21:54:47 +08:00
|
|
|
LIBS = libcrtdll.a \
|
2008-10-12 05:59:04 +08:00
|
|
|
libmsvcrt.a libmsvcrtd.a \
|
2003-06-18 21:54:47 +08:00
|
|
|
libmsvcr70.a libmsvcr70d.a \
|
|
|
|
libmsvcr71.a libmsvcr71d.a \
|
2006-02-13 21:33:07 +08:00
|
|
|
libmsvcr80.a libmsvcr80d.a \
|
2007-11-27 10:14:19 +08:00
|
|
|
libmsvcr90.a libmsvcr90d.a \
|
2011-05-23 11:02:16 +08:00
|
|
|
libmsvcr100.a libmsvcr100d.a \
|
2003-06-18 21:54:47 +08:00
|
|
|
libmingw32.a \
|
|
|
|
libcoldname.a \
|
2008-10-12 05:59:04 +08:00
|
|
|
libmoldname.a libmoldnamed.a \
|
2008-02-02 22:14:49 +08:00
|
|
|
libmoldname70.a libmoldname70d.a \
|
|
|
|
libmoldname71.a libmoldname71d.a \
|
|
|
|
libmoldname80.a libmoldname80d.a \
|
|
|
|
libmoldname90.a libmoldname90d.a \
|
2011-05-23 11:02:16 +08:00
|
|
|
libmoldname100.a libmoldname100d.a \
|
2003-06-18 21:54:47 +08:00
|
|
|
$(LIBM_A) \
|
2010-01-26 06:58:03 +08:00
|
|
|
libmingwthrd_old.a \
|
2003-06-18 21:54:47 +08:00
|
|
|
libmingwthrd.a
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
DLLS = $(THREAD_DLL_NAME)
|
|
|
|
|
2004-04-23 00:27:00 +08:00
|
|
|
INSTDOCS = CONTRIBUTORS \
|
|
|
|
DISCLAIMER \
|
2004-04-23 00:16:25 +08:00
|
|
|
README
|
|
|
|
|
2000-11-22 09:51:53 +08:00
|
|
|
SRCDIST_FILES = CRT_noglob.c CRTfmode.c CRTglob.c CRTinit.c ChangeLog \
|
|
|
|
Makefile.in README TODO config.guess config.sub configure configure.in \
|
2006-11-21 17:30:15 +08:00
|
|
|
aclocal.m4 crt1.c crtdll.def crtmt.c crtst.c dllcrt1.c dllmain.c \
|
2003-02-22 05:12:29 +08:00
|
|
|
gccmain.c init.c install-sh jamfile main.c mkinstalldirs \
|
2008-07-29 06:57:43 +08:00
|
|
|
moldname.def.in msvcrt.def.in ofmt_stub.s \
|
2010-01-26 06:58:03 +08:00
|
|
|
mthr.c mthr_init.c tlsmcrt.c tlsmthread.c tlssup.c tlsthrd.c readme.txt \
|
2003-05-15 08:21:12 +08:00
|
|
|
isascii.c iscsym.c iscsymf.c toascii.c \
|
|
|
|
strcasecmp.c strncasecmp.c wcscmpi.c \
|
2003-01-01 18:00:39 +08:00
|
|
|
CRT_fp8.c CRT_fp10.c test_headers.c txtmode.c binmode.c pseudo-reloc.c \
|
2006-11-21 17:30:15 +08:00
|
|
|
pseudo-reloc-list.c cpu_features.c cpu_features.h \
|
2004-04-23 00:27:00 +08:00
|
|
|
DISCLAIMER CONTRIBUTORS
|
2003-01-01 18:00:39 +08:00
|
|
|
|
2000-11-22 09:51:53 +08:00
|
|
|
|
2000-06-18 01:48:36 +08:00
|
|
|
all_dlls_host = @all_dlls_host@
|
|
|
|
install_dlls_host = @install_dlls_host@
|
|
|
|
|
2000-11-22 09:51:53 +08:00
|
|
|
all: $(CRT0S) $(LIBS) $(all_dlls_host)
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2000-06-18 01:48:36 +08:00
|
|
|
all_dlls_host: $(DLLS)
|
|
|
|
|
|
|
|
install_dlls_host:
|
|
|
|
for i in $(DLLS); do \
|
2009-10-30 05:53:47 +08:00
|
|
|
$(INSTALL_PROGRAM) $$i $(DESTDIR)$(inst_bindir)/$$i ; \
|
2000-06-18 01:48:36 +08:00
|
|
|
done
|
|
|
|
|
2000-02-18 03:38:33 +08:00
|
|
|
_libm_dummy.o:
|
|
|
|
rm -f _libm_dummy.c
|
|
|
|
echo "static int __mingw_libm_dummy;" > _libm_dummy.c
|
|
|
|
$(CC) -c $(ALL_CFLAGS) _libm_dummy.c
|
|
|
|
rm -f _libm_dummy.c
|
|
|
|
|
|
|
|
libm.a: _libm_dummy.o
|
|
|
|
$(AR) rc $@ _libm_dummy.o
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
2010-01-26 06:58:03 +08:00
|
|
|
libmingwthrd.a: crtmt.o
|
|
|
|
$(AR) $(ARFLAGS) $@ crtmt.o
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
|
|
|
libmingwthrd_old.a: crtmt.o mingwthrd.def
|
2000-02-18 03:38:33 +08:00
|
|
|
$(DLLTOOL) $(DLLTOOL_FLAGS) --dllname $(THREAD_DLL_NAME) \
|
|
|
|
--def mingwthrd.def --output-lib $@
|
|
|
|
$(AR) $(ARFLAGS) $@ crtmt.o
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
|
|
|
DLL_OFILES = mthr.o mthr_init.o
|
2008-04-26 19:39:14 +08:00
|
|
|
DLL_CC_STUFF = -B./ -shared $(MNO_CYGWIN) -Wl,--image-base,0x6FBC0000 \
|
2000-02-18 03:38:33 +08:00
|
|
|
-Wl,--entry,_DllMainCRTStartup@12 \
|
2008-04-26 19:39:14 +08:00
|
|
|
$(DLL_OFILES) mingwthrd.def \
|
2003-02-20 18:12:15 +08:00
|
|
|
-Lmingwex
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2003-02-20 18:12:15 +08:00
|
|
|
$(THREAD_DLL_NAME) mingwthrd.def: $(DLL_OFILES) Makefile $(SUBDIRS)
|
2000-02-18 03:38:33 +08:00
|
|
|
$(DLLTOOL) --as $(AS) --output-def mingwthrd.def $(DLL_OFILES)
|
2008-04-26 19:39:14 +08:00
|
|
|
$(CC) $(DLL_CC_STUFF) -o $(THREAD_DLL_NAME)
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
libmingw32.a: $(MINGW_OBJS)
|
|
|
|
$(AR) rc $@ $(MINGW_OBJS)
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
2009-07-28 04:27:09 +08:00
|
|
|
msvcrt.def msvcrtd.def \
|
2003-06-18 21:54:47 +08:00
|
|
|
msvcr70.def msvcr70d.def \
|
|
|
|
msvcr71.def msvcr71d.def \
|
2006-02-13 21:33:07 +08:00
|
|
|
msvcr80.def msvcr80d.def \
|
2011-05-23 11:02:16 +08:00
|
|
|
msvcr90.def msvcr90d.def \
|
|
|
|
msvcr100.def msvcr100d.def: msvcrt.def.in
|
2010-02-14 Roumen Petrov <rumen@users.sourceforge.net>
Issue [2134161]: time64 functions and types for msvcrt >= 8.0
(initial implementation)
* new type: __time32_t
* new structures: _finddata32_t, _finddata32i64_t, _finddata64i32_t,
__stat32, _stat32i64, _stat64i32, __timeb32, __utimbuf32,
__wfinddata32_t, _wfinddata32i64_t, _wfinddata64i32_t
* new functions: _ctime32, _difftime32, _difftime64, _findfirst32
_findfirst32i64, _findfirst64i32, _findnext32, _findnext32i64,
_findnext64i32, _fstat32, _fstat32i64, _fstat64i32, _ftime32,
_futime32, _gmtime32, _localtime32, _mkgmtime32, _mkgmtime64,
_mktime32, _stat32, _stat32i64, _stat64i32, _time32, _utime32,
_wctime32, _wfindfirst32, _wfindfirst32i64, _wfindfirst64i32,
_wfindnext32, _wfindnext32i64, _wfindnext64i32, _wstat32,
_wstat32i64, _wstat64i32,_wutime32
* new define _USE_32BIT_TIME_T set 32 or 64 aliases for: time_t,
ctime, difftime, _findfirst, _findfirsti64, _findnext, _findnexti64,
_fstat, _fstati64, _ftime, _futime, gmtime, localtime, mktime,
_stat, _stati64, time, _utime, _wctime, _wfindfirst, _wfindfirsti64,
_wfindnext, _wfindnexti64, _wstat, _wstati64, _wutime
2010-02-17 10:41:06 +08:00
|
|
|
V=`echo $@ | sed -e 's|[a-z]*\([0-9]*\).*|\1|'`; \
|
|
|
|
test -z "$$V" && V=60; \
|
|
|
|
V="0x0$${V}0"; \
|
2003-02-22 05:12:29 +08:00
|
|
|
$(CC) -DRUNTIME=$(basename $(notdir $@)) \
|
2010-02-14 Roumen Petrov <rumen@users.sourceforge.net>
Issue [2134161]: time64 functions and types for msvcrt >= 8.0
(initial implementation)
* new type: __time32_t
* new structures: _finddata32_t, _finddata32i64_t, _finddata64i32_t,
__stat32, _stat32i64, _stat64i32, __timeb32, __utimbuf32,
__wfinddata32_t, _wfinddata32i64_t, _wfinddata64i32_t
* new functions: _ctime32, _difftime32, _difftime64, _findfirst32
_findfirst32i64, _findfirst64i32, _findnext32, _findnext32i64,
_findnext64i32, _fstat32, _fstat32i64, _fstat64i32, _ftime32,
_futime32, _gmtime32, _localtime32, _mkgmtime32, _mkgmtime64,
_mktime32, _stat32, _stat32i64, _stat64i32, _time32, _utime32,
_wctime32, _wfindfirst32, _wfindfirst32i64, _wfindfirst64i32,
_wfindnext32, _wfindnext32i64, _wfindnext64i32, _wstat32,
_wstat32i64, _wstat64i32,_wutime32
* new define _USE_32BIT_TIME_T set 32 or 64 aliases for: time_t,
ctime, difftime, _findfirst, _findfirsti64, _findnext, _findnexti64,
_fstat, _fstati64, _ftime, _futime, gmtime, localtime, mktime,
_stat, _stati64, time, _utime, _wctime, _wfindfirst, _wfindfirsti64,
_wfindnext, _wfindnexti64, _wstat, _wstati64, _wutime
2010-02-17 10:41:06 +08:00
|
|
|
-D__MSVCRT_VERSION__=$$V \
|
2004-03-19 17:26:13 +08:00
|
|
|
-D__$(basename $(notdir $@))__=1 \
|
2003-02-22 05:12:29 +08:00
|
|
|
-D__MSVCRT__ -C -E -P \
|
|
|
|
-xc-header $? > $@
|
|
|
|
|
|
|
|
moldname-crtdll.def: moldname.def.in
|
2000-11-30 05:14:48 +08:00
|
|
|
$(CC) -DRUNTIME=crtdll \
|
|
|
|
-D__FILENAME__=moldname-crtdll.def \
|
2002-03-27 06:23:25 +08:00
|
|
|
-D__CRTDLL__ -C -E -P \
|
2000-02-18 03:38:33 +08:00
|
|
|
-xc-header $? > $@
|
|
|
|
|
2003-02-22 05:12:29 +08:00
|
|
|
moldname-msvcrt.def: moldname.def.in
|
2000-11-30 05:14:48 +08:00
|
|
|
$(CC) -DRUNTIME=msvcrt \
|
|
|
|
-D__FILENAME__=moldname-msvcrt.def \
|
2002-03-27 06:23:25 +08:00
|
|
|
-D__MSVCRT__ -C -E -P \
|
2000-11-30 05:14:48 +08:00
|
|
|
-xc-header $? > $@
|
|
|
|
|
2003-02-22 05:12:29 +08:00
|
|
|
libcoldname.a: moldname-crtdll.def $(MOLD_OBJS)
|
2000-11-30 05:14:48 +08:00
|
|
|
$(DLLTOOL) --as $(AS) -k -U \
|
|
|
|
--dllname crtdll.dll \
|
2003-02-22 05:12:29 +08:00
|
|
|
--def moldname-crtdll.def \
|
2000-11-30 05:14:48 +08:00
|
|
|
--output-lib $@
|
|
|
|
$(AR) rc $@ $(MOLD_OBJS)
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
2008-02-02 22:14:49 +08:00
|
|
|
libmoldname.a libmoldnamed.a: moldname-msvcrt.def $(MOLD_OBJS)
|
2000-02-18 03:38:33 +08:00
|
|
|
$(DLLTOOL) --as $(AS) -k -U \
|
2008-02-02 22:14:49 +08:00
|
|
|
--dllname msvcrt$(@:libmoldname%a=%)dll \
|
2003-02-22 05:12:29 +08:00
|
|
|
--def moldname-msvcrt.def \
|
|
|
|
--output-lib $@
|
|
|
|
$(AR) rc $@ $(MOLD_OBJS)
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
2008-10-12 05:59:04 +08:00
|
|
|
libmoldname70.a libmoldname70d.a \
|
|
|
|
libmoldname71.a libmoldname71d.a \
|
|
|
|
libmoldname80.a libmoldname80d.a \
|
2011-05-23 11:02:16 +08:00
|
|
|
libmoldname90.a libmoldname90d.a \
|
|
|
|
libmoldname100.a libmoldname100d.a: moldname-msvcrt.def $(MOLD_OBJS)
|
2003-02-22 05:12:29 +08:00
|
|
|
$(DLLTOOL) --as $(AS) -k -U \
|
2008-02-02 22:14:49 +08:00
|
|
|
--dllname msvcr$(@:libmoldname%a=%)dll \
|
2003-02-22 05:12:29 +08:00
|
|
|
--def moldname-msvcrt.def \
|
2000-02-18 03:38:33 +08:00
|
|
|
--output-lib $@
|
|
|
|
$(AR) rc $@ $(MOLD_OBJS)
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
2009-07-28 04:27:09 +08:00
|
|
|
# These special rules are necessary...
|
|
|
|
#
|
2000-11-30 05:14:48 +08:00
|
|
|
crt1.o dllcrt1.o:
|
|
|
|
$(CC) -c -D__CRTDLL__ -U__MSVCRT__ $(ALL_CFLAGS) $< -o $@
|
|
|
|
|
2000-02-18 03:38:33 +08:00
|
|
|
crt2.o dllcrt2.o:
|
2000-11-30 05:14:48 +08:00
|
|
|
$(CC) -c -D__MSVCRT__ -U__CRTDLL__ $(ALL_CFLAGS) $< -o $@
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2008-10-12 05:59:04 +08:00
|
|
|
check: check-headers
|
|
|
|
|
2002-08-28 11:57:16 +08:00
|
|
|
TEST_H_OPTIONS = $(ALL_CFLAGS) -Wall -W -Wsystem-headers -c \
|
2002-08-21 06:56:59 +08:00
|
|
|
$(srcdir)/test_headers.c -o test_headers.o
|
|
|
|
|
2008-10-12 05:59:04 +08:00
|
|
|
.PHONY: check-headers
|
|
|
|
check-headers: force
|
2002-08-21 06:56:59 +08:00
|
|
|
@echo "Testing runtime headers..."
|
|
|
|
@for lang in c c++ objective-c ; do \
|
|
|
|
echo "$$lang ..."; \
|
2002-08-28 11:57:16 +08:00
|
|
|
$(CC) -x$$lang $(TEST_H_OPTIONS) ; \
|
|
|
|
echo "$$lang -ansi"; \
|
|
|
|
$(CC) -x$$lang -ansi $(TEST_H_OPTIONS) ; \
|
2002-08-21 06:56:59 +08:00
|
|
|
done
|
2010-02-14 Roumen Petrov <rumen@users.sourceforge.net>
Issue [2134161]: time64 functions and types for msvcrt >= 8.0
(initial implementation)
* new type: __time32_t
* new structures: _finddata32_t, _finddata32i64_t, _finddata64i32_t,
__stat32, _stat32i64, _stat64i32, __timeb32, __utimbuf32,
__wfinddata32_t, _wfinddata32i64_t, _wfinddata64i32_t
* new functions: _ctime32, _difftime32, _difftime64, _findfirst32
_findfirst32i64, _findfirst64i32, _findnext32, _findnext32i64,
_findnext64i32, _fstat32, _fstat32i64, _fstat64i32, _ftime32,
_futime32, _gmtime32, _localtime32, _mkgmtime32, _mkgmtime64,
_mktime32, _stat32, _stat32i64, _stat64i32, _time32, _utime32,
_wctime32, _wfindfirst32, _wfindfirst32i64, _wfindfirst64i32,
_wfindnext32, _wfindnext32i64, _wfindnext64i32, _wstat32,
_wstat32i64, _wstat64i32,_wutime32
* new define _USE_32BIT_TIME_T set 32 or 64 aliases for: time_t,
ctime, difftime, _findfirst, _findfirsti64, _findnext, _findnexti64,
_fstat, _fstati64, _ftime, _futime, gmtime, localtime, mktime,
_stat, _stati64, time, _utime, _wctime, _wfindfirst, _wfindfirsti64,
_wfindnext, _wfindnexti64, _wstat, _wstati64, _wutime
2010-02-17 10:41:06 +08:00
|
|
|
@echo; echo "Testing runtime 8.0 headers..."
|
|
|
|
@for lang in c c++ objective-c ; do \
|
|
|
|
echo "$$lang ..."; \
|
|
|
|
$(CC) -x$$lang -Wall -D__MSVCRT_VERSION__=0x0800 $(TEST_H_OPTIONS) ; \
|
|
|
|
echo "$$lang -ansi"; \
|
|
|
|
$(CC) -x$$lang -Wall -D__MSVCRT_VERSION__=0x0800 -ansi $(TEST_H_OPTIONS) ; \
|
|
|
|
done
|
|
|
|
@echo; echo "Testing runtime 8.0(time32) headers..."
|
|
|
|
@for lang in c c++ objective-c ; do \
|
|
|
|
echo "$$lang ..."; \
|
|
|
|
$(CC) -x$$lang -Wall -D__MSVCRT_VERSION__=0x0800 -D_USE_32BIT_TIME_T $(TEST_H_OPTIONS) ; \
|
|
|
|
echo "$$lang -ansi"; \
|
|
|
|
$(CC) -x$$lang -Wall -D__MSVCRT_VERSION__=0x0800 -D_USE_32BIT_TIME_T -ansi $(TEST_H_OPTIONS) ; \
|
|
|
|
done
|
|
|
|
@echo; echo "Testing runtime 8.0(time32) headers..."
|
2002-08-28 11:57:16 +08:00
|
|
|
# specify -std=xx only for C
|
|
|
|
@for std in gnu89 gnu99 c89 c99 ; do \
|
|
|
|
echo "std = $$std"; \
|
|
|
|
$(CC) -std=$$std $(TEST_H_OPTIONS) ; \
|
|
|
|
done
|
|
|
|
|
2002-08-21 06:56:59 +08:00
|
|
|
@rm -f test_headers.o
|
|
|
|
|
2000-02-18 03:38:33 +08:00
|
|
|
clean:
|
|
|
|
-rm -f *.o *.a *~ core a.out mingwthrd.def mingwthrd.base mingwthrd.exp
|
2001-11-05 21:16:41 +08:00
|
|
|
-rm -f $(THREAD_DLL_NAME) mingwthrd_dummy.exe
|
2008-07-29 06:57:43 +08:00
|
|
|
-rm -f msvcr*.def moldname-*.def
|
2000-02-18 03:38:33 +08:00
|
|
|
@$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
|
|
|
|
|
2003-02-22 05:12:29 +08:00
|
|
|
distclean: clean
|
2000-02-18 03:38:33 +08:00
|
|
|
@$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
|
2006-06-26 09:41:48 +08:00
|
|
|
-rm -f config.cache config.status config.log
|
2000-02-18 03:38:33 +08:00
|
|
|
-rm -f Makefile
|
|
|
|
|
2000-11-23 07:43:23 +08:00
|
|
|
ifdef SNAPDATE
|
2008-09-24 08:59:03 +08:00
|
|
|
distdir=$(PACKAGE)-$(VERSION)-$(SNAPDATE)
|
2000-11-22 09:51:53 +08:00
|
|
|
else
|
2001-09-17 20:38:45 +08:00
|
|
|
ifneq (,$(findstring cygwin, $(target_alias)))
|
|
|
|
distdir=$(PACKAGE)-$(VERSION)-$(CYGRELEASE)
|
|
|
|
else
|
2008-09-07 10:07:29 +08:00
|
|
|
distdir=$(PACKAGE)-$(VERSION)-$(host_os)
|
2001-09-17 20:38:45 +08:00
|
|
|
endif
|
2000-11-22 09:51:53 +08:00
|
|
|
endif
|
|
|
|
|
2002-04-10 06:22:17 +08:00
|
|
|
ifneq (,$(findstring cygwin, $(target_alias)))
|
2009-07-28 04:27:09 +08:00
|
|
|
#
|
|
|
|
# FIXME: Dubious use of `target_alias', yet again.
|
|
|
|
#
|
|
|
|
# Once more, the default settings for these macros could be
|
|
|
|
# more productively determined by `configure'.
|
|
|
|
#
|
2002-04-10 06:22:17 +08:00
|
|
|
TARFLAGS = j
|
|
|
|
TARFILEEXT = .tar.bz2
|
2008-10-29 07:55:39 +08:00
|
|
|
dist_prefix = $(conf_prefix)
|
2002-06-15 22:06:21 +08:00
|
|
|
endif
|
|
|
|
|
2000-11-22 09:51:53 +08:00
|
|
|
dist: srcdist bindist
|
|
|
|
|
|
|
|
srcdist:
|
|
|
|
rm -rf $(distdir)
|
|
|
|
mkdir $(distdir)
|
|
|
|
chmod 755 $(distdir)
|
|
|
|
for i in $(SRCDIST_FILES); do \
|
|
|
|
cp -p $(srcdir)/$$i $(distdir)/$$i ; \
|
|
|
|
done
|
|
|
|
for i in $(SUBDIRS); do \
|
|
|
|
(cd $$i; $(MAKE) distdir=../$(distdir) dist); \
|
|
|
|
done
|
|
|
|
#FIXME this needs to be done with SUBDIRS and Makefiles.
|
2007-03-11 08:15:00 +08:00
|
|
|
#
|
|
|
|
# Maybe, but this is simpler, and adequate for now!
|
|
|
|
# However, as more manpages are added, spanning multiple sections,
|
|
|
|
# we'll probably need a separate Makefile to organise them.
|
|
|
|
#
|
2000-11-22 09:51:53 +08:00
|
|
|
mkdir $(distdir)/include
|
|
|
|
mkdir $(distdir)/include/sys
|
|
|
|
cp $(srcdir)/include/*.h $(distdir)/include/
|
|
|
|
cp $(srcdir)/include/sys/*.h $(distdir)/include/sys/
|
2007-03-11 08:15:00 +08:00
|
|
|
mkdir $(distdir)/man
|
2007-03-21 08:24:25 +08:00
|
|
|
cp $(srcdir)/man/*.man $(distdir)/man/
|
2007-03-11 08:15:00 +08:00
|
|
|
#
|
2000-11-23 07:43:23 +08:00
|
|
|
#end FIXME
|
2000-11-22 09:51:53 +08:00
|
|
|
rm -f $(distdir)-src.tar.gz
|
2002-04-10 06:22:17 +08:00
|
|
|
$(TAR) $(TARFLAGS)cf $(distdir)-src$(TARFILEEXT) $(distdir)
|
2000-11-22 09:51:53 +08:00
|
|
|
|
2008-10-29 07:55:39 +08:00
|
|
|
# Binary package structure is determined according to the
|
|
|
|
# preferred package name assigned at configure time...
|
|
|
|
#
|
|
|
|
bindist: bindist-$(PACKAGE)
|
2000-11-22 09:51:53 +08:00
|
|
|
|
2008-10-29 07:55:39 +08:00
|
|
|
# The directory structure is common to both package styles...
|
|
|
|
#
|
|
|
|
bindist-common:
|
2000-11-22 09:51:53 +08:00
|
|
|
rm -rf $(distdir)
|
|
|
|
mkdir $(distdir)
|
|
|
|
chmod 755 $(distdir)
|
2002-06-15 22:06:21 +08:00
|
|
|
$(MAKE) install prefix=$(shell pwd)/$(distdir)$(dist_prefix)
|
2000-11-22 09:51:53 +08:00
|
|
|
rm -f $(distdir).tar.gz
|
2008-10-29 07:55:39 +08:00
|
|
|
|
|
|
|
# Current MinGW distributions prefer separate `dev' and `dll' bundles,
|
|
|
|
# and use the abbreviated `mingwrt' form for the package name...
|
|
|
|
#
|
|
|
|
DEVDIST_FILES = * --exclude=bin
|
|
|
|
DLLDIST_FILES = bin/*.dll doc/*
|
|
|
|
#
|
|
|
|
bindist-mingwrt: bindist-common
|
2001-09-17 20:38:45 +08:00
|
|
|
cd $(distdir); \
|
2008-10-29 07:55:39 +08:00
|
|
|
$(TAR) $(TARFLAGS)cf ../$(distdir)-dev$(TARFILEEXT) $(DEVDIST_FILES); \
|
|
|
|
$(TAR) $(TARFLAGS)cf ../$(distdir)-dll$(TARFILEEXT) $(DLLDIST_FILES)
|
2008-09-07 10:07:29 +08:00
|
|
|
rm -rf $(distdir)
|
2008-10-29 07:55:39 +08:00
|
|
|
|
|
|
|
# However, Cygwin maintainers continue to prefer a composite package,
|
|
|
|
# retaining the older `mingw-runtime' naming convention...
|
|
|
|
#
|
|
|
|
BINDIST_FILES = *
|
|
|
|
#
|
|
|
|
bindist-mingw-runtime: bindist-common
|
2008-09-07 10:07:29 +08:00
|
|
|
cd $(distdir); \
|
2008-10-29 07:55:39 +08:00
|
|
|
$(TAR) $(TARFLAGS)cf ../$(distdir)$(TARFILEEXT) $(BINDIST_FILES)
|
|
|
|
rm -rf $(distdir)
|
2000-11-22 09:51:53 +08:00
|
|
|
|
2006-06-26 09:41:48 +08:00
|
|
|
snapshot:
|
2000-11-23 07:43:23 +08:00
|
|
|
make dist SNAPDATE=$(shell date '+%Y%m%d')
|
2000-11-22 09:51:53 +08:00
|
|
|
|
2000-02-18 03:38:33 +08:00
|
|
|
info:
|
|
|
|
|
|
|
|
info-html:
|
|
|
|
|
|
|
|
install-info: info
|
|
|
|
|
2009-10-30 05:53:47 +08:00
|
|
|
.PHONY: $(need-DESTDIR-compatibility) fail-DESTDIR-compatibility
|
|
|
|
|
|
|
|
$(need-DESTDIR-compatibility):
|
|
|
|
@test -z "$(DESTDIR)" || case "$($@)" in ?:*) \
|
|
|
|
$(MAKE) --no-print-directory reject="$@" fail-DESTDIR-compatibility ;; \
|
|
|
|
esac
|
|
|
|
|
|
|
|
fail-DESTDIR-compatibility:
|
|
|
|
$(error DESTDIR is not supported when $(reject) contains Win32 path `$($(reject))'; \
|
|
|
|
try `make install $(reject)=$(shell echo '$($(reject))' | sed s,:,:$(DESTDIR),) ...' instead)
|
|
|
|
|
|
|
|
install-dirs: $(need-DESTDIR-compatibility)
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(inst_bindir)
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(inst_includedir)
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(inst_docdir)
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(mandir)/man$(mansection)
|
2000-11-20 09:52:26 +08:00
|
|
|
|
2001-09-06 08:45:51 +08:00
|
|
|
install: all install-dirs $(install_dlls_host)
|
2000-02-18 03:38:33 +08:00
|
|
|
for i in $(LIBS); do \
|
2009-10-30 05:53:47 +08:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(inst_libdir)/$$i ; \
|
2000-02-18 03:38:33 +08:00
|
|
|
done
|
|
|
|
for i in $(CRT0S); do \
|
2009-10-30 05:53:47 +08:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(inst_libdir)/$$i ; \
|
2000-02-18 03:38:33 +08:00
|
|
|
done
|
2004-04-23 00:16:25 +08:00
|
|
|
for i in $(INSTDOCS); do \
|
2009-10-30 05:53:47 +08:00
|
|
|
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(inst_docdir)/$$i ; \
|
2004-04-23 00:16:25 +08:00
|
|
|
done
|
2000-02-18 03:38:33 +08:00
|
|
|
for sub in . sys ; do \
|
2009-10-30 05:53:47 +08:00
|
|
|
dstdir=$(DESTDIR)$(inst_includedir)/$$sub ; \
|
2000-02-18 03:38:33 +08:00
|
|
|
$(mkinstalldirs) $$dstdir ; \
|
|
|
|
for i in $(srcdir)/include/$$sub/*.h ; do \
|
|
|
|
$(INSTALL_DATA) $$i $$dstdir/`basename $$i` ; \
|
|
|
|
done ; \
|
|
|
|
done
|
2007-03-11 08:15:00 +08:00
|
|
|
#
|
|
|
|
# This provisional hack installs the only manpage we have at present...
|
|
|
|
# It simply CANNOT suffice, when we have more manpages to ship.
|
|
|
|
#
|
2009-10-30 05:53:47 +08:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(mandir)/man$(mansection)
|
|
|
|
$(INSTALL_DATA) $(srcdir)/man/dirname.man $(DESTDIR)$(mandir)/man$(mansection)/`\
|
2007-04-07 18:16:52 +08:00
|
|
|
echo dirname.man|sed '$(manpage_transform);s,man$$,$(mansection),'`
|
2009-10-30 05:53:47 +08:00
|
|
|
$(INSTALL_DATA) $(srcdir)/man/dirname.man $(DESTDIR)$(mandir)/man$(mansection)/`\
|
2007-04-07 18:16:52 +08:00
|
|
|
echo basename.man|sed '$(manpage_transform);s,man$$,$(mansection),'`
|
2007-03-11 08:15:00 +08:00
|
|
|
#
|
|
|
|
# End provisional hack.
|
|
|
|
#
|
2000-02-18 03:38:33 +08:00
|
|
|
@$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
|
|
|
|
|
2000-06-18 09:49:23 +08:00
|
|
|
subdirs: $(SUBDIRS)
|
2009-07-28 04:27:09 +08:00
|
|
|
$(SUBDIRS): force
|
|
|
|
@test -n "$(DO)" && g="$(DO)" || g=all; echo "Making \`$$g' in \`$@'"
|
|
|
|
@cd $@; $(MAKE) $(FLAGS_TO_PASS) $(DO)
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
force:
|
|
|
|
|
|
|
|
#
|
2008-07-29 06:57:43 +08:00
|
|
|
# Dependencies
|
2000-02-18 03:38:33 +08:00
|
|
|
#
|
2003-02-22 05:12:29 +08:00
|
|
|
libcrtdll.a: crtdll.def
|
|
|
|
libmsvcrt.a: msvcrt.def
|
|
|
|
libmsvcrtd.a: msvcrtd.def
|
|
|
|
CRT_noglob.o: CRT_noglob.c
|
|
|
|
CRTfmode.o: CRTfmode.c
|
|
|
|
CRTglob.o: CRTglob.c
|
|
|
|
CRTinit.o: CRTinit.c
|
|
|
|
crt1.o: crt1.c init.c
|
|
|
|
crt2.o: crt1.c init.c
|
|
|
|
crtmt.o: crtmt.c
|
|
|
|
crtst.o: crtst.c
|
|
|
|
ctype_old.o: ctype_old.c
|
2006-06-26 09:41:48 +08:00
|
|
|
dllcrt1.o: dllcrt1.c
|
|
|
|
dllcrt2.o: dllcrt1.c
|
2003-02-22 05:12:29 +08:00
|
|
|
dllmain.o: dllmain.c
|
|
|
|
main.o: main.c
|
|
|
|
oldnames.o: oldnames.c
|
|
|
|
string_old.o: string_old.c
|
|
|
|
CRT_fp8.o: CRT_fp8.c
|
|
|
|
CRT_fp10.o: CRT_fp10.c
|
2002-06-13 18:20:48 +08:00
|
|
|
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
Makefile: Makefile.in config.status configure
|
|
|
|
$(SHELL) config.status
|
|
|
|
|
|
|
|
config.status: configure
|
|
|
|
$(SHELL) config.status --recheck
|
|
|
|
|
|
|
|
.SUFFIXES: .y $(SUFFIXES) .cc .def .a
|
|
|
|
|
2008-07-29 06:57:43 +08:00
|
|
|
sym_prefix = __msvcrt
|
|
|
|
|
|
|
|
NM_LOOKUP = $(NM) $@ | sed -n \
|
|
|
|
-e '/:$$/h;/^[0-7][0-7]* *T */{s///;H;g;s/\n//p' \
|
|
|
|
-e '}' | sed -n 's/:_'"$$key"'$$//p'
|
|
|
|
|
|
|
|
MINGW_REPL_FUNCS = printf fprintf sprintf vprintf vfprintf vsprintf
|
|
|
|
|
|
|
|
lib%.a: %.def
|
|
|
|
$(DLLTOOL) --as=$(AS) -k --dllname $*.dll --output-lib $@ --def $<
|
|
|
|
for key in $(MINGW_REPL_FUNCS); do \
|
|
|
|
src=`$(NM_LOOKUP)`; \
|
|
|
|
if test -n "$$src"; then \
|
|
|
|
dst=`echo "$$src" | sed 's/0/4/'`; repl="$$repl $$dst"; \
|
|
|
|
tmpfiles="$$tmpfiles $$src $$dst"; \
|
|
|
|
$(AR) x $@ $$src; \
|
|
|
|
$(OBJCOPY) --redefine-sym _$$key=_$(sym_prefix)_$$key \
|
|
|
|
--redefine-sym __imp__$$key=__imp__$(sym_prefix)_$$key \
|
|
|
|
$$src $$dst; \
|
|
|
|
fi; done; \
|
|
|
|
test `key=_get_output_format; $(NM_LOOKUP)` || \
|
|
|
|
repl="$$repl ofmt_stub.o"; \
|
|
|
|
test -n "$$repl" && $(AR) rcs $@ $$repl; \
|
|
|
|
$(RM) $$tmpfiles
|
|
|
|
|
|
|
|
libmsvcrt.a libmsvcrtd.a: ofmt_stub.o
|
|
|
|
libmsvcr70.a libmsvcr70d.a: ofmt_stub.o
|
|
|
|
libmsvcr71.a libmsvcr71d.a: ofmt_stub.o
|
|
|
|
libcrtdll.a libcrtdlld.a: ofmt_stub.o
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) -c $(ALL_CFLAGS) $< -o $@
|
|
|
|
|
2009-07-28 04:27:09 +08:00
|
|
|
# $RCSfile$: end of file
|