]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-linux
ICU-531.30.tar.gz
[apple/icu.git] / icuSources / config / mh-linux
CommitLineData
b75a7d8f
A
1## -*-makefile-*-
2## Linux-specific setup
57a6839d 3## Copyright (c) 1999-2013, 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)
57a6839d 8GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) $(CXXFLAGS)
b75a7d8f
A
9
10## Flags for position independent code
11SHAREDLIBCFLAGS = -fPIC
12SHAREDLIBCXXFLAGS = -fPIC
13SHAREDLIBCPPFLAGS = -DPIC
14
15## Additional flags when building libraries and with threads
b75a7d8f 16THREADSCPPFLAGS = -D_REENTRANT
73c04bcf 17LIBCPPFLAGS =
b75a7d8f
A
18
19## Compiler switch to embed a runtime search path
729e4ab9 20LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN
b75a7d8f
A
21LD_RPATH_PRE = -Wl,-rpath,
22
73c04bcf
A
23## These are the library specific LDFLAGS
24LDFLAGSICUDT=-nodefaultlibs -nostdlib
25
b75a7d8f 26## Compiler switch to embed a library name
374ca955
A
27# The initial tab in the next line is to prevent icu-config from reading it.
28 LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
29#SH# # We can't depend on MIDDLE_SO_TARGET being set.
30#SH# LD_SONAME=
b75a7d8f 31
729e4ab9
A
32## Shared library options
33LD_SOOPTIONS= -Wl,-Bsymbolic
34
b75a7d8f
A
35## Shared object suffix
36SO = so
37## Non-shared intermediate object suffix
38STATIC_O = ao
39
40## Compilation rules
41%.$(STATIC_O): $(srcdir)/%.c
51004dcb 42 $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS)) -o $@ $<)
b75a7d8f 43%.o: $(srcdir)/%.c
51004dcb 44 $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS)) -o $@ $<)
b75a7d8f
A
45
46%.$(STATIC_O): $(srcdir)/%.cpp
51004dcb 47 $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS)) -o $@ $<)
b75a7d8f 48%.o: $(srcdir)/%.cpp
51004dcb 49 $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS)) -o $@ $<)
b75a7d8f 50
b75a7d8f
A
51
52## Dependency rules
53%.d: $(srcdir)/%.c
51004dcb 54 $(call ICU_MSG,(deps)) $<
b75a7d8f
A
55 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
56 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
57 [ -s $@ ] || rm -f $@'
58
59%.d: $(srcdir)/%.cpp
51004dcb 60 $(call ICU_MSG,(deps)) $<
b75a7d8f
A
61 @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
62 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
63 [ -s $@ ] || rm -f $@'
64
65## Versioned libraries rules
66
67%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
68 $(RM) $@ && ln -s ${<F} $@
69%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
70 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
71
72## Bind internal references
73
74# LDflags that pkgdata will use
75BIR_LDFLAGS= -Wl,-Bsymbolic
76
b75a7d8f
A
77# Dependencies [i.e. map files] for the final library
78BIR_DEPS=
79
729e4ab9
A
80## Remove shared library 's'
81STATIC_PREFIX_WHEN_USED =
82STATIC_PREFIX =
83
b75a7d8f
A
84## End Linux-specific setup
85