scuffed-code/icu4c/source/config/mh-darwin

82 lines
2.5 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-2002, International Business Machines Corporation and
## others. All Rights Reserved.
##
## $Id: mh-darwin,v 1.25 2002/12/19 17:55:42 srl Exp $
## Flags for position independent code
SHAREDLIBCFLAGS = -dynamic
SHAREDLIBCXXFLAGS = -dynamic
SHAREDLIBCPPFLAGS =
## 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) -install_name $(DESTDIR)$(libdir)/$(MIDDLE_SO_TARGET)
SHLIB.cc= $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS) -install_name $(DESTDIR)$(libdir)/$(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
## Shared object suffix
SO= dylib
## Non-shared intermediate object suffix
STATIC_O = ao
## Versioned target for a shared library.
FINAL_SO_TARGET = $(basename $(SO_TARGET)).$(SO_TARGET_VERSION).$(SO)
MIDDLE_SO_TARGET = $(basename $(SO_TARGET)).$(SO_TARGET_VERSION_MAJOR).$(SO)
## 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 $@ $<
../data/%.o: ../data/%.c
$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
## Dependency rules
%.d : $(srcdir)/%.c
@echo "generating dependency information for $<"
@$(GEN_DEPS.c) $< -o $@
@mv $@ $@~
@echo -n "$@ " > $@
@cat < $@~ >> $@
@-rm $@~
%.d : $(srcdir)/%.cpp
@echo "generating dependency information for $<"
@$(GEN_DEPS.cc) $< -o $@
@mv $@ $@~
@( echo '/\.[ch]$$' ; echo '+,$$d' ; echo "wq" ) | ed $@~ 2>/dev/null >/dev/null || exit 0
@echo -n "$@ " > $@
@cat < $@~ >> $@
@-rm $@~
## Versioned libraries rules
%.$(SO_TARGET_VERSION_MAJOR).$(SO): %.$(SO_TARGET_VERSION).$(SO)
$(RM) $@ && ln -s ${<F} $@
%.$(SO): %.$(SO_TARGET_VERSION_MAJOR).$(SO)
$(RM) $@ && ln -s ${*F}.$(SO_TARGET_VERSION).$(SO) $@
## End Darwin-specific setup