2003-02-11 00:13:48 +00:00
|
|
|
## -*-makefile-*-
|
|
|
|
## Cygwin-specific setup
|
2003-06-03 20:58:22 +00:00
|
|
|
## Copyright (c) 2001-2003, International Business Machines Corporation and
|
2003-02-11 00:13:48 +00:00
|
|
|
## others. All Rights Reserved.
|
|
|
|
##
|
2003-09-13 09:06:09 +00:00
|
|
|
## $Id: mh-cygwin-msvc,v 1.12 2003/09/13 09:06:09 grhoten-oss Exp $
|
2003-02-11 00:13:48 +00:00
|
|
|
|
|
|
|
## Commands to generate dependency files
|
|
|
|
GEN_DEPS.c= :
|
|
|
|
GEN_DEPS.cc= :
|
|
|
|
|
|
|
|
## Flags for position independent code
|
|
|
|
SHAREDLIBCFLAGS =
|
|
|
|
SHAREDLIBCXXFLAGS =
|
|
|
|
SHAREDLIBCPPFLAGS =
|
|
|
|
|
|
|
|
## Additional flags when building libraries and with threads
|
|
|
|
LIBCPPFLAGS =
|
2003-09-13 08:46:41 +00:00
|
|
|
# /MDd means 'compiles and links a debugable multithreaded program with DLL'
|
|
|
|
#THREADSCFLAGS += /MDd
|
|
|
|
#THREADSCXXFLAGS += /MDd
|
|
|
|
# /MD means 'compiles and links a multithreaded program with DLL'
|
|
|
|
THREADSCFLAGS += /MD
|
|
|
|
THREADSCXXFLAGS += /MD
|
2003-02-11 00:13:48 +00:00
|
|
|
|
2003-09-13 08:46:41 +00:00
|
|
|
# /GF pools strings and places them into read-only memory
|
|
|
|
# TODO: Fix /MD so that multithreading is disabled when requested
|
|
|
|
CFLAGS += /MD /GF
|
|
|
|
CXXFLAGS += /MD /GF
|
2003-02-11 00:13:48 +00:00
|
|
|
CPPFLAGS+=/nologo
|
2003-09-13 09:06:09 +00:00
|
|
|
DEFS+=/D"WIN32"
|
2003-02-11 00:13:48 +00:00
|
|
|
LDFLAGS+=/nologo
|
|
|
|
|
|
|
|
# Commands to compile
|
2003-09-13 08:46:41 +00:00
|
|
|
COMPILE.c= $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) /c
|
|
|
|
COMPILE.cc= $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) /c
|
2003-02-11 00:13:48 +00:00
|
|
|
|
|
|
|
# Commands to link
|
2003-02-17 17:48:50 +00:00
|
|
|
LINK.c= LINK.EXE /subsystem:console $(LDFLAGS)
|
|
|
|
LINK.cc= LINK.EXE /subsystem:console $(LDFLAGS)
|
2003-02-11 00:13:48 +00:00
|
|
|
|
|
|
|
## Commands to make a shared library
|
2003-02-17 17:48:50 +00:00
|
|
|
SHLIB.c= LINK.EXE /DLL $(LDFLAGS)
|
|
|
|
SHLIB.cc= LINK.EXE /DLL $(LDFLAGS)
|
2003-02-11 00:13:48 +00:00
|
|
|
|
|
|
|
## Compiler switch to embed a runtime search path
|
|
|
|
LD_RPATH=
|
|
|
|
LD_RPATH_PRE=
|
|
|
|
|
|
|
|
## Compiler switch to embed a library name
|
|
|
|
LD_SONAME =
|
|
|
|
|
|
|
|
## Shared object suffix
|
|
|
|
SO = dll
|
|
|
|
## Non-shared intermediate object suffix
|
2003-02-17 17:48:50 +00:00
|
|
|
STATIC_O = o
|
2003-02-11 00:13:48 +00:00
|
|
|
# OUTOPT is for creating a specific output name
|
|
|
|
OUTOPT = /out:
|
|
|
|
|
2003-03-19 01:56:39 +00:00
|
|
|
## An import library is needed for z/OS and MSVC
|
|
|
|
IMPORT_LIB_EXT = .lib
|
|
|
|
|
2003-02-11 00:13:48 +00:00
|
|
|
LIBICU = $(ICUPREFIX)
|
2003-09-13 08:46:41 +00:00
|
|
|
DEFAULT_LIBS = advapi32.lib
|
2003-02-11 00:13:48 +00:00
|
|
|
|
|
|
|
## Link commands to link to ICU libs
|
|
|
|
LIBICUDT= $(top_builddir)/stubdata/$(LIBICU)data$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
|
|
|
|
LIBICUUC= $(top_builddir)/common/$(LIBICU)uc$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
|
|
|
|
LIBICUI18N= $(top_builddir)/i18n/$(LIBICU)i18n$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
|
|
|
|
LIBICULE= $(top_builddir)/layout/$(LIBICU)le$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
|
2003-04-24 21:00:36 +00:00
|
|
|
LIBICULX= $(top_builddir)/layoutex/$(LIBICU)lx$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
|
2003-02-11 00:13:48 +00:00
|
|
|
LIBCTESTFW= $(top_builddir)/tools/ctestfw/$(LIBICU)ctestfw$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
|
|
|
|
LIBICUTOOLUTIL= $(top_builddir)/tools/toolutil/$(LIBICU)toolutil$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
|
2003-05-30 23:00:07 +00:00
|
|
|
LIBUSTDIO= $(top_builddir)/extra/ustdio/$(LIBICU)io$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
|
2003-02-11 00:13:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Compilation rules
|
|
|
|
%.$(STATIC_O): $(srcdir)/%.c
|
|
|
|
$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) /Fo$@ $<
|
|
|
|
%.o: $(srcdir)/%.c
|
|
|
|
$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) /Fo$@ $<
|
|
|
|
|
|
|
|
%.$(STATIC_O): $(srcdir)/%.cpp
|
|
|
|
$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) /Fo$@ $<
|
|
|
|
%.o: $(srcdir)/%.cpp
|
|
|
|
$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) /Fo$@ $<
|
|
|
|
|
|
|
|
|
|
|
|
## Dependency rules
|
|
|
|
#%.d: $(srcdir)/%.c
|
|
|
|
# @echo "generating dependency information for $<"
|
|
|
|
# $(SHELL) -ec '$(GEN_DEPS.c) $< \
|
|
|
|
# | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
|
|
|
|
# [ -s $@ ] || rm -f $@'
|
|
|
|
#
|
|
|
|
#%.d: $(srcdir)/%.cpp
|
|
|
|
# @echo "generating dependency information for $<"
|
|
|
|
# $(SHELL) -ec '$(GEN_DEPS.cc) $< \
|
|
|
|
# | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
|
|
|
|
# [ -s $@ ] || rm -f $@'
|
|
|
|
|
|
|
|
## Dependency rules
|
|
|
|
%.d : $(srcdir)/%.c
|
|
|
|
@echo "generating dependency information for $<"
|
|
|
|
@$(GEN_DEPS.c) $< > $@
|
|
|
|
|
|
|
|
%.d : $(srcdir)/%.cpp
|
|
|
|
@echo "generating dependency information for $<"
|
|
|
|
@$(GEN_DEPS.cc) $< > $@
|
|
|
|
|
2003-02-17 17:48:50 +00:00
|
|
|
## Compile a Windows resource file
|
|
|
|
%.res : $(srcdir)/%.rc
|
|
|
|
@rc.exe /fo$@ $<
|
|
|
|
|
2003-02-11 00:13:48 +00:00
|
|
|
## Versioned target for a shared library.
|
2003-03-21 01:12:29 +00:00
|
|
|
FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
|
2003-03-19 01:56:39 +00:00
|
|
|
MIDDLE_SO_TARGET=$(SO_TARGET)
|
|
|
|
|
|
|
|
## Versioned import library names.
|
|
|
|
IMPORT_LIB = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(IMPORT_LIB_EXT)
|
2003-04-10 17:42:21 +00:00
|
|
|
MIDDLE_IMPORT_LIB = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)$(IMPORT_LIB_EXT)
|
|
|
|
FINAL_IMPORT_LIB := $(MIDDLE_IMPORT_LIB)
|
2003-02-11 00:13:48 +00:00
|
|
|
|
|
|
|
## Versioned libraries rules
|
2003-03-21 01:12:29 +00:00
|
|
|
#%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
|
2003-02-11 00:13:48 +00:00
|
|
|
# $(RM) $@ && cp $< $@
|
2003-03-21 01:12:29 +00:00
|
|
|
%.$(SO): %$(SO_TARGET_VERSION_MAJOR).$(SO)
|
2003-02-11 00:13:48 +00:00
|
|
|
$(RM) $@ && ln -s $< $@
|
|
|
|
|
|
|
|
## Bind internal references
|
|
|
|
|
|
|
|
# LDflags that pkgdata will use
|
|
|
|
BIR_LDFLAGS= -Wl,-Bsymbolic
|
|
|
|
|
|
|
|
# CPPflags for genccode/gencmn
|
|
|
|
BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
|
|
|
|
|
|
|
|
# Dependencies [i.e. map files] for the final library
|
|
|
|
BIR_DEPS=
|
|
|
|
|
|
|
|
# Environment variable to set a runtime search path
|
|
|
|
LDLIBRARYPATH_ENVVAR = PATH
|
|
|
|
|
|
|
|
## End Cygwin-specific setup
|
|
|
|
|