ICU-5764 Cygwin's ar currently doesn't handle win64, and GNU make's implicit rules are incompatible with gmake -j2. This is the first attempt to fix these issues.

X-SVN-Rev: 21959
This commit is contained in:
George Rhoten 2007-07-13 08:10:41 +00:00
parent fa26cd5d10
commit 9bc3cbe26e
16 changed files with 49 additions and 46 deletions

View file

@ -218,6 +218,8 @@ AC_DEFUN(AC_CHECK_64BIT_LIBS,
if test "$ENABLE_64BIT_LIBS" = no; then
CPPFLAGS="${OLD_CPPFLAGS}"
LDFLAGS="${OLD_LDFLAGS}"
else
ARFLAGS="${ARFLAGS} /MACHINE:AMD64"
fi
fi
;;

View file

@ -1,6 +1,6 @@
#******************************************************************************
#
# Copyright (C) 1999-2006, International Business Machines
# Copyright (C) 1999-2007, International Business Machines
# Corporation and others. All Rights Reserved.
#
#******************************************************************************
@ -178,7 +178,8 @@ unicode/platform.h: $(srcdir)/unicode/platform.h.in $(top_builddir)/config.statu
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
ifneq ($(ENABLE_STATIC),)
$(TARGET): $(TARGET)($(STATIC_OBJECTS))
$(TARGET): $(STATIC_OBJECTS)
$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
$(RANLIB) $@
endif

View file

@ -1,5 +1,5 @@
## -*-makefile-*-
## Copyright (c) 2003-2006 IBM, Ken Foskey, and others. All rights reserved.
## Copyright (c) 2003-2007 IBM, Ken Foskey, and others. All rights reserved.
##
## Aix-specific setup (for gcc)
##
@ -19,8 +19,6 @@ LINK.cc= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS)
## Commands to make a shared library
SHLIB.c= $(AIX_PREDELETE) $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-bexpall
SHLIB.cc= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-bexpall
#SHLIB.c= $(AIX_PREDELETE) $(AIX_SHLIB) -p 5000 $(LDFLAGS) -bexpall
#SHLIB.cc= $(AIX_PREDELETE) $(AIX_SHLIB) -p 5000 $(LDFLAGS) -bexpall
## Compiler switch to embed a runtime search path
LD_RPATH= -I

View file

@ -75,6 +75,12 @@ OUTOPT = /out:
LIBSICU = $(STATIC_PREFIX)$(ICUPREFIX)
A = lib
# Cygwin's ar can't handle Win64 right now. So we use Microsoft's tool instead.
AR = LIB.EXE
ARFLAGS := /nologo $(ARFLAGS:r=)
RANLIB = ls -s
AR_OUTOPT = /OUT:
## An import library is needed for z/OS and MSVC
IMPORT_LIB_EXT = .lib
@ -88,7 +94,11 @@ I18N_STUBNAME = in
LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)
## Link commands to link to ICU libs
ifeq ($(wildcard $(LIBDIR)/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX).lib),)
LIBICUDT= $(top_builddir)/stubdata/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX).lib
else
LIBICUDT= $(LIBDIR)/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX).lib
endif
LIBICUUC= $(LIBDIR)/$(LIBICU)$(COMMON_STUBNAME)$(ICULIBSUFFIX).lib $(LIBICUDT)
LIBICUI18N= $(LIBDIR)/$(LIBICU)$(I18N_STUBNAME)$(ICULIBSUFFIX).lib
LIBICULE= $(LIBDIR)/$(LIBICU)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX).lib

View file

@ -3121,6 +3121,8 @@ fi
if test "$ENABLE_64BIT_LIBS" = no; then
CPPFLAGS="${OLD_CPPFLAGS}"
LDFLAGS="${OLD_LDFLAGS}"
else
ARFLAGS="${ARFLAGS} /MACHINE:AMD64"
fi
fi
;;

View file

@ -1,6 +1,6 @@
#******************************************************************************
#
# Copyright (C) 1998-2006, International Business Machines
# Copyright (C) 1998-2007, International Business Machines
# Corporation and others. All Rights Reserved.
#
#******************************************************************************
@ -156,7 +156,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
ifneq ($(ENABLE_STATIC),)
$(TARGET): $(TARGET)($(STATIC_OBJECTS))
$(TARGET): $(STATIC_OBJECTS)
$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
$(RANLIB) $@
endif

View file

@ -1,9 +1,8 @@
# Make definitions that are shared by the different subprojects of ICU.
#
# Yves Arrouye.
#
# Copyright (C) 2000-2006, International Business Machines Corporation and others.
# Copyright (C) 2000-2007, International Business Machines Corporation and others.
# All Rights Reserved.
#
@ -99,9 +98,8 @@ ENABLE_RELEASE = @ENABLE_RELEASE@
EXEEXT = @EXEEXT@
CC = @CC@
CXX = @CXX@
AIX_SHLIB = @AIX_SHLIB@
AR = @AR@
ARFLAGS := @ARFLAGS@ $(ARFLAGS)
ARFLAGS = @ARFLAGS@ r
RANLIB = @RANLIB@
COMPILE_LINK_ENVVAR = @COMPILE_LINK_ENVVAR@
@ -129,6 +127,8 @@ LIB_M = @LIB_M@
LIB_THREAD = @LIB_THREAD@
# OUTOPT is for creating a specific output name
OUTOPT = -o # The extra space after the argument is needed.
# AR_OUTOPT is for creating a specific output name for static libraries.
AR_OUTOPT =
ENABLE_RPATH = @ENABLE_RPATH@
ifeq ($(ENABLE_RPATH),YES)

View file

@ -1,6 +1,6 @@
#******************************************************************************
#
# Copyright (C) 1999-2006, International Business Machines
# Copyright (C) 1999-2007, International Business Machines
# Corporation and others. All Rights Reserved.
#
#******************************************************************************
@ -141,7 +141,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
ifneq ($(ENABLE_STATIC),)
$(TARGET): $(TARGET)($(STATIC_OBJECTS))
$(TARGET): $(STATIC_OBJECTS)
$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
$(RANLIB) $@
endif

View file

@ -211,7 +211,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
ifneq ($(ENABLE_STATIC),)
$(TARGET): $(TARGET)($(STATIC_OBJECTS))
$(TARGET): $(STATIC_OBJECTS)
$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
$(RANLIB) $@
endif

View file

@ -142,7 +142,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
ifneq ($(ENABLE_STATIC),)
$(TARGET): $(TARGET)($(STATIC_OBJECTS))
$(TARGET): $(STATIC_OBJECTS)
$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
$(RANLIB) $@
endif

View file

@ -1,6 +1,6 @@
#******************************************************************************
#
# Copyright (C) 1999-2005, International Business Machines
# Copyright (C) 1999-2007, International Business Machines
# Corporation and others. All Rights Reserved.
#
#******************************************************************************
@ -124,7 +124,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
&& CONFIG_FILES=common/unicode/platform.h CONFIG_HEADERS= $(SHELL) ./config.status
ifneq ($(ENABLE_STATIC),)
$(TARGET): $(TARGET)($(STATIC_OBJECTS))
$(TARGET): $(STATIC_OBJECTS)
$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
$(RANLIB) $@
endif

View file

@ -1,6 +1,6 @@
#******************************************************************************
#
# Copyright (C) 1999-2006, International Business Machines
# Copyright (C) 1999-2007, International Business Machines
# Corporation and others. All Rights Reserved.
#
#******************************************************************************
@ -96,7 +96,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
ifneq ($(ENABLE_STATIC),)
$(TARGET): $(TARGET)($(STATIC_OBJECTS))
$(TARGET): $(STATIC_OBJECTS)
$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
$(RANLIB) $@
endif

View file

@ -1,6 +1,6 @@
/**************************************************************************
*
* Copyright (C) 2000-2006, International Business Machines
* Copyright (C) 2000-2007, International Business Machines
* Corporation and others. All Rights Reserved.
*
***************************************************************************
@ -141,12 +141,12 @@ char * convertToNativePathSeparators(char *path);
#ifdef U_WINDOWS
# ifndef UDATA_SO_SUFFIX
# define UDATA_SO_SUFFIX ".DLL"
# define UDATA_SO_SUFFIX ".dll"
# endif
# define LIB_PREFIX ""
# define LIB_STATIC_PREFIX ""
# define OBJ_SUFFIX ".obj"
# define UDATA_LIB_SUFFIX ".LIB"
# define UDATA_LIB_SUFFIX ".lib"
#elif defined(U_CYGWIN)
# define LIB_PREFIX "cyg"

View file

@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright (C) 2002-2006, International Business Machines
* Copyright (C) 2002-2007, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@ -32,17 +32,6 @@
#include <stdio.h>
#include <stdlib.h>
/** set if AR is NOT to be called implicitly by gnumake
** (i.e. if the form libblah.a($(OBJECTS) doesnt work)
**/
#if !defined(NO_IMPLICIT_AR)
#if defined(OS400) || defined(OS390)
# define NO_IMPLICIT_AR 1
#else
# define NO_IMPLICIT_AR 0
#endif
#endif
void pkg_sttc_writeReadme(struct UPKGOptions_ *o, const char *libName, UErrorCode *status)
{
char tmp[1024];
@ -242,14 +231,9 @@ void pkg_mode_static(UPKGOptions *o, FileStream *makefile, UErrorCode *status)
T_FileStream_writeLine(makefile,"$(TEMP_PATH)%.$(STATIC_O): $(TEMP_PATH)%.c\n\t $(COMPILE.c) -o $@ $<\n\n");
#if NO_IMPLICIT_AR
T_FileStream_writeLine(makefile, "$(TARG_PATH)$(LIB_TARGET):$(TARG_PATH)$(LIB_TARGET) $(OBJECTS) $(LISTFILES)\n"
"\t$(AR) $(ARFLAGS) $(TARG_PATH)$(LIB_TARGET) $(OBJECTS)\n"
T_FileStream_writeLine(makefile, "$(TARG_PATH)$(LIB_TARGET): $(OBJECTS) $(LISTFILES)\n"
"\t$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $(OBJECTS)\n"
"\t$(RANLIB) $@\n\n");
#else
T_FileStream_writeLine(makefile, "$(TARG_PATH)$(LIB_TARGET):$(TARG_PATH)$(LIB_TARGET)($(OBJECTS)) $(LISTFILES)\n"
"\t$(RANLIB) $@\n\n");
#endif
T_FileStream_writeLine(makefile, "CLEANFILES= $(CMNLIST) $(OBJECTS) $(TARG_PATH)$(LIB_TARGET) $(TARG_PATH)$(MIDDLE_STATIC_LIB_TARGET) $(TARG_PATH)$(TARGET)\n\nclean:\n\t-$(RMV) $(CLEANFILES) $(MAKEFILE)");

View file

@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright (C) 2000-2006, International Business Machines
* Copyright (C) 2000-2007, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@ -167,8 +167,7 @@ void pkg_mode_windows(UPKGOptions *o, FileStream *makefile, UErrorCode *status)
sprintf(tmp2,
"LINK32 = LIB.exe\n"
"LINK32_FLAGS = /nologo /out:\"$(TARGETDIR)\\$(DLLTARGET)\" /EXPORT:\"%s\"\n",
o->libName
"LINK32_FLAGS = /nologo /out:\"$(TARGETDIR)\\$(DLLTARGET)\"\n"
);
T_FileStream_writeLine(makefile, tmp2);

View file

@ -1,6 +1,6 @@
#******************************************************************************
#
# Copyright (C) 1999-2005, International Business Machines
# Copyright (C) 1999-2007, International Business Machines
# Corporation and others. All Rights Reserved.
#
#******************************************************************************
@ -112,7 +112,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
ifneq ($(ENABLE_STATIC),)
$(TARGET): $(TARGET)($(STATIC_OBJECTS))
$(TARGET): $(STATIC_OBJECTS)
$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
$(RANLIB) $@
endif