]> git.saurik.com Git - apple/icu.git/blob - icuSources/config/mh-cygwin
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / config / mh-cygwin
1 ## -*-makefile-*-
2 ## Cygwin-specific setup
3 ## Copyright (c) 2001-2003, International Business Machines Corporation and
4 ## others. All Rights Reserved.
5 ##
6 ## $Id: mh-cygwin,v 1.1.1.2 2003/07/03 18:13:33 avery Exp $
7
8 ## Commands to generate dependency files
9 GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
10 GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
11
12 ## Flags for position independent code
13 SHAREDLIBCFLAGS =
14 SHAREDLIBCXXFLAGS =
15 SHAREDLIBCPPFLAGS = -DPIC
16
17 ## Additional flags when building libraries and with threads
18 LIBCPPFLAGS = -D_REENTRANT
19 THREADSCPPFLAGS = -D_REENTRANT
20
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
24
25 ## Compiler switch to embed a runtime search path
26 LD_RPATH=
27 LD_RPATH_PRE= -Wl,-rpath,
28
29 ## Compiler switch to embed a library name
30 LD_SONAME = -Wl,-soname -Wl,$(MIDDLE_SO_TARGET)
31
32 ## Shared object suffix
33 SO = dll
34 ## Non-shared intermediate object suffix
35 STATIC_O = o
36 #LIBICU = $(ICUPREFIX)
37
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)
47
48
49 ## Compilation rules
50 %.$(STATIC_O): $(srcdir)/%.c
51 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
52 %.o: $(srcdir)/%.c
53 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
54
55 %.$(STATIC_O): $(srcdir)/%.cpp
56 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
57 %.o: $(srcdir)/%.cpp
58 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
59
60 ../data/%.o: ../data/%.c
61 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
62
63 ## Dependency rules
64 %.d: $(srcdir)/%.c
65 @echo "generating dependency information for $<"
66 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
67 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
68 [ -s $@ ] || rm -f $@'
69
70 %.d: $(srcdir)/%.cpp
71 @echo "generating dependency information for $<"
72 @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
73 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
74 [ -s $@ ] || rm -f $@'
75
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)
79
80 ## Versioned libraries rules
81 %$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION)$(ICULIBSUFFIX).$(SO)
82 $(RM) $@ && cp $< $@
83 %.$(SO): %$(SO_TARGET_VERSION)$(ICULIBSUFFIX).$(SO)
84 $(RM) $@ && ln -s $< $@
85
86 ## Bind internal references
87
88 # LDflags that pkgdata will use
89 BIR_LDFLAGS= -Wl,-Bsymbolic
90
91 # CPPflags for genccode/gencmn
92 BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
93
94 # Dependencies [i.e. map files] for the final library
95 BIR_DEPS=
96
97 # Environment variable to set a runtime search path
98 LDLIBRARYPATH_ENVVAR = PATH
99
100 ## End Cygwin-specific setup
101