]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-darwin
ICU-461.12.tar.gz
[apple/icu.git] / icuSources / config / mh-darwin
CommitLineData
b75a7d8f
A
1## -*-makefile-*-
2## Darwin-specific setup (Darwin is the Mac OS X developer preview, successor
3## to Rhapsody, aka Mac OS X Server)
729e4ab9 4## Copyright (c) 1999-2009 International Business Machines Corporation and
b75a7d8f 5## others. All Rights Reserved.
b75a7d8f
A
6
7## Flags for position independent code
8SHAREDLIBCFLAGS = -dynamic
9SHAREDLIBCXXFLAGS = -dynamic
10SHAREDLIBCPPFLAGS =
11
12# Pad out the paths to the maximum possible length
13LD_FLAGS += -headerpad_max_install_names
14
15## Commands to generate dependency files
16GEN_DEPS.c= $(CC) -E -MMD $(DEFS) $(CPPFLAGS)
17GEN_DEPS.cc= $(CXX) -E -MMD $(DEFS) $(CPPFLAGS)
18
19## Commands to compile
20COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -fno-common -c
21COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -fno-common -c
22
23## Commands to make a shared library
729e4ab9
A
24SHLIB.c= $(CC) -dynamiclib -dynamic $(CFLAGS) $(LDFLAGS) $(LD_SOOPTIONS)
25SHLIB.cc= $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS) $(LD_SOOPTIONS)
374ca955
A
26
27## Compiler switches to embed a library name and version information
28LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir $(MIDDLE_SO_TARGET))
b75a7d8f
A
29
30## Compiler switch to embed a runtime search path
31LD_RPATH=
32LD_RPATH_PRE=
33
34## Environment variable to set a runtime search path
35LDLIBRARYPATH_ENVVAR = DYLD_LIBRARY_PATH
36
374ca955
A
37GENCCODE_ASSEMBLY=-a gcc-darwin
38
b75a7d8f
A
39## Shared object suffix
40SO= dylib
41## Non-shared intermediate object suffix
42STATIC_O = ao
43
46f4442e
A
44## Override Versioned target for a shared library.
45FINAL_SO_TARGET= $(basename $(SO_TARGET)).$(SO_TARGET_VERSION).$(SO)
46MIDDLE_SO_TARGET= $(basename $(SO_TARGET)).$(SO_TARGET_VERSION_MAJOR).$(SO)
47
b75a7d8f
A
48## Compilation rules
49%.$(STATIC_O): $(srcdir)/%.c
50 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
51%.o: $(srcdir)/%.c
52 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
53
54%.$(STATIC_O): $(srcdir)/%.cpp
55 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
56%.o: $(srcdir)/%.cpp
57 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
58
b75a7d8f
A
59
60## Dependency rules
61%.d : $(srcdir)/%.c
62 @echo "generating dependency information for $<"
374ca955 63 @$(GEN_DEPS.c) $< > /dev/null
b75a7d8f 64 @mv $@ $@~
73c04bcf 65 @printf "%s" "$@ " > $@
b75a7d8f
A
66 @cat < $@~ >> $@
67 @-rm $@~
68
69%.d : $(srcdir)/%.cpp
70 @echo "generating dependency information for $<"
374ca955 71 @$(GEN_DEPS.cc) $< >/dev/null
b75a7d8f 72 @mv $@ $@~
73c04bcf 73 @printf "%s" "$@ " > $@
b75a7d8f
A
74 @cat < $@~ >> $@
75 @-rm $@~
76
77## Versioned libraries rules
78
46f4442e 79%.$(SO_TARGET_VERSION_MAJOR).$(SO): %.$(SO_TARGET_VERSION).$(SO)
b75a7d8f 80 $(RM) $@ && ln -s ${<F} $@
46f4442e
A
81%.$(SO): %.$(SO_TARGET_VERSION_MAJOR).$(SO)
82 $(RM) $@ && ln -s ${*F}.$(SO_TARGET_VERSION).$(SO) $@
83
84# tzcode option
85TZORIG_EXTRA_CFLAGS=-DSTD_INSPIRED
86
87# genren opts
88GENREN_PL_OPTS=-x Mach-O -n '-g' -p '| c++filt'
b75a7d8f 89
729e4ab9
A
90## Remove shared library 's'
91STATIC_PREFIX_WHEN_USED =
92STATIC_PREFIX =
93
b75a7d8f 94## End Darwin-specific setup