diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-23 23:31:29 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-23 23:31:29 +0000 |
commit | 2710741e10eb856f341e866bdc274e8a89463587 (patch) | |
tree | ca71d59f1d1fe1205b2b6ea04e36ed74a05dc254 | |
parent | c1ee7b2ced5ab15789ea9ee89108651452fd48c3 (diff) |
Integrate OSX patches from BuildSmart, plus a few tweaks and fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6428 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | .Makefile.inc | 28 | ||||
-rwxr-xr-x | configure | 162 |
2 files changed, 184 insertions, 6 deletions
diff --git a/.Makefile.inc b/.Makefile.inc index d1e464aaa..870a95bc9 100644 --- a/.Makefile.inc +++ b/.Makefile.inc @@ -6,6 +6,7 @@ # Original Makefile & ./configure by <Craig@ChatSpike.net> # Small modifications by <brain@ChatSpike.net> # +DARWIN = @IS_DARWIN@ CC = @CC@ MAKE = @MAKEPROG@ @@ -55,6 +56,30 @@ install: all @-install -d -m $(INSTMODE) $(BINPATH) @-install -d -m $(INSTMODE) $(CONPATH) @-install -d -m $(INSTMODE) ${MODPATH} +ifeq ($(DARWIN),YES) + -install -m $(INSTMODE) src/libIRCDasyncdns.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDbase.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDchannels.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDcommand_parse.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDcommands.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDconfigreader.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDcull_list.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDdynamic.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDhash.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDhelper.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDinspsocket.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDmode.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDmodules.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDsocket.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDsocketengine.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDstring.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDuserprocess.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDusers.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDwildcard.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDxline.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDtimer.dylib $(LIBPATH) + -install -m $(INSTMODE) src/libIRCDsnomasks.dylib $(LIBPATH) +else -install -m $(INSTMODE) src/libIRCDasyncdns.so $(LIBPATH) -install -m $(INSTMODE) src/libIRCDbase.so $(LIBPATH) -install -m $(INSTMODE) src/libIRCDchannels.so $(LIBPATH) @@ -77,6 +102,7 @@ install: all -install -m $(INSTMODE) src/libIRCDxline.so $(LIBPATH) -install -m $(INSTMODE) src/libIRCDtimer.so $(LIBPATH) -install -m $(INSTMODE) src/libIRCDsnomasks.so $(LIBPATH) +endif -install -m $(INSTMODE) src/inspircd $(BINPATH) -install -m $(INSTMODE) inspircd $(BASE) 2>/dev/null -install -m $(INSTMODE) src/cmd_admin.so $(LIBPATH) @@ -163,7 +189,7 @@ module: clean: @echo Cleaning... - @rm -rvf src/*.so src/*.o src/inspircd src/modules/*.so src/modules/*.o *~ src/*~ src/modules/*~ src/modules/extra/*~ src/modes/*~ src/modes/*.o src/modes/*.a src/modules/*/*.o src/modules/*/*.so + @rm -rvf src/*.dylib src/*.so src/*.o src/inspircd src/modules/*.so src/modules/*.o *~ src/*~ src/modules/*~ src/modules/extra/*~ src/modes/*~ src/modes/*.o src/modes/*.a src/modules/*/*.o src/modules/*/*.so @echo Completed. modclean: @@ -215,7 +215,8 @@ chomp($config{MAX_CLIENT_T} = `sh -c \"ulimit -n\"`); # FD Limit chomp($config{MAX_DESCRIPTORS} = `sh -c \"ulimit -n\"`); # Hard FD Limit chomp($config{GCCVER} = `g++ -dumpversion | cut -c 1`); # Major GCC Version $config{_SOMAXCONN} = SOMAXCONN; # Max connections in accept queue -$config{OSNAME} = $^O; # Operating System Name +$config{OSNAME} = $^O; # Operating System Name +$config{IS_DARWIN} = "NO"; # Is OSX? $config{CC} = "g++"; # C++ compiler if (defined $opt_cc) { @@ -264,6 +265,11 @@ if ($config{GCCVER} eq "") { exit; } +if ($config{OSNAME} =~ /darwin/) +{ + $config{IS_DARWIN} = "YES"; +} + # Minihack! Convert Cygwin to 'Cyg-Static' so i can # Keep my dynamic module experiments here for later # consideration! @@ -840,6 +846,7 @@ sub getosflags { $config{LDLIBS} = "-lstdc++"; $config{FLAGS} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}"; $config{MAKEPROG} = "make"; + $SHARED = "-Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared"; if ($config{OSNAME} =~ /OpenBSD/i) { $config{MAKEPROG} = "gmake"; @@ -854,6 +861,10 @@ sub getosflags { return "OpenBSD"; } + if ($config{OSNAME} =~ /darwin/i) { + $SHARED = "-bundle -undefined dynamic_lookup"; + $config{LDLIBS} = "-ldl -lstdc++"; + } if ($config{OSNAME} =~ /Linux/i) { $config{LDLIBS} = "-ldl -lstdc++"; $config{FLAGS} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}"; @@ -1082,6 +1093,7 @@ EOF $tmp =~ s/\@EXECUTABLE\@/$exe/; $tmp =~ s/\@MAKEORDER\@/$config{MAKEORDER}/; $tmp =~ s/\@STATICLIBS\@/$config{STATICLIBS}/; + $tmp =~ s/\@IS_DARWIN\@/$config{IS_DARWIN}/; $tmp =~ s/\@VERSION\@/$version/; print "Writing \033[1;32m$file\033[0m\n"; @@ -1254,9 +1266,19 @@ 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 $extra + +EOCHEESE +} else { + print FILEHANDLE <<EOCHEESE; \$(CC) -pipe \$(FLAGS) -shared $liflags -o m_$i.so m_$i.o $extra EOCHEESE +} $crud = $crud . " install -m \$(INSTMODE) m_$i.so \$(MODPATH)\n"; ### # End Write Entry to the MakeFile @@ -1288,7 +1310,11 @@ EOCHEESE } } print "(\033[1;32m$i files found\033[0m)\n"; - print FILEHANDLE "\n \$(CC) -pipe \$(FLAGS) -shared $liflags -o $name.so $crap3\n"; + if ($config{OSNAME} =~ /darwin/) { + print FILEHANDLE "\n \$(CC) -pipe -twolevel_namespace -undefined dynamic_lookup \$(FLAGS) -bundle -o $name.so $crap3\n"; + } else { + print FILEHANDLE "\n \$(CC) -pipe \$(FLAGS) -shared $liflags -o $name.so $crap3\n"; + } print FILEHANDLE "\n$crapola\n"; closedir(MDIRHANDLE); $crud = $crud . " install -m \$(INSTMODE) $name.so \$(MODPATH)\n"; @@ -1491,9 +1517,131 @@ CXXFLAGS = -I../include \${FLAGS} CPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* //' | grep -v svn) RELCPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* /modes\\//' | grep -v svn) -all: libIRCDtimer.so libIRCDcull_list.so libIRCDuserprocess.so libIRCDsocketengine.so libIRCDsocket.so libIRCDhash.so libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so $cmdobjs libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDcommand_parse.so libIRCDsnomasks.so inspircd +CMD_SRC = \\ +EOM + + foreach my $cmd (@cmdlist) { + print FH <<ITEM; + cmd_$cmd.cpp \\ +ITEM + } + print FH <<EOM; + +.SUFFIXES: .o .so -inspircd: inspircd.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/channels.h ../include/globals.h ../include/inspircd_config.h ../include/socket.h libIRCDtimer.so libIRCDcull_list.so libIRCDuserprocess.so libIRCDsocketengine.so libIRCDsocket.so libIRCDhash.so libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so $cmdobjs libIRCDsnomasks.so libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDcommand_parse.so +CMD_OBJS = \$(CMD_SRC:.cpp=.o) + +CPPFILES_OBJS = \$(RELCPPFILES:.cpp=.o) + +CMD_LINK_OBJS = \$(CMD_OBJS:.o=.so) + +EOM + +if ($config{OSNAME} =~ /darwin/) { + print FH <<EOM; +all: \$(CPPFILES_OBJS) \$(CMD_OBJS) \$(CMD_LINK_OBJS) libIRCDtimer.dylib libIRCDcull_list.dylib libIRCDuserprocess.dylib libIRCDsocketengine.dylib libIRCDsocket.dylib libIRCDhash.dylib libIRCDchannels.dylib libIRCDmode.dylib libIRCDxline.dylib libIRCDstring.dylib libIRCDasyncdns.dylib libIRCDbase.dylib libIRCDconfigreader.dylib libIRCDinspsocket.dylib libIRCDcommands.dylib libIRCDdynamic.dylib libIRCDusers.dylib libIRCDmodules.dylib libIRCDwildcard.dylib libIRCDhelper.dylib libIRCDcommand_parse.dylib libIRCDsnomasks.dylib inspircd + +inspircd: inspircd.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/channels.h ../include/globals.h ../include/inspircd_config.h ../include/socket.h \$(CPPFILES_OBJS) \$(CMD_OBJS) \$(CMD_LINK_OBJS) libIRCDtimer.dylib libIRCDcull_list.dylib libIRCDuserprocess.dylib libIRCDsocketengine.dylib libIRCDsocket.dylib libIRCDhash.dylib libIRCDchannels.dylib libIRCDmode.dylib libIRCDxline.dylib libIRCDstring.dylib libIRCDasyncdns.dylib libIRCDbase.dylib libIRCDconfigreader.dylib libIRCDinspsocket.dylib libIRCDsnomasks.dylib libIRCDcommands.dylib libIRCDdynamic.dylib libIRCDusers.dylib libIRCDmodules.dylib libIRCDwildcard.dylib libIRCDhelper.dylib libIRCDcommand_parse.dylib + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspircd.cpp + \$(CC) -pipe -dynamic -L. -o inspircd \$(LDLIBS) inspircd.o libIRCDchannels.dylib libIRCDmode.dylib libIRCDxline.dylib libIRCDstring.dylib libIRCDasyncdns.dylib libIRCDbase.dylib libIRCDconfigreader.dylib libIRCDinspsocket.dylib libIRCDcommands.dylib libIRCDdynamic.dylib libIRCDusers.dylib libIRCDmodules.dylib libIRCDwildcard.dylib libIRCDhelper.dylib libIRCDhash.dylib libIRCDsocket.dylib libIRCDsocketengine.dylib libIRCDuserprocess.dylib libIRCDcull_list.dylib libIRCDcommand_parse.dylib libIRCDtimer.dylib libIRCDsnomasks.dylib + +libIRCDsocketengine.dylib: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp $se.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDsocketengine.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDsocketengine.dylib socketengine.o $se.o + +libIRCDsnomasks.dylib: snomasks.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/channels.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDsnomasks.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDsnomasks.dylib snomasks.o + +libIRCDcommand_parse.dylib: command_parse.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c command_parse.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDcommand_parse.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDcommand_parse.dylib command_parse.o + +libIRCDcull_list.dylib: cull_list.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/users.h ../include/channels.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cull_list.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDcull_list.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDcull_list.dylib cull_list.o + +libIRCDuserprocess.dylib: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c userprocess.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDuserprocess.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDuserprocess.dylib userprocess.o + +libIRCDhash.dylib: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDhash.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDhash.dylib hashcomp.o + +libIRCDhelper.dylib: helperfuncs.cpp ../include/base.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDhelper.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDhelper.dylib helperfuncs.o + +libIRCDchannels.dylib: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDchannels.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDchannels.dylib channels.o + +libIRCDmode.dylib: mode.cpp ../include/base.h ../include/mode.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h \$(RELCPPFILES) + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp + \${MAKE} -C "modes" DIRNAME="src/modes" CC="\$(CC)" \$(MAKEARGS) CPPFILES="\$(CPPFILES)" + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDmode.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDmode.dylib mode.o modes/modeclasses.a + +libIRCDxline.dylib: xline.cpp ../include/base.h ../include/xline.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c xline.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDxline.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDxline.dylib xline.o + +libIRCDstring.dylib: inspstring.cpp ../include/base.h ../include/inspstring.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspstring.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDstring.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDstring.dylib inspstring.o + +libIRCDasyncdns.dylib: dns.cpp ../include/base.h ../include/dns.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dns.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDasyncdns.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDasyncdns.dylib dns.o + +libIRCDbase.dylib: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDbase.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDbase.dylib base.o + +libIRCDconfigreader.dylib: configreader.cpp ../include/base.h ../include/configreader.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDconfigreader.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDconfigreader.dylib configreader.o + +libIRCDcommands.dylib: commands.cpp ../include/base.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDcommands.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDcommands.dylib commands.o + +libIRCDdynamic.dylib: dynamic.cpp ../include/base.h ../include/dynamic.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dynamic.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDdynamic.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDdynamic.dylib dynamic.o + +libIRCDusers.dylib: users.cpp ../include/base.h ../include/users.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c users.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDusers.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDusers.dylib users.o + +libIRCDmodules.dylib: modules.cpp ../include/base.h ../include/modules.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c modules.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDmodules.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDmodules.dylib modules.o + +libIRCDwildcard.dylib: wildcard.cpp ../include/base.h ../include/wildcard.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c wildcard.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDwildcard.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDwildcard.dylib wildcard.o + +libIRCDsocket.dylib: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDsocket.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDsocket.dylib socket.o + +libIRCDinspsocket.dylib: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspsocket.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDinspsocket.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDinspsocket.dylib inspsocket.o + +libIRCDtimer.dylib: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h + \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c timer.cpp + \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDtimer.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDtimer.dylib timer.o + +EOM + +} else { + + print FH <<EOM; +all: \$(CPPFILES_OBJS) \$(CMD_OBJS) \$(CMD_LINK_OBJS) libIRCDtimer.so libIRCDcull_list.so libIRCDuserprocess.so libIRCDsocketengine.so libIRCDsocket.so libIRCDhash.so libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDcommand_parse.so libIRCDsnomasks.so inspircd + +inspircd: inspircd.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/channels.h ../include/globals.h ../include/inspircd_config.h ../include/socket.h \$(CPPFILES_OBJS) \$(CMD_OBJS) \$(CMD_LINK_OBJS) libIRCDtimer.so libIRCDcull_list.so libIRCDuserprocess.so libIRCDsocketengine.so libIRCDsocket.so libIRCDhash.so libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so libIRCDsnomasks.so libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDcommand_parse.so \$(CC) -pipe -I../include $extra -Wl,--rpath -Wl,$config{LIBRARY_DIR} \$(FLAGS) -rdynamic -L. inspircd.cpp -o inspircd \$(LDLIBS) libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDhash.so libIRCDsocket.so libIRCDsocketengine.so libIRCDuserprocess.so libIRCDcull_list.so libIRCDcommand_parse.so libIRCDtimer.so libIRCDsnomasks.so libIRCDsocketengine.so: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h @@ -1586,11 +1734,15 @@ libIRCDtimer.so: timer.cpp ../include/base.h ../include/inspircd.h ../include/gl \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDtimer.so timer.o EOM + + +} + foreach my $cmd (@cmdlist) { print FH <<ITEM; cmd_$cmd.so: cmd_$cmd.cpp ../include/base.h ../include/modules.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/commands/cmd_$cmd.h \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cmd_$cmd.cpp - \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o cmd_$cmd.so cmd_$cmd.o + \$(CC) -pipe $SHARED -o cmd_$cmd.so cmd_$cmd.o ITEM } |