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