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