1999-12-29 01:09:27 +00:00
|
|
|
## -*-makefile-*-
|
|
|
|
## FreeBSD-specific setup
|
2003-12-18 23:16:48 +00:00
|
|
|
## Copyright (c) 1999-2003, International Business Machines Corporation and
|
2000-01-17 19:48:20 +00:00
|
|
|
## others. All Rights Reserved.
|
2000-10-16 18:05:34 +00:00
|
|
|
##
|
2004-03-26 22:33:12 +00:00
|
|
|
## $Id: mh-bsd-gcc,v 1.10 2004/03/26 22:33:12 grhoten-oss Exp $
|
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
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
2000-10-06 00:56:39 +00:00
|
|
|
## End FreeBSD-specific setup
|
2000-01-21 07:30:58 +00:00
|
|
|
|