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