2
## Linux-specific setup
3
## Copyright (c) 1999-2001, International Business Machines Corporation and
4
## others. All Rights Reserved.
6
## $Id: mh-linux,v 1.31 2002/01/24 17:35:04 rviswanadha Exp $
8
## Commands to generate dependency files
9
GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
10
GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
12
## Flags for position independent code
13
SHAREDLIBCFLAGS = -fPIC
14
SHAREDLIBCXXFLAGS = -fPIC
15
SHAREDLIBCPPFLAGS = -DPIC
17
## Additional flags when building libraries and with threads
18
LIBCPPFLAGS = -D_REENTRANT
19
THREADSCPPFLAGS = -D_REENTRANT
21
## Compiler switch to embed a runtime search path
23
LD_RPATH_PRE = -Wl,-rpath,
25
## Compiler switch to embed a library name
26
LD_SONAME = -Wl,-soname -Wl,$(MIDDLE_SO_TARGET)
28
## Shared object suffix
30
## Non-shared intermediate object suffix
34
%.$(STATIC_O): $(srcdir)/%.c
35
$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
37
$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
39
%.$(STATIC_O): $(srcdir)/%.cpp
40
$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
42
$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
44
../data/%.o: ../data/%.c
45
$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
49
@echo "generating dependency information for $<"
50
@$(SHELL) -ec '$(GEN_DEPS.c) $< \
51
| sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
52
[ -s $@ ] || rm -f $@'
55
@echo "generating dependency information for $<"
56
@$(SHELL) -ec '$(GEN_DEPS.cc) $< \
57
| sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
58
[ -s $@ ] || rm -f $@'
60
## Versioned libraries rules
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) $@
67
## Bind internal references
69
# LDflags that pkgdata will use
70
BIR_LDFLAGS= -Wl,-Bsymbolic
72
# CPPflags for genccode/gencmn
73
BIR_CPPFLAGS= -DU_HAVE_BIND_INTERNAL_REFERENCES
75
# Dependencies [i.e. map files] for the final library
78
## End Linux-specific setup