]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-bsd-gcc
ICU-6.2.4.tar.gz
[apple/icu.git] / icuSources / config / mh-bsd-gcc
CommitLineData
b75a7d8f
A
1## -*-makefile-*-
2## FreeBSD-specific setup
374ca955 3## Copyright (c) 1999-2004, International Business Machines Corporation and
b75a7d8f 4## others. All Rights Reserved.
b75a7d8f
A
5
6## Commands to generate dependency files
7GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
8GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
9
10## Flags for position independent code
11SHAREDLIBCFLAGS = -fPIC
12SHAREDLIBCXXFLAGS = -fPIC
13SHAREDLIBCPPFLAGS = -DPIC
14
15## Compiler switch to embed a runtime search path
16LD_RPATH=
17LD_RPATH_PRE= -Wl,-rpath,
18
19## Compiler switch to embed a library name
374ca955 20LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
b75a7d8f
A
21
22## Shared object suffix
23SO = so
24## Non-shared intermediate object suffix
25STATIC_O = ao
26
27## Compilation rules
28%.$(STATIC_O): $(srcdir)/%.c
29 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
30%.o: $(srcdir)/%.c
31 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
32
33%.$(STATIC_O): $(srcdir)/%.cpp
34 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
35%.o: $(srcdir)/%.cpp
36 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
37
b75a7d8f
A
38
39## Dependency rules
40%.d: $(srcdir)/%.c
41 @echo "generating dependency information for $<"
42 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
43 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
44 [ -s $@ ] || rm -f $@'
45
46%.d: $(srcdir)/%.cpp
47 @echo "generating dependency information for $<"
48 @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
49 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
50 [ -s $@ ] || rm -f $@'
51
52## Versioned libraries rules
53
54%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
374ca955 55 $(RM) $@ && ln -s ${<F} $@
b75a7d8f 56%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
374ca955 57 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
b75a7d8f
A
58
59## End FreeBSD-specific setup
60