]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-mingw
ICU-8.11.4.tar.gz
[apple/icu.git] / icuSources / config / mh-mingw
CommitLineData
374ca955
A
1## -*-makefile-*-
2## Cygwin/MinGW specific setup
73c04bcf 3## Copyright (c) 2001-2006, International Business Machines Corporation and
374ca955
A
4## others. All Rights Reserved.
5
6# TODO: Finish the rest of this port. This platform port is incomplete.
7
8# We install sbin tools into the same bin directory because
9# pkgdata needs some of the tools in sbin, and we can't always depend on
10# icu-config working on Windows.
11sbindir=$(bindir)
12
13## Commands to generate dependency files
14GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
15GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
16
17## Flags to create/use a static library
18ifneq ($(ENABLE_SHARED),YES)
19## Make sure that the static libraries can be built and used
20CPPFLAGS += -DU_STATIC_IMPLEMENTATION
21else
22## Make sure that the static libraries can be built
23STATICCPPFLAGS = -DU_STATIC_IMPLEMENTATION
24endif
25
26## Flags for position independent code
27SHAREDLIBCFLAGS =
28SHAREDLIBCXXFLAGS =
29SHAREDLIBCPPFLAGS = -DPIC
30
31## Additional flags when building libraries and with threads
73c04bcf
A
32THREADSCFLAGS = -mthreads
33THREADSCXXFLAGS = -mthreads
34LIBCPPFLAGS =
374ca955
A
35
36# Commands to link. Link with C++ in case static libraries are used.
37LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
38#LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
39
40## Commands to make a shared library
41SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared
42SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared
43
44## Compiler switch to embed a runtime search path
45LD_RPATH=
46LD_RPATH_PRE= -Wl,-rpath,
47
48## Compiler switch to embed a library name
49LD_SONAME =
50
51## Shared object suffix
52SO = dll
53## Non-shared intermediate object suffix
54STATIC_O = ao
55SO_TARGET_VERSION_SUFFIX = $(SO_TARGET_VERSION_MAJOR)
56
57# Static library prefix and file extension
58LIBSICU = $(STATIC_PREFIX)$(ICUPREFIX)
59A = lib
60
61## An import library is needed for z/OS and MSVC
73c04bcf 62#IMPORT_LIB_EXT = .lib
374ca955
A
63
64LIBPREFIX=
65
66# Change the stubnames so that poorly working FAT disks and installation programs can work.
67# This is also for backwards compatibility.
68DATA_STUBNAME = dt
69I18N_STUBNAME = in
70LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)
71
72# The #M# is used to delete lines for icu-config
73# Current full path directory.
73c04bcf 74CURR_FULL_DIR=$(shell pwd -W)#M#
374ca955 75# Current full path directory for use in source code in a -D compiler option.
73c04bcf 76CURR_SRCCODE_FULL_DIR=$(subst /,\\\\,$(shell pwd -W))#M#
374ca955
A
77
78## Compilation rules
79%.$(STATIC_O): $(srcdir)/%.c
80 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
81%.o: $(srcdir)/%.c
82 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
83
84%.$(STATIC_O): $(srcdir)/%.cpp
85 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
86%.o: $(srcdir)/%.cpp
87 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
88
89
90## Dependency rules
91%.d: $(srcdir)/%.c
92 @echo "generating dependency information for $<"
93 @echo -n "$@ " > $@
73c04bcf 94 @$(GEN_DEPS.c) $< >> $@ || (rm -f $@ && FALSE)
374ca955
A
95
96%.d: $(srcdir)/%.cpp
97 @echo "generating dependency information for $<"
98 @echo -n "$@ " > $@
73c04bcf 99 @$(GEN_DEPS.cc) $< >> $@ || (rm -f $@ && FALSE)
374ca955
A
100
101## Versioned target for a shared library.
102## Since symbolic links don't work the same way on Windows,
103## we only use the version major number.
104#FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
105FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
106MIDDLE_SO_TARGET=$(FINAL_SO_TARGET)
107
108## Special pkgdata information that is needed
109PKGDATA_VERSIONING = -r $(SO_TARGET_VERSION_MAJOR)
73c04bcf
A
110#ICUPKGDATA_INSTALL_DIR = $(shell cygpath -dma $(DESTDIR)$(ICUPKGDATA_DIR))#M#
111#ICUPKGDATA_INSTALL_LIBDIR = $(shell cygpath -dma $(DESTDIR)$(libdir))#M#
374ca955
A
112
113## Versioned libraries rules
114#%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
115# $(RM) $@ && cp ${<F} $@
116%.$(SO): %$(SO_TARGET_VERSION_MAJOR).$(SO)
117 @echo -n
118
119# Environment variable to set a runtime search path
120LDLIBRARYPATH_ENVVAR = PATH
121
122# The type of assembly to write for generating an object file
123GENCCODE_ASSEMBLY=-a gcc-cygwin
124
125# These are needed to allow the pkgdata GNU make files to work
126PKGDATA_DEFS = -DU_MAKE=\"$(MAKE)\"
127
128## End Cygwin/MinGW specific setup
129