2 ## Cygwin-specific setup
3 ## Copyright (c) 2001-2006, International Business Machines Corporation and
4 ## others. All Rights Reserved.
6 ## Commands to generate dependency files
7 GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
8 GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
10 ## Flags to create/use a static library
11 ifneq ($(ENABLE_SHARED),YES)
12 ## Make sure that the static libraries can be built and used
13 CPPFLAGS += -DU_STATIC_IMPLEMENTATION
15 ## Make sure that the static libraries can be built
16 STATICCPPFLAGS = -DU_STATIC_IMPLEMENTATION
19 ## Flags for position independent code
22 SHAREDLIBCPPFLAGS = -DPIC
24 ## Additional flags when building libraries and with threads
25 THREADSCPPFLAGS = -D_REENTRANT
28 # Commands to link. Link with C++ in case static libraries are used.
29 LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
30 #LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
32 ## Commands to make a shared library
33 SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared
34 SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared
36 ## Compiler switch to embed a runtime search path
38 LD_RPATH_PRE= -Wl,-rpath,
40 ## Compiler switch to embed a library name
43 ## Shared object suffix
45 ## Non-shared intermediate object suffix
47 LIBICU = cyg$(ICUPREFIX)
49 # Change the stubnames so that poorly working FAT disks and installation programs can work.
50 # This is also for backwards compatibility.
55 %.$(STATIC_O): $(srcdir)/%.c
56 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
58 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
60 %.$(STATIC_O): $(srcdir)/%.cpp
61 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
63 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
68 @echo "generating dependency information for $<"
70 @$(GEN_DEPS.c) $< >> $@ || (rm -f $@ && FALSE)
73 @echo "generating dependency information for $<"
75 @$(GEN_DEPS.cc) $< >> $@ || (rm -f $@ && FALSE)
77 ## Versioned target for a shared library.
78 ## Since symbolic links don't work the same way on Windows,
79 ## we only use the version major number.
80 #FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
81 FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
82 MIDDLE_SO_TARGET=$(FINAL_SO_TARGET)
84 # The following is for Makefile.inc's use.
85 ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
87 ## Versioned libraries rules
88 #%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
89 # $(RM) $@ && cp ${<F} $@
90 %.$(SO): %$(SO_TARGET_VERSION_MAJOR).$(SO)
91 $(RM) $@ && ln -s ${<F} $@
93 ## Install libraries as executable
94 INSTALL-L=$(INSTALL_PROGRAM)
96 ## Bind internal references
98 # LDflags that pkgdata will use
99 BIR_LDFLAGS= -Wl,-Bsymbolic
101 # Dependencies [i.e. map files] for the final library
104 # Environment variable to set a runtime search path
105 LDLIBRARYPATH_ENVVAR = PATH
107 # The type of assembly to write for generating an object file
108 GENCCODE_ASSEMBLY=-a gcc-cygwin
110 # put this here again so it gets cyguc...
112 #SH#ICULIBS_COMMON_LIB_NAME="${LIBICU}uc${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}"
116 #SH### copied from Makefile.inc
117 #SH#ICULIBS_COMMON="-l${LIBICU}uc${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}"
118 #SH#ICULIBS_DATA="-l${LIBICU}${DATA_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}"
119 #SH#ICULIBS_I18N="-l${LIBICU}${I18N_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}"
120 #SH#ICULIBS_TOOLUTIL="-l${LIBICU}tu${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}"
121 #SH#ICULIBS_CTESTFW="-l${LIBICU}ctestfw${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}"
122 #SH#ICULIBS_ICUIO="-l${LIBICU}io${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}"
123 #SH#ICULIBS_OBSOLETE="-l${LIBICU}obsolete${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}"
124 #SH#ICULIBS_LAYOUT="-l${LIBICU}le${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}"
125 #SH#ICULIBS_LAYOUTEX="-l${LIBICU}lx${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}"
126 #SH#ICULIBS_BASE="${LIBS} -L${libdir}"
127 #SH#ICULIBS="${ICULIBS_BASE} ${ICULIBS_I18N} ${ICULIBS_COMMON} ${ICULIBS_DATA}"
129 ## End Cygwin-specific setup