# configuration for compiling with standard optimizations # on GNU/Darwin platform # define compile and link macros LIBTOOL=libtool CC=cc CXX=c++ CCOPTS=-DDARWIN -I$(SRCDIR)/$(MODULE) -I$(INCDIR) -I$(INCDIR)/$(BASENAME) \ -O3 -ffast-math -funroll-loops CXXOPTS=$(CCOPTS) # dynamic shared libraries # (different extension for dynamic shared libraries) DYNALIB_EXT=.dylib DYNALIB_OBJ_OPTS=$(LIB_OPTS) -fPIC -shared -dynamic DYNALIB_LINK_OPTS=-dynamic DYNALIB_PATH=-L$(LIBDIR) DYNALIB_RUNPATH= # the runpath is encoded into the install name DYNALIB_NAMEOPTS=-install_name $(INSTALL_LIBDIR)/$(DYNALIB_FULLNAME) # static archive libraries STATLIB_OBJ_OPTS=$(LIB_OPTS) -DMD_STATIC STATLIB_LINK_OPTS=-static # plugins are enabled by Mach bundles PLUGIN_EXT=.bundle PLUGIN_OBJ_OPTS=$(PLUG_OPTS) -fPIC -shared -dynamic PLUGIN_LINK_OPTS=$(PLUG_OPTS) -bundle PLUGIN_RUNPATH= PLUGIN_NAMEOPTS= # dynamically linked executables BIN_OBJ_OPTS=$(BIN_OPTS) BIN_LINK_OPTS=$(BIN_OBJ_OPTS) BIN_RUNPATH= # statically linked executables #BIN_OBJ_OPTS=$(BIN_OPTS) -DMD_STATIC -static #BIN_LINK_OPTS=$(BIN_OPTS) -static #BIN_PATH=$(DYNALIB_PATH) #BIN_RUNPATH= # need to invoke libtool with additional system libraries ADDCC_DYNALIB_LIBS=-lc -lcc_dynamic ADDCXX_DYNALIB_LIBS=-lstdc++ -lc -lcc_dynamic # link dynamic libraries using libtool LINKCC_DYNALIB=$(LIBTOOL) $(DYNALIB_LINK_OPTS) \ $(DYNALIB_PATH) $(DYNALIB_RUNPATH) $(DYNALIB_NAMEOPTS) \ $(OUTFLAG) $@ $(LIB_OBJLIST) $(DYNALIB_LIBS) $(ADDCC_DYNALIB_LIBS) LINKCXX_DYNALIB=$(LIBTOOL) $(DYNALIB_LINK_OPTS) \ $(DYNALIB_PATH) $(DYNALIB_RUNPATH) $(DYNALIB_NAMEOPTS) \ $(OUTFLAG) $@ $(LIB_OBJLIST) $(DYNALIB_LIBS) $(ADDCXX_DYNALIB_LIBS) LINKCC_STATLIB=$(LIBTOOL) $(STATLIB_LINK_OPTS) \ $(DYNALIB_PATH) $(OUTFLAG) $@ $(LIB_OBJLIST) LINKCXX_STATLIB=$(LIBTOOL) $(STATLIB_LINK_OPTS) \ $(DYNALIB_PATH) $(OUTFLAG) $@ $(LIB_OBJLIST) # list of exceptions -- things to *not* build # # (can't build DPMTA's spmta library dynamic because of its "common symbols" # -- it exports global variables; this means also can't build deven dynamic # because it depends on spmta) # EXCEPT=libspmta.dylib libdeven.dylib