diff options
-rwxr-xr-x | configure | 29 |
1 files changed, 16 insertions, 13 deletions
@@ -1230,6 +1230,21 @@ sub write_dynamic_modules_makefile { all: \$(MODULES) EOF + +if ($config{OSNAME} =~ /darwin/) { + print FILEHANDLE <<EOCHEESE; + +PICLDFLAGS = -twolevel_namespace -undefined dynamic_lookup \$(FLAGS) -bundle + +EOCHEESE +} else { + print FILEHANDLE <<EOCHEESE; + +PICLDFLAGS = -fPIC -DPIC -shared \$(FLAGS) + +EOCHEESE +} + ### # End Module Makefile Header ### @@ -1252,20 +1267,8 @@ EOF print FILEHANDLE <<EOCHEESE; m_$i.so: m_$i.cpp ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h ../../include/inspircd_config.h ../../include/inspircd.h ../../include/configreader.h $deps - \$(CC) -pipe -I../../include \$(FLAGS) $cmflags -export-dynamic -c m_$i.cpp -EOCHEESE - -if ($config{OSNAME} =~ /darwin/) { - print FILEHANDLE <<EOCHEESE; - \$(CC) -pipe -twolevel_namespace -undefined dynamic_lookup \$(FLAGS) -bundle $liflags -o m_$i.so m_$i.o - + \$(CC) -pipe -I../../include \$(FLAGS) $cmflags \$(PICLDFLAGS) $liflags -export-dynamic -o m_$i.so m_$i.cpp EOCHEESE -} else { - print FILEHANDLE <<EOCHEESE; - \$(CC) -pipe \$(FLAGS) -shared $liflags -o m_$i.so m_$i.o - -EOCHEESE -} $crud = $crud . " install -m \$(INSTMODE) m_$i.so \$(MODPATH)\n"; ### # End Write Entry to the MakeFile |