2 ## Cygwin-specific setup
3 ## Copyright (c) 2001-2004, 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 LIBCPPFLAGS = -D_REENTRANT
26 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 @$(SHELL) -ec '$(GEN_DEPS.c) $< >> $@; [ -s $@ ] || rm -f $@'
73 @echo "generating dependency information for $<"
75 @$(SHELL) -ec '$(GEN_DEPS.cc) $< >> $@; [ -s $@ ] || rm -f $@'
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 ## Versioned libraries rules
85 #%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
86 # $(RM) $@ && cp ${<F} $@
87 %.$(SO): %$(SO_TARGET_VERSION_MAJOR).$(SO)
88 $(RM) $@ && ln -s ${<F} $@
90 ## Bind internal references
92 # LDflags that pkgdata will use
93 BIR_LDFLAGS= -Wl,-Bsymbolic
95 # CPPflags for genccode/gencmn
96 BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
98 # Dependencies [i.e. map files] for the final library
101 # Environment variable to set a runtime search path
102 LDLIBRARYPATH_ENVVAR = PATH
104 # The type of assembly to write for generating an object file
105 GENCCODE_ASSEMBLY=-a gcc-cygwin
107 ## End Cygwin-specific setup