1999-12-29 01:09:27 +00:00
|
|
|
## -*-makefile-*-
|
2006-03-23 18:51:51 +00:00
|
|
|
## BSD-specific setup (FreeBSD, OpenBSD, NetBSD, *BSD)
|
2013-09-09 17:58:07 +00:00
|
|
|
## Copyright (c) 1999-2013, International Business Machines Corporation and
|
2000-01-17 19:48:20 +00:00
|
|
|
## others. All Rights Reserved.
|
1999-12-29 01:09:27 +00:00
|
|
|
|
|
|
|
## Commands to generate dependency files
|
|
|
|
GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
|
|
|
|
GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
|
|
|
|
|
2000-10-06 00:12:32 +00:00
|
|
|
## Flags for position independent code
|
|
|
|
SHAREDLIBCFLAGS = -fPIC
|
|
|
|
SHAREDLIBCXXFLAGS = -fPIC
|
|
|
|
SHAREDLIBCPPFLAGS = -DPIC
|
|
|
|
|
2006-03-23 18:51:51 +00:00
|
|
|
## Additional flags when building libraries and with threads
|
|
|
|
THREADSCPPFLAGS = -D_REENTRANT
|
|
|
|
LIBCPPFLAGS =
|
|
|
|
|
1999-12-29 01:09:27 +00:00
|
|
|
## Compiler switch to embed a runtime search path
|
|
|
|
LD_RPATH=
|
|
|
|
LD_RPATH_PRE= -Wl,-rpath,
|
|
|
|
|
2000-10-06 00:56:39 +00:00
|
|
|
## Compiler switch to embed a library name
|
2004-03-26 18:07:36 +00:00
|
|
|
LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
|
2000-10-06 00:56:39 +00:00
|
|
|
|
2009-07-14 16:50:23 +00:00
|
|
|
## Shared library options
|
|
|
|
LD_SOOPTIONS= -Wl,-Bsymbolic
|
|
|
|
|
1999-12-29 01:09:27 +00:00
|
|
|
## Shared object suffix
|
2002-05-01 23:48:15 +00:00
|
|
|
SO = so
|
2000-10-09 19:06:57 +00:00
|
|
|
## Non-shared intermediate object suffix
|
2000-10-09 19:55:52 +00:00
|
|
|
STATIC_O = ao
|
1999-12-29 01:09:27 +00:00
|
|
|
|
|
|
|
## Compilation rules
|
2000-10-09 19:06:57 +00:00
|
|
|
%.$(STATIC_O): $(srcdir)/%.c
|
|
|
|
$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
|
|
|
|
%.o: $(srcdir)/%.c
|
|
|
|
$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
%.$(STATIC_O): $(srcdir)/%.cpp
|
|
|
|
$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
|
|
|
|
%.o: $(srcdir)/%.cpp
|
|
|
|
$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
|
|
|
|
|
2000-02-07 20:57:10 +00:00
|
|
|
|
1999-12-29 01:09:27 +00:00
|
|
|
## Dependency rules
|
2002-05-01 23:48:15 +00:00
|
|
|
%.d: $(srcdir)/%.c
|
2002-01-04 23:48:46 +00:00
|
|
|
@echo "generating dependency information for $<"
|
1999-12-29 01:09:27 +00:00
|
|
|
@$(SHELL) -ec '$(GEN_DEPS.c) $< \
|
|
|
|
| sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
|
|
|
|
[ -s $@ ] || rm -f $@'
|
|
|
|
|
2002-05-01 23:48:15 +00:00
|
|
|
%.d: $(srcdir)/%.cpp
|
2002-01-04 23:48:46 +00:00
|
|
|
@echo "generating dependency information for $<"
|
1999-12-29 01:09:27 +00:00
|
|
|
@$(SHELL) -ec '$(GEN_DEPS.cc) $< \
|
|
|
|
| sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
|
|
|
|
[ -s $@ ] || rm -f $@'
|
|
|
|
|
2000-10-06 00:56:39 +00:00
|
|
|
## Versioned libraries rules
|
2000-01-21 07:30:58 +00:00
|
|
|
|
2000-10-06 00:56:39 +00:00
|
|
|
%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
|
2004-03-26 22:33:12 +00:00
|
|
|
$(RM) $@ && ln -s ${<F} $@
|
2000-10-06 00:56:39 +00:00
|
|
|
%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
|
2004-03-26 22:33:12 +00:00
|
|
|
$(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
|
2000-01-21 07:30:58 +00:00
|
|
|
|
2013-09-09 17:58:07 +00:00
|
|
|
## Bind internal references
|
|
|
|
|
|
|
|
# LDflags that pkgdata will use
|
|
|
|
BIR_LDFLAGS= -Wl,-Bsymbolic
|
|
|
|
|
|
|
|
# Dependencies [i.e. map files] for the final library
|
|
|
|
BIR_DEPS=
|
|
|
|
|
|
|
|
## Remove shared library 's'
|
|
|
|
STATIC_PREFIX_WHEN_USED =
|
|
|
|
STATIC_PREFIX =
|
|
|
|
|
|
|
|
## End BSD-specific setup
|
|
|
|
|
2000-01-21 07:30:58 +00:00
|
|
|
|