]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-linux
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / config / mh-linux
CommitLineData
b75a7d8f
A
1## -*-makefile-*-
2## Linux-specific setup
3## Copyright (c) 1999-2001, International Business Machines Corporation and
4## others. All Rights Reserved.
5##
6## $Id: mh-linux,v 1.1.1.1 2003/02/05 21:31:17 avery Exp $
7
8## Commands to generate dependency files
9GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
10GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
11
12## Flags for position independent code
13SHAREDLIBCFLAGS = -fPIC
14SHAREDLIBCXXFLAGS = -fPIC
15SHAREDLIBCPPFLAGS = -DPIC
16
17## Additional flags when building libraries and with threads
18LIBCPPFLAGS = -D_REENTRANT
19THREADSCPPFLAGS = -D_REENTRANT
20
21## Compiler switch to embed a runtime search path
22LD_RPATH=
23LD_RPATH_PRE = -Wl,-rpath,
24
25## Compiler switch to embed a library name
26LD_SONAME = -Wl,-soname -Wl,$(MIDDLE_SO_TARGET)
27
28## Shared object suffix
29SO = so
30## Non-shared intermediate object suffix
31STATIC_O = ao
32
33## Compilation rules
34%.$(STATIC_O): $(srcdir)/%.c
35 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
36%.o: $(srcdir)/%.c
37 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
38
39%.$(STATIC_O): $(srcdir)/%.cpp
40 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
41%.o: $(srcdir)/%.cpp
42 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
43
44../data/%.o: ../data/%.c
45 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
46
47## Dependency rules
48%.d: $(srcdir)/%.c
49 @echo "generating dependency information for $<"
50 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
51 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
52 [ -s $@ ] || rm -f $@'
53
54%.d: $(srcdir)/%.cpp
55 @echo "generating dependency information for $<"
56 @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
57 | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
58 [ -s $@ ] || rm -f $@'
59
60## Versioned libraries rules
61
62%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
63 $(RM) $@ && ln -s ${<F} $@
64%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
65 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
66
67## Bind internal references
68
69# LDflags that pkgdata will use
70BIR_LDFLAGS= -Wl,-Bsymbolic
71
72# CPPflags for genccode/gencmn
73BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
74
75# Dependencies [i.e. map files] for the final library
76BIR_DEPS=
77
78## End Linux-specific setup
79