]> git.saurik.com Git - apple/icu.git/blame_incremental - icuSources/config/mh-cygwin-msvc
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / config / mh-cygwin-msvc
... / ...
CommitLineData
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-msvc,v 1.1.1.1 2003/07/03 18:13:33 avery Exp $
7
8## Commands to generate dependency files
9GEN_DEPS.c= :
10GEN_DEPS.cc= :
11
12## Flags for position independent code
13SHAREDLIBCFLAGS =
14SHAREDLIBCXXFLAGS =
15SHAREDLIBCPPFLAGS =
16
17## Additional flags when building libraries and with threads
18LIBCPPFLAGS =
19THREADSCPPFLAGS =
20
21CPPFLAGS+=/nologo
22DEFS+=/D"WIN32"
23LDFLAGS+=/nologo
24
25# Commands to compile
26COMPILE.c= $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) /GF /c
27COMPILE.cc= $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) /GF /c
28
29# Commands to link
30LINK.c= LINK.EXE /subsystem:console $(LDFLAGS)
31LINK.cc= LINK.EXE /subsystem:console $(LDFLAGS)
32
33## Commands to make a shared library
34SHLIB.c= LINK.EXE /DLL $(LDFLAGS)
35SHLIB.cc= LINK.EXE /DLL $(LDFLAGS)
36
37## Compiler switch to embed a runtime search path
38LD_RPATH=
39LD_RPATH_PRE=
40
41## Compiler switch to embed a library name
42LD_SONAME =
43
44## Shared object suffix
45SO = dll
46## Non-shared intermediate object suffix
47STATIC_O = o
48# OUTOPT is for creating a specific output name
49OUTOPT = /out:
50
51## An import library is needed for z/OS and MSVC
52IMPORT_LIB_EXT = .lib
53
54LIBICU = $(ICUPREFIX)
55DEFAULT_LIBS =
56
57## Link commands to link to ICU libs
58LIBICUDT= $(top_builddir)/stubdata/$(LIBICU)data$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
59LIBICUUC= $(top_builddir)/common/$(LIBICU)uc$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
60LIBICUI18N= $(top_builddir)/i18n/$(LIBICU)i18n$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
61LIBICULE= $(top_builddir)/layout/$(LIBICU)le$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
62LIBICULX= $(top_builddir)/layoutex/$(LIBICU)lx$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
63LIBCTESTFW= $(top_builddir)/tools/ctestfw/$(LIBICU)ctestfw$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
64LIBICUTOOLUTIL= $(top_builddir)/tools/toolutil/$(LIBICU)toolutil$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
65LIBUSTDIO= $(top_builddir)/extra/ustdio/$(LIBICU)io$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR).lib
66
67
68## Compilation rules
69%.$(STATIC_O): $(srcdir)/%.c
70 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) /Fo$@ $<
71%.o: $(srcdir)/%.c
72 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) /Fo$@ $<
73
74%.$(STATIC_O): $(srcdir)/%.cpp
75 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) /Fo$@ $<
76%.o: $(srcdir)/%.cpp
77 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) /Fo$@ $<
78
79../data/%.o: ../data/%.c
80 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) /Fo$@ $<
81
82## Dependency rules
83#%.d: $(srcdir)/%.c
84# @echo "generating dependency information for $<"
85# $(SHELL) -ec '$(GEN_DEPS.c) $< \
86# | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
87# [ -s $@ ] || rm -f $@'
88#
89#%.d: $(srcdir)/%.cpp
90# @echo "generating dependency information for $<"
91# $(SHELL) -ec '$(GEN_DEPS.cc) $< \
92# | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
93# [ -s $@ ] || rm -f $@'
94
95## Dependency rules
96%.d : $(srcdir)/%.c
97 @echo "generating dependency information for $<"
98 @$(GEN_DEPS.c) $< > $@
99
100%.d : $(srcdir)/%.cpp
101 @echo "generating dependency information for $<"
102 @$(GEN_DEPS.cc) $< > $@
103
104## Compile a Windows resource file
105%.res : $(srcdir)/%.rc
106 @rc.exe /fo$@ $<
107
108## Versioned target for a shared library.
109FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
110MIDDLE_SO_TARGET=$(SO_TARGET)
111
112## Versioned import library names.
113IMPORT_LIB = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(IMPORT_LIB_EXT)
114MIDDLE_IMPORT_LIB = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_MAJOR)$(IMPORT_LIB_EXT)
115FINAL_IMPORT_LIB := $(MIDDLE_IMPORT_LIB)
116
117## Versioned libraries rules
118#%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
119# $(RM) $@ && cp $< $@
120%.$(SO): %$(SO_TARGET_VERSION_MAJOR).$(SO)
121 $(RM) $@ && ln -s $< $@
122
123## Bind internal references
124
125# LDflags that pkgdata will use
126BIR_LDFLAGS= -Wl,-Bsymbolic
127
128# CPPflags for genccode/gencmn
129BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
130
131# Dependencies [i.e. map files] for the final library
132BIR_DEPS=
133
134# Environment variable to set a runtime search path
135LDLIBRARYPATH_ENVVAR = PATH
136
137## End Cygwin-specific setup
138