scuffed-code/icu4c/source/config/mh-darwin
George Rhoten 3e4ca7e34c ICU-2242 Assembly generation updates
X-SVN-Rev: 14663
2004-03-09 23:36:16 +00:00

82 lines
2.4 KiB
Makefile

## -*-makefile-*-
## Darwin-specific setup (Darwin is the Mac OS X developer preview, successor
## to Rhapsody, aka Mac OS X Server)
## Copyright (c) 1999-2003, International Business Machines Corporation and
## others. All Rights Reserved.
##
## $Id: mh-darwin,v 1.31 2004/03/09 23:35:51 grhoten-oss Exp $
## Flags for position independent code
SHAREDLIBCFLAGS = -dynamic
SHAREDLIBCXXFLAGS = -dynamic
SHAREDLIBCPPFLAGS =
# Pad out the paths to the maximum possible length
LD_FLAGS += -headerpad_max_install_names
## Commands to generate dependency files
GEN_DEPS.c= $(CC) -E -MMD $(DEFS) $(CPPFLAGS)
GEN_DEPS.cc= $(CXX) -E -MMD $(DEFS) $(CPPFLAGS)
## Commands to compile
COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -fno-common -c
COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -fno-common -c
## Commands to make a shared library
SHLIB.c= $(CC) -dynamiclib -dynamic $(CFLAGS) $(LDFLAGS)
SHLIB.cc= $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS)
## Compiler switches to embed a library name and version information
LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(MIDDLE_SO_TARGET)
## Compiler switch to embed a runtime search path
LD_RPATH=
LD_RPATH_PRE=
## Environment variable to set a runtime search path
LDLIBRARYPATH_ENVVAR = DYLD_LIBRARY_PATH
GENCCODE_ASSEMBLY=-a gcc-darwin
## Shared object suffix
SO= dylib
## Non-shared intermediate object suffix
STATIC_O = ao
## Compilation rules
%.$(STATIC_O): $(srcdir)/%.c
$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
%.o: $(srcdir)/%.c
$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
%.$(STATIC_O): $(srcdir)/%.cpp
$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
%.o: $(srcdir)/%.cpp
$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
## Dependency rules
%.d : $(srcdir)/%.c
@echo "generating dependency information for $<"
@$(GEN_DEPS.c) $< > /dev/null
@mv $@ $@~
@echo -n "$@ " > $@
@cat < $@~ >> $@
@-rm $@~
%.d : $(srcdir)/%.cpp
@echo "generating dependency information for $<"
@$(GEN_DEPS.cc) $< >/dev/null
@mv $@ $@~
@echo -n "$@ " > $@
@cat < $@~ >> $@
@-rm $@~
## Versioned libraries rules
%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
$(RM) $@ && ln -s $< $@
%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
$(RM) $@ && ln -s $*.$(SO).$(SO_TARGET_VERSION) $@
## End Darwin-specific setup