]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-bsd-gcc
ICU-8.11.tar.gz
[apple/icu.git] / icuSources / config / mh-bsd-gcc
CommitLineData
b75a7d8f 1## -*-makefile-*-
73c04bcf
A
2## BSD-specific setup (FreeBSD, OpenBSD, NetBSD, *BSD)
3## Copyright (c) 1999-2006, 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
73c04bcf
A
15## Additional flags when building libraries and with threads
16THREADSCPPFLAGS = -D_REENTRANT
17LIBCPPFLAGS =
18
b75a7d8f
A
19## Compiler switch to embed a runtime search path
20LD_RPATH=
21LD_RPATH_PRE= -Wl,-rpath,
22
23## Compiler switch to embed a library name
374ca955 24LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
b75a7d8f
A
25
26## Shared object suffix
27SO = so
28## Non-shared intermediate object suffix
29STATIC_O = ao
30
31## Compilation rules
32%.$(STATIC_O): $(srcdir)/%.c
33 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
34%.o: $(srcdir)/%.c
35 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
36
37%.$(STATIC_O): $(srcdir)/%.cpp
38 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
39%.o: $(srcdir)/%.cpp
40 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
41
b75a7d8f
A
42
43## Dependency rules
44%.d: $(srcdir)/%.c
45 @echo "generating dependency information for $<"
46 @$(SHELL) -ec '$(GEN_DEPS.c) $< \
47 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
48 [ -s $@ ] || rm -f $@'
49
50%.d: $(srcdir)/%.cpp
51 @echo "generating dependency information for $<"
52 @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
53 | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
54 [ -s $@ ] || rm -f $@'
55
56## Versioned libraries rules
57
58%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
374ca955 59 $(RM) $@ && ln -s ${<F} $@
b75a7d8f 60%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
374ca955 61 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
b75a7d8f
A
62
63## End FreeBSD-specific setup
64