• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## -*-makefile-*-
2## Copyright (C) 2016 and later: Unicode, Inc. and others.
3## License & terms of use: http://www.unicode.org/copyright.html
4## Alpha-Linux-specific setup
5## Copyright (c) 1999-2006, International Business Machines Corporation and
6## others. All Rights Reserved.
7
8## Commands to generate dependency files
9#GEN_DEPS.c=	$(CC) $(DEFS) $(CPPFLAGS) -MD -c -msg_quiet
10#GEN_DEPS.cc=	$(CXX) $(DEFS) $(CPPFLAGS) -D__USE_STD_IOSTREAM -c -MD -msg_quiet
11
12## Flags for position independent code
13SHAREDLIBCFLAGS = -fPIC
14SHAREDLIBCXXFLAGS = -fPIC
15SHAREDLIBCPPFLAGS = -DPIC
16
17## Additional flags when building libraries and with threads
18THREADSCPPFLAGS = -D_REENTRANT
19LIBCPPFLAGS =
20
21# The tests need complete IEEE floating point support
22CFLAGS += -ieee
23CXXFLAGS += -ieee
24
25## Commands to compile
26COMPILE.c=	$(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS)  -c -signed -accept nogccinline
27COMPILE.cc=	$(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c -signed -D__USE_STD_IOSTREAM -accept nogcc_inline
28
29
30## Commands to link
31LINK.c=		$(CC) -call_shared $(CFLAGS) $(LDFLAGS)
32LINK.cc=	$(CXX) -call_shared $(CXXFLAGS) $(LDFLAGS)
33
34## Compiler switch to embed a runtime search path
35LD_RPATH=
36LD_RPATH_PRE=	-Wl,-rpath,
37
38## Compiler switch to embed a library name
39LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
40
41## Shared object suffix
42SO = so
43## Non-shared intermediate object suffix
44STATIC_O = ao
45
46## Compilation rules
47%.$(STATIC_O): $(srcdir)/%.c
48	$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
49%.o: $(srcdir)/%.c
50	$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
51
52%.$(STATIC_O): $(srcdir)/%.cpp
53	$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
54%.o: $(srcdir)/%.cpp
55	$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
56
57
58## Dependency rules
59#%.d: $(srcdir)/%.c
60#	@echo "generating dependency information for $<"
61#	@$(SHELL) -ec '$(GEN_DEPS.c) $< \
62#		| sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
63#		[ -s $@ ] || rm -f $@'
64
65#%.d: $(srcdir)/%.cpp
66#	@echo "generating dependency information for $<"
67#	@$(SHELL) -ec '$(GEN_DEPS.cc) $< \
68#		| sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
69#		[ -s $@ ] || rm -f $@'
70#
71## Versioned libraries rules
72
73%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
74	$(RM) $@ && ln -s ${<F} $@
75%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
76	$(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
77
78##  Bind internal references
79
80# LDflags that pkgdata will use
81BIR_LDFLAGS= -Wl,-Bsymbolic
82
83# Dependencies [i.e. map files] for the final library
84BIR_DEPS=
85
86## End Linux-specific setup
87
88