2 ## FreeBSD-specific setup
3 ## Copyright (c) 1999-2004, International Business Machines Corporation and
4 ## others. All Rights Reserved.
6 ## Commands to generate dependency files
7 GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
8 GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
10 ## Flags for position independent code
11 SHAREDLIBCFLAGS = -fPIC
12 SHAREDLIBCXXFLAGS = -fPIC
13 SHAREDLIBCPPFLAGS = -DPIC
15 ## Compiler switch to embed a runtime search path
17 LD_RPATH_PRE= -Wl,-rpath,
19 ## Compiler switch to embed a library name
20 LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
22 ## Shared object suffix
24 ## Non-shared intermediate object suffix
28 %.$(STATIC_O): $(srcdir)/%.c
29 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
31 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
33 %.$(STATIC_O): $(srcdir)/%.cpp
34 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
36 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
41 @echo "generating dependency information for $<"
42 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
43 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
44 [ -s $@ ] || rm -f $@'
47 @echo "generating dependency information for $<"
48 @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
49 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
50 [ -s $@ ] || rm -f $@'
52 ## Versioned libraries rules
54 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
55 $(RM) $@ && ln -s ${<F} $@
56 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
57 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
59 ## End FreeBSD-specific setup