]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/mh-darwin
ICU-6.2.22.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)
374ca955 4## Copyright (c) 1999-2004, 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
374ca955
A
24SHLIB.c= $(CC) -dynamiclib -dynamic $(CFLAGS) $(LDFLAGS)
25SHLIB.cc= $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS)
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
b75a7d8f
A
44## Compilation rules
45%.$(STATIC_O): $(srcdir)/%.c
46 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
47%.o: $(srcdir)/%.c
48 $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
49
50%.$(STATIC_O): $(srcdir)/%.cpp
51 $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
52%.o: $(srcdir)/%.cpp
53 $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
54
b75a7d8f
A
55
56## Dependency rules
57%.d : $(srcdir)/%.c
58 @echo "generating dependency information for $<"
374ca955 59 @$(GEN_DEPS.c) $< > /dev/null
b75a7d8f 60 @mv $@ $@~
b75a7d8f
A
61 @echo -n "$@ " > $@
62 @cat < $@~ >> $@
63 @-rm $@~
64
65%.d : $(srcdir)/%.cpp
66 @echo "generating dependency information for $<"
374ca955 67 @$(GEN_DEPS.cc) $< >/dev/null
b75a7d8f 68 @mv $@ $@~
b75a7d8f
A
69 @echo -n "$@ " > $@
70 @cat < $@~ >> $@
71 @-rm $@~
72
73## Versioned libraries rules
74
374ca955 75%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
b75a7d8f 76 $(RM) $@ && ln -s ${<F} $@
374ca955
A
77%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
78 $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
b75a7d8f
A
79
80## End Darwin-specific setup