2 ## Cygwin-specific setup
3 ## Copyright (c) 2001-2003, International Business Machines Corporation and
4 ## others. All Rights Reserved.
6 ## $Id: mh-cygwin-msvc,v 1.1.1.1 2003/07/03 18:13:33 avery Exp $
8 ## Commands to generate dependency files
12 ## Flags for position independent code
17 ## Additional flags when building libraries and with threads
26 COMPILE.c= $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) /GF /c
27 COMPILE.cc= $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) /GF /c
30 LINK.c= LINK.EXE /subsystem:console $(LDFLAGS)
31 LINK.cc= LINK.EXE /subsystem:console $(LDFLAGS)
33 ## Commands to make a shared library
34 SHLIB.c= LINK.EXE /DLL $(LDFLAGS)
35 SHLIB.cc= LINK.EXE /DLL $(LDFLAGS)
37 ## Compiler switch to embed a runtime search path
41 ## Compiler switch to embed a library name
44 ## Shared object suffix
46 ## Non-shared intermediate object suffix
48 # OUTOPT is for creating a specific output name
51 ## An import library is needed for z/OS and MSVC
57 ## Link commands to link to ICU libs
58 LIBICUDT= $(top_builddir)/stubdata/$(LIBICU)data$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
59 LIBICUUC= $(top_builddir)/common/$(LIBICU)uc$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
60 LIBICUI18N= $(top_builddir)/i18n/$(LIBICU)i18n$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
61 LIBICULE= $(top_builddir)/layout/$(LIBICU)le$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
62 LIBICULX= $(top_builddir)/layoutex/$(LIBICU)lx$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
63 LIBCTESTFW= $(top_builddir)/tools/ctestfw/$(LIBICU)ctestfw$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
64 LIBICUTOOLUTIL= $(top_builddir)/tools/toolutil/$(LIBICU)toolutil$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
65 LIBUSTDIO= $(top_builddir)/extra/ustdio/$(LIBICU)io$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
69 %.$(STATIC_O): $(srcdir)/%.c
70 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) /Fo$@ $<
72 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) /Fo$@ $<
74 %.$(STATIC_O): $(srcdir)/%.cpp
75 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) /Fo$@ $<
77 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) /Fo$@ $<
79 ../data/%.o: ../data/%.c
80 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) /Fo$@ $<
84 # @echo "generating dependency information for $<"
85 # $(SHELL) -ec '$(GEN_DEPS.c) $< \
86 # | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
87 # [ -s $@ ] || rm -f $@'
90 # @echo "generating dependency information for $<"
91 # $(SHELL) -ec '$(GEN_DEPS.cc) $< \
92 # | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
93 # [ -s $@ ] || rm -f $@'
97 @echo "generating dependency information for $<"
98 @$(GEN_DEPS.c) $< > $@
100 %.d : $(srcdir)/%.cpp
101 @echo "generating dependency information for $<"
102 @$(GEN_DEPS.cc) $< > $@
104 ## Compile a Windows resource file
105 %.res : $(srcdir)/%.rc
108 ## Versioned target for a shared library.
109 FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
110 MIDDLE_SO_TARGET=$(SO_TARGET)
112 ## Versioned import library names.
113 IMPORT_LIB = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(IMPORT_LIB_EXT)
114 MIDDLE_IMPORT_LIB = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)$(IMPORT_LIB_EXT)
115 FINAL_IMPORT_LIB := $(MIDDLE_IMPORT_LIB)
117 ## Versioned libraries rules
118 #%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
119 # $(RM) $@ && cp $< $@
120 %.$(SO): %$(SO_TARGET_VERSION_MAJOR).$(SO)
121 $(RM) $@ && ln -s $< $@
123 ## Bind internal references
125 # LDflags that pkgdata will use
126 BIR_LDFLAGS= -Wl,-Bsymbolic
128 # CPPflags for genccode/gencmn
129 BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
131 # Dependencies [i.e. map files] for the final library
134 # Environment variable to set a runtime search path
135 LDLIBRARYPATH_ENVVAR = PATH
137 ## End Cygwin-specific setup