]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-linux
ICU-400.37.tar.gz
[apple/icu.git] / icuSources / config / mh-linux
CommitLineData
b75a7d8f
A
1## -*-makefile-*-
2## Linux-specific setup
73c04bcf 3## Copyright (c) 1999-2006, 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
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
20LD_RPATH=
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
A
31
32## Shared object suffix
33SO = so
34## Non-shared intermediate object suffix
35STATIC_O = ao
36
37## Compilation rules
38%.$(STATIC_O): $(srcdir)/%.c
39 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
40%.o: $(srcdir)/%.c
41 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
42
43%.$(STATIC_O): $(srcdir)/%.cpp
44 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
45%.o: $(srcdir)/%.cpp
46 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
47
b75a7d8f
A
48
49## Dependency rules
50%.d: $(srcdir)/%.c
51 @echo "generating dependency information for $<"
52 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
53 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
54 [ -s $@ ] || rm -f $@'
55
56%.d: $(srcdir)/%.cpp
57 @echo "generating dependency information for $<"
58 @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
59 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
60 [ -s $@ ] || rm -f $@'
61
62## Versioned libraries rules
63
64%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
65 $(RM) $@ && ln -s ${<F} $@
66%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
67 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
68
69## Bind internal references
70
71# LDflags that pkgdata will use
72BIR_LDFLAGS= -Wl,-Bsymbolic
73
b75a7d8f
A
74# Dependencies [i.e. map files] for the final library
75BIR_DEPS=
76
77## End Linux-specific setup
78