]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-cygwin
ICU-6.2.4.tar.gz
[apple/icu.git] / icuSources / config / mh-cygwin
CommitLineData
b75a7d8f
A
1## -*-makefile-*-
2## Cygwin-specific setup
374ca955 3## Copyright (c) 2001-2004, International Business Machines Corporation and
b75a7d8f 4## others. All Rights Reserved.
b75a7d8f
A
5
6## Commands to generate dependency files
7GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
8GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
9
374ca955
A
10## Flags to create/use a static library
11ifneq ($(ENABLE_SHARED),YES)
12## Make sure that the static libraries can be built and used
13CPPFLAGS += -DU_STATIC_IMPLEMENTATION
14else
15## Make sure that the static libraries can be built
16STATICCPPFLAGS = -DU_STATIC_IMPLEMENTATION
17endif
18
b75a7d8f
A
19## Flags for position independent code
20SHAREDLIBCFLAGS =
21SHAREDLIBCXXFLAGS =
22SHAREDLIBCPPFLAGS = -DPIC
23
24## Additional flags when building libraries and with threads
25LIBCPPFLAGS = -D_REENTRANT
26THREADSCPPFLAGS = -D_REENTRANT
27
374ca955
A
28# Commands to link. Link with C++ in case static libraries are used.
29LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
30#LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
31
b75a7d8f 32## Commands to make a shared library
374ca955
A
33SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared
34SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared
b75a7d8f
A
35
36## Compiler switch to embed a runtime search path
37LD_RPATH=
38LD_RPATH_PRE= -Wl,-rpath,
39
40## Compiler switch to embed a library name
374ca955 41LD_SONAME =
b75a7d8f
A
42
43## Shared object suffix
44SO = dll
45## Non-shared intermediate object suffix
374ca955
A
46STATIC_O = ao
47LIBICU = cyg$(ICUPREFIX)
b75a7d8f 48
374ca955
A
49# Change the stubnames so that poorly working FAT disks and installation programs can work.
50# This is also for backwards compatibility.
51DATA_STUBNAME = dt
52I18N_STUBNAME = in
b75a7d8f
A
53
54## Compilation rules
55%.$(STATIC_O): $(srcdir)/%.c
56 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
57%.o: $(srcdir)/%.c
58 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
59
60%.$(STATIC_O): $(srcdir)/%.cpp
61 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
62%.o: $(srcdir)/%.cpp
63 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
64
b75a7d8f
A
65
66## Dependency rules
67%.d: $(srcdir)/%.c
68 @echo "generating dependency information for $<"
374ca955
A
69 @echo -n "$@ " > $@
70 @$(SHELL) -ec '$(GEN_DEPS.c) $< >> $@; [ -s $@ ] || rm -f $@'
b75a7d8f
A
71
72%.d: $(srcdir)/%.cpp
73 @echo "generating dependency information for $<"
374ca955
A
74 @echo -n "$@ " > $@
75 @$(SHELL) -ec '$(GEN_DEPS.cc) $< >> $@; [ -s $@ ] || rm -f $@'
b75a7d8f
A
76
77## Versioned target for a shared library.
374ca955
A
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)
81FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
82MIDDLE_SO_TARGET=$(FINAL_SO_TARGET)
b75a7d8f
A
83
84## Versioned libraries rules
374ca955
A
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} $@
b75a7d8f
A
89
90## Bind internal references
91
92# LDflags that pkgdata will use
93BIR_LDFLAGS= -Wl,-Bsymbolic
94
95# CPPflags for genccode/gencmn
96BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
97
98# Dependencies [i.e. map files] for the final library
99BIR_DEPS=
100
101# Environment variable to set a runtime search path
102LDLIBRARYPATH_ENVVAR = PATH
103
374ca955
A
104# The type of assembly to write for generating an object file
105GENCCODE_ASSEMBLY=-a gcc-cygwin
106
b75a7d8f
A
107## End Cygwin-specific setup
108