2 ## Cygwin-specific setup
3 ## Copyright (c) 2001-2003, International Business Machines Corporation and
4 ## others. All Rights Reserved.
6 ## $Id: mh-cygwin,v 1.1.1.2 2003/07/03 18:13:33 avery Exp $
8 ## Commands to generate dependency files
9 GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
10 GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
12 ## Flags for position independent code
15 SHAREDLIBCPPFLAGS = -DPIC
17 ## Additional flags when building libraries and with threads
18 LIBCPPFLAGS = -D_REENTRANT
19 THREADSCPPFLAGS = -D_REENTRANT
21 ## Commands to make a shared library
22 SHLIB.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared
23 SHLIB.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -shared
25 ## Compiler switch to embed a runtime search path
27 LD_RPATH_PRE= -Wl,-rpath,
29 ## Compiler switch to embed a library name
30 LD_SONAME = -Wl,-soname -Wl,$(MIDDLE_SO_TARGET)
32 ## Shared object suffix
34 ## Non-shared intermediate object suffix
36 #LIBICU = $(ICUPREFIX)
38 ## Link commands to link to ICU libs
39 LIBICUDT= -L$(top_builddir)/stubdata/ -l$(ICUPREFIX)data$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)
40 LIBICUUC= -L$(top_builddir)/common/ -l$(ICUPREFIX)uc$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)
41 LIBICUI18N= -L$(top_builddir)/i18n/ -l$(ICUPREFIX)i18n$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)
42 LIBICULE= -L$(top_builddir)/layout/ -l$(ICUPREFIX)le$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)
43 LIBICULX= -L$(top_builddir)/layoutex/ -l$(ICUPREFIX)lx$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)
44 LIBCTESTFW= -L$(top_builddir)/tools/ctestfw/ -l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)
45 LIBICUTOOLUTIL= -L$(top_builddir)/tools/toolutil/ -l$(ICUPREFIX)toolutil$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)
46 LIBUSTDIO= -L$(top_builddir)/extra/ustdio/ -l$(ICUPREFIX)io$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)
50 %.$(STATIC_O): $(srcdir)/%.c
51 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
53 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
55 %.$(STATIC_O): $(srcdir)/%.cpp
56 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
58 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
60 ../data/%.o: ../data/%.c
61 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
65 @echo "generating dependency information for $<"
66 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
67 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
68 [ -s $@ ] || rm -f $@'
71 @echo "generating dependency information for $<"
72 @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
73 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
74 [ -s $@ ] || rm -f $@'
76 ## Versioned target for a shared library.
77 FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION)$(ICULIBSUFFIX).$(SO)
78 MIDDLE_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR)$(ICULIBSUFFIX).$(SO)
80 ## Versioned libraries rules
81 %$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION)$(ICULIBSUFFIX).$(SO)
83 %.$(SO): %$(SO_TARGET_VERSION)$(ICULIBSUFFIX).$(SO)
84 $(RM) $@ && ln -s $< $@
86 ## Bind internal references
88 # LDflags that pkgdata will use
89 BIR_LDFLAGS= -Wl,-Bsymbolic
91 # CPPflags for genccode/gencmn
92 BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
94 # Dependencies [i.e. map files] for the final library
97 # Environment variable to set a runtime search path
98 LDLIBRARYPATH_ENVVAR = PATH
100 ## End Cygwin-specific setup