## -*-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
+## Copyright (c) 1999-2009 International Business Machines Corporation and
## others. All Rights Reserved.
-##
-## $Id: mh-darwin,v 1.6 2003/07/03 23:51:33 avery Exp $
## Flags for position independent code
SHAREDLIBCFLAGS = -dynamic
COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -fno-common -c
## Commands to make a shared library
-SHLIB.c= $(CC) -dynamiclib -dynamic $(CFLAGS) $(LDFLAGS) -install_name $(MIDDLE_SO_TARGET)
-SHLIB.cc= $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS) -install_name $(MIDDLE_SO_TARGET)
+SHLIB.c= $(CC) -dynamiclib -dynamic $(CFLAGS) $(LDFLAGS) $(LD_SOOPTIONS)
+SHLIB.cc= $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS) $(LD_SOOPTIONS)
+
+## 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 $(notdir $(MIDDLE_SO_TARGET))
## Compiler switch to embed a runtime search path
LD_RPATH=
## 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
-## 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)
+## Override 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
%.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 $@
+ @$(GEN_DEPS.c) $< > /dev/null
@mv $@ $@~
- @( echo '/\.[ch]$$' ; echo '+,$$d' ; echo "wq" ) | ed $@~ 2>/dev/null >/dev/null || exit 0
- @echo -n "$@ " > $@
+ @printf "%s" "$@ " > $@
@cat < $@~ >> $@
@-rm $@~
%.d : $(srcdir)/%.cpp
@echo "generating dependency information for $<"
- @$(GEN_DEPS.cc) $< -o $@
+ @$(GEN_DEPS.cc) $< >/dev/null
@mv $@ $@~
- @( echo '/\.[ch]$$' ; echo '+,$$d' ; echo "wq" ) | ed $@~ 2>/dev/null >/dev/null || exit 0
- @echo -n "$@ " > $@
+ @printf "%s" "$@ " > $@
@cat < $@~ >> $@
@-rm $@~
%.$(SO): %.$(SO_TARGET_VERSION_MAJOR).$(SO)
$(RM) $@ && ln -s ${*F}.$(SO_TARGET_VERSION).$(SO) $@
+# tzcode option
+TZORIG_EXTRA_CFLAGS=-DSTD_INSPIRED
+
+# genren opts
+GENREN_PL_OPTS=-x Mach-O -n '-g' -p '| c++filt'
+
+## Remove shared library 's'
+STATIC_PREFIX_WHEN_USED =
+STATIC_PREFIX =
+
## End Darwin-specific setup