2003-02-11 00:13:48 +00:00
|
|
|
## -*-makefile-*-
|
|
|
|
## Cygwin-specific setup
|
|
|
|
## Copyright (c) 2001, International Business Machines Corporation and
|
|
|
|
## others. All Rights Reserved.
|
|
|
|
##
|
2003-04-24 21:00:36 +00:00
|
|
|
## $Id: mh-cygwin-msvc,v 1.6 2003/04/24 21:00:35 emader-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 =
|
|
|
|
THREADSCPPFLAGS =
|
|
|
|
|
|
|
|
CPPFLAGS+=/nologo
|
|
|
|
DEFS+=/D"WIN32"
|
|
|
|
LDFLAGS+=/nologo
|
|
|
|
|
|
|
|
# Commands to compile
|
2003-02-17 17:48:50 +00:00
|
|
|
COMPILE.c= $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) /GF /c
|
|
|
|
COMPILE.cc= $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) /GF /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)
|
|
|
|
DEFAULT_LIBS =
|
|
|
|
|
|
|
|
## 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
|
|
|
|
LIBUSTDIO= $(top_builddir)/extra/ustdio/libustdio$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).$lib
|
|
|
|
|
|
|
|
|
|
|
|
## 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$@ $<
|
|
|
|
|
|
|
|
../data/%.o: ../data/%.c
|
|
|
|
$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) /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
|
|
|
|
|