]> git.saurik.com Git - apple/icu.git/blob - icuSources/config/mh-bsd-gcc
ICU-6.2.4.tar.gz
[apple/icu.git] / icuSources / config / mh-bsd-gcc
1 ## -*-makefile-*-
2 ## FreeBSD-specific setup
3 ## Copyright (c) 1999-2004, International Business Machines Corporation and
4 ## others. All Rights Reserved.
5
6 ## Commands to generate dependency files
7 GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
8 GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
9
10 ## Flags for position independent code
11 SHAREDLIBCFLAGS = -fPIC
12 SHAREDLIBCXXFLAGS = -fPIC
13 SHAREDLIBCPPFLAGS = -DPIC
14
15 ## Compiler switch to embed a runtime search path
16 LD_RPATH=
17 LD_RPATH_PRE= -Wl,-rpath,
18
19 ## Compiler switch to embed a library name
20 LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
21
22 ## Shared object suffix
23 SO = so
24 ## Non-shared intermediate object suffix
25 STATIC_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
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)
55 $(RM) $@ && ln -s ${<F} $@
56 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
57 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
58
59 ## End FreeBSD-specific setup
60