/* base directory for software projects */ #define ProjectDir /proj /* gcc command line with -V for version and -O for optimize */ #define CCDriver gcc #undef HasDynamicSharedLibraries #define HasDynamicSharedLibraries YES /* -fPIC is the default on Darwin */ #undef SharedCCFlags #define SharedCCFlags #undef SharedCCLdFlags #define SharedCCLdFlags -Wl,-bind_at_load #undef CppCmd #define CppCmd c++ -E /* -gdwarf-2 crashes GCC 3.1 on Darwin */ #undef DefaultDebugCCFlags #define DefaultDebugCCFlags -g #undef TroffCmd #define TroffCmd groff /* * build RPC classes -- requires iostreams & TCP sockets */ #undef BuildRPCClasses #define BuildRPCClasses (YES&&!LibStdCPlusPlusV3) #define SOMAXCONN 5 /* override -ansi -pedantic from xfree86.cf */ #undef DefaultCCOptions #define DefaultCCOptions -fno-common /* machine-specific gcc include directory -- does not change with each new version of gcc */ #if 0 #define ToolIncludeDir /usr/local/include #else #define ToolIncludeDir /usr/include #endif /* link libraries for the above */ #undef ExtraCCLdLibs #define ExtraCCLdLibs -lstdc++ -lm #undef ExtraCCLdFlags #define ExtraCCLdFlags -Wl,-bind_at_load #if 0 #undef ExtraCCIncludes #define ExtraCCIncludes -I/sw/include #endif /* command to create shared libraries */ #if 0 #define SharedLibraryCmd(ldobjs,extra_flags) $(LD) -r extra_flags -o $@~ ldobjs #else #define SharedLibraryCmdDarwin(ldobjs,depobjs,rev,libname) CCDriver -dynamiclib -install_name @PREFIX@/lib/$(AOUT) -current_version rev -compatibility_version rev -o $@~ ldobjs depobjs -flat_namespace -undefined suppress #endif #define NormalDynamicSharedLibraryTarget(libname,rev,depobjs,ldobjs) @@\ AOUT = Concat(lib,libname.rev.dylib) @@\ SHARED_CCFLAGS = SharedCCFlags @@\ @@\ AllTarget(Concat(lib,libname.rev.dylib)) @@\ @@\ Concat(lib,libname.rev.dylib): depobjs @@\ @echo "building $@" @@\ $(RM) $@~ @@\ SharedLibraryCmdDarwin(ldobjs,depobjs,rev,libname) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ $(LN) -f $@ Concat(lib,libname.dylib) @@\ @@\ clean:: @@\ $(RM) Concat(lib,libname.rev.dylib) /* * Install a shared library on FreeBSD. */ #ifndef InstallDynamicSharedLibrary #define InstallDynamicSharedLibrary(libname,rev,dest) @@\ install:: Concat(lib,libname.rev.dylib) @@\ MakeDir(dest) @@\ $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.rev.dylib) dest @@\ -@$(RM) dest/Concat(lib,libname.dylib) @@\ -@(cd dest;$(LN) Concat(lib,libname.rev.dylib) \ @@\ Concat(lib,libname.dylib)) @@\ @@\ uninstall:: @@\ $(RM) dest/Concat(lib,libname.rev.dylib) @@\ $(RM) dest/Concat(lib,libname.dylib) #endif /* file output by configure script */ #include "config-darwin-gcc.defs"