]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-cygwin
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / config / mh-cygwin
CommitLineData
b75a7d8f
A
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
9GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
10GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
11
12## Flags for position independent code
13SHAREDLIBCFLAGS =
14SHAREDLIBCXXFLAGS =
15SHAREDLIBCPPFLAGS = -DPIC
16
17## Additional flags when building libraries and with threads
18LIBCPPFLAGS = -D_REENTRANT
19THREADSCPPFLAGS = -D_REENTRANT
20
21## Commands to make a shared library
22SHLIB.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared
23SHLIB.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -shared
24
25## Compiler switch to embed a runtime search path
26LD_RPATH=
27LD_RPATH_PRE= -Wl,-rpath,
28
29## Compiler switch to embed a library name
30LD_SONAME = -Wl,-soname -Wl,$(MIDDLE_SO_TARGET)
31
32## Shared object suffix
33SO = dll
34## Non-shared intermediate object suffix
35STATIC_O = o
36#LIBICU = $(ICUPREFIX)
37
38## Link commands to link to ICU libs
39LIBICUDT= -L$(top_builddir)/stubdata/ -l$(ICUPREFIX)data$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)
40LIBICUUC= -L$(top_builddir)/common/ -l$(ICUPREFIX)uc$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)
41LIBICUI18N= -L$(top_builddir)/i18n/ -l$(ICUPREFIX)i18n$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)
42LIBICULE= -L$(top_builddir)/layout/ -l$(ICUPREFIX)le$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)
43LIBICULX= -L$(top_builddir)/layoutex/ -l$(ICUPREFIX)lx$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)
44LIBCTESTFW= -L$(top_builddir)/tools/ctestfw/ -l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)
45LIBICUTOOLUTIL= -L$(top_builddir)/tools/toolutil/ -l$(ICUPREFIX)toolutil$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)
46LIBUSTDIO= -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.
77FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION)$(ICULIBSUFFIX).$(SO)
78MIDDLE_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
89BIR_LDFLAGS= -Wl,-Bsymbolic
90
91# CPPflags for genccode/gencmn
92BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
93
94# Dependencies [i.e. map files] for the final library
95BIR_DEPS=
96
97# Environment variable to set a runtime search path
98LDLIBRARYPATH_ENVVAR = PATH
99
100## End Cygwin-specific setup
101