diff options
-rwxr-xr-x | configure | 403 |
1 files changed, 165 insertions, 238 deletions
@@ -23,6 +23,58 @@ use make::configure; use make::gnutlscert; use make::opensslcert; + my %filelist = ( + "channels.cpp" => "libIRCDchannels", + "mode.cpp" => "libIRCDmode", + "xline.cpp" => "libIRCDxline", + "inspstring.cpp"=> "libIRCDstring", + "dns.cpp" => "libIRCDasyncdns", + "base.cpp" => "libIRCDbase", + "configreader.cpp"=> "libIRCDconfigreader", + "inspsocket.cpp"=> "libIRCDinspsocket", + "commands.cpp" => "libIRCDcommands", + "dynamic.cpp" => "libIRCDdynamic", + "users.cpp" => "libIRCDusers", + "modules.cpp" => "libIRCDmodules", + "wildcard.cpp" => "libIRCDwildcard", + "helperfuncs.cpp"=> "libIRCDhelper", + "hashcomp.cpp" => "libIRCDhash", + "socket.cpp" => "libIRCDsocket", + "socketengine.cpp"=> "libIRCDsocketengine", + "userprocess.cpp"=> "libIRCDuserprocess", + "cull_list.cpp"=> "libIRCDcull_list", + "command_parse.cpp"=> "libIRCDcommand_parse", + "timer.cpp" => "libIRCDtimer", + "snomasks.cpp" => "libIRCDsnomasks", + "server.cpp" => "libIRCDserver", + "filelogger.cpp"=> "libIRCDfilelogger", + "user_resolver.cpp"=> "libIRCDuserresolver", + ); + + my %specialdeps = ( + "mode.cpp" => "\$(RELCPPFILES)", + ); + + my %extrabuildlines = ( + "mode.cpp" => "\${MAKE} -C \"modes\" DIRNAME=\"src/modes\" CC=\"\$(CC)\" \$(MAKEARGS) CPPFILES=\"\$(CPPFILES)\"", + ); + + my %extraobjects = ( + "mode.cpp" => "modes/modeclasses.a" + ); + + my %extrasources = ( + ); + + my @ignoredeps = ( + "inspircd_win32wrapper.h", + ); + + my @immutabledeps = ( + "inspircd_config.h", + ); + + GetOptions ( 'enable-gnutls' => \$opt_use_gnutls, 'rebuild' => \$opt_rebuild, @@ -1328,6 +1380,45 @@ sub read_module_directory { } } +sub calcdeps($) +{ + # Yes i know we could use gcc -M but it seems to ideneify a lot of 'deep' + # dependencies which are not relevent in C++. + + my $file = $_[0]; + + open (CPP, "<$file") or die("Can't open $file for reading!"); + + my %dupe = (); + my $retlist = ""; + + foreach my $d (@ignoredeps) + { + $dupe{$d} = 1; + } + + my $immutable = ""; + foreach my $dep (@immutabledeps) + { + $immutable = $immutable . "../include/$dep "; + } + $immutable =~ s/ $//g; + + while (chomp($line = <CPP>)) + { + if ($line =~ /#include "(.+\.h)"/) + { + if (!exists($dupe{$1})) + { + $retlist = $retlist . "../include/$1 "; + $dupe{$1} = 1; + } + } + } + close CPP; + return length($immutable) ? $immutable . " " . $retlist : $retlist; +} + sub write_dynamic_makefile { my $i = 0; @@ -1351,258 +1442,94 @@ sub write_dynamic_makefile { $se = "socketengine_ports"; } + $extrasources{"socketengine.cpp"} = $se . ".cpp"; + $extraobjects{"socketengine.cpp"} = $se . ".o"; + $freebsd4libs = $config{CRAQ}; + my $all = "all: "; + $all_libsonly = ""; + + if ($config{IS_DARWIN} eq "YES") + { + $libraryext = "dylib"; + $othercrap = " \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspircd.cpp\n \$(CC) -pipe -dynamic -bind_at_load -L. -o inspircd \$(LDLIBS) inspircd.o " + } + else + { + $libraryext = "so"; + $othercrap = " \$(CC) -pipe -I../include -Wl,--rpath -Wl,$config{LIBRARY_DIR} \$(FLAGS) $freebsd4libs -rdynamic -L. inspircd.cpp -o inspircd \$(LDLIBS) "; + } + + foreach my $cpp (sort keys %filelist) + { + $all = $all . $filelist{$cpp} . "." . $libraryext . " "; + $all_libsonly = $all_libsonly . $filelist{$cpp} . "." . $libraryext . " "; + } + $all = $all . "moo inspircd\n"; + + $othercrap = $othercrap . " $all_libsonly\n\n"; + open(FH,">src/Makefile") or die("Could not write src/Makefile"); print FH <<EOM; -################################################### -# Copyright 2002-2007 The InspIRCd Development Team -# http://www.inspircd.org/wiki/index.php/Credits -# -# Thanks to Andrew Church <achurch\@achurch.org> -# for assisting with making this work right. -# -# This file is automagically generated by configure -# Any changes made will be lost on ./configure -################################################### CC = im a cheezeball - 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) EOM -if ($config{IS_DARWIN} eq "YES") { - print FH <<EOM; -all: 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 libIRCDserver.dylib libIRCDfilelogger.dylib libIRCDuserresolver.dylib moo 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 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 libIRCDserver.dylib libIRCDfilelogger.dylib libIRCDuserresolver.dylib - \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspircd.cpp - \$(CC) -pipe -dynamic -bind_at_load -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 libIRCDserver.dylib libIRCDfilelogger.dylib libIRCDuserresolver.dylib - -moo: - \${MAKE} -C "commands" DIRNAME="src/commands" CC="\$(CC)" \$(MAKEARGS) - -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 - \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c $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 - -libIRCDserver.dylib: server.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h - \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c server.cpp - \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDserver.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDserver.dylib server.o - -libIRCDfilelogger.dylib: filelogger.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h - \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c filelogger.cpp - \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDfilelogger.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDfilelogger.dylib filelogger.o - -libIRCDuserresolver.dylib: user_resolver.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/users.h - \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c user_resolver.cpp - \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDfilelogger.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDuserresolver.dylib user_resolver.o - -EOM - -} else { - - print FH <<EOM; -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 libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDcommand_parse.so libIRCDsnomasks.so libIRCDserver.so libIRCDfilelogger.so libIRCDuserresolver.so moo 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 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 libIRCDserver.so libIRCDfilelogger.so libIRCDuserresolver.so - \$(CC) -pipe -I../include -Wl,--rpath -Wl,$config{LIBRARY_DIR} \$(FLAGS) $freebsd4libs -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 libIRCDserver.so libIRCDfilelogger.so libIRCDuserresolver.so - -moo: - \${MAKE} -C "commands" DIRNAME="src/commands" CC="\$(CC)" \$(MAKEARGS) - -libIRCDsocketengine.so: $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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsocketengine.so socketengine.o $se.o - -libIRCDsnomasks.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsnomasks.so snomasks.o - -libIRCDcommand_parse.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommand_parse.so command_parse.o - -libIRCDcull_list.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcull_list.so cull_list.o - -libIRCDuserprocess.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDuserprocess.so userprocess.o - -libIRCDhash.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDhash.so hashcomp.o - -libIRCDhelper.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDhelper.so helperfuncs.o - -libIRCDchannels.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDchannels.so channels.o - -libIRCDmode.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmode.so mode.o modes/modeclasses.a - -libIRCDxline.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDxline.so xline.o - -libIRCDstring.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDstring.so inspstring.o - -libIRCDasyncdns.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDasyncdns.so dns.o - -libIRCDbase.so: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h - \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp - \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDbase.so base.o + print FH "$all\n\n"; -libIRCDconfigreader.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDconfigreader.so configreader.o + $deps = calcdeps("src/inspircd.cpp"); + print FH "inspircd: inspircd.cpp $deps $all_libsonly\n"; + print FH "$othercrap\n"; -libIRCDcommands.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommands.so commands.o - -libIRCDdynamic.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDdynamic.so dynamic.o - -libIRCDusers.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDusers.so users.o - -libIRCDmodules.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmodules.so modules.o - -libIRCDwildcard.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDwildcard.so wildcard.o - -libIRCDsocket.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsocket.so socket.o - -libIRCDinspsocket.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDinspsocket.so inspsocket.o - -libIRCDtimer.so: 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 -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDtimer.so timer.o - -libIRCDserver.so: server.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h - \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c server.cpp - \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDserver.so server.o - -libIRCDfilelogger.so: filelogger.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h - \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c filelogger.cpp - \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDfilelogger.so filelogger.o - -libIRCDuserresolver.so: user_resolver.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/users.h - \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c user_resolver.cpp - \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDuserresolver.so user_resolver.o + foreach my $cpp (sort keys %filelist) + { + my $thislib = $filelist{$cpp} . "." . $libraryext; + my $objs = $cpp; + my $rawcpp = $cpp; + $objs =~ s/\.cpp$/.o/; + if (exists($extraobjects{$cpp})) + { + $objs = $objs . " " . $extraobjects{$cpp}; + } + if (exists($extrasources{$cpp})) + { + $rawcpp = $rawcpp . " " . $extrasources{$cpp}; + } + if ($config{IS_DARWIN} eq "YES") + { + $libcrap = "-install_name " . $config{LIBRARY_DIR} . "/" . $thislib . " -dynamiclib -twolevel_namespace -undefined dynamic_lookup"; + } + else + { + $libcrap = "-Wl,--rpath -Wl," . $config{LIBRARY_DIR} . " -shared"; + } + $deps = calcdeps("src/$cpp"); + if (exists($extrasources{$cpp})) + { + foreach my $seperate (sort split(' ',$extrasources{$cpp})) + { + $d = calcdeps("src/$extrasources{$cpp}") . " "; + if ($d ne "") + { + $deps = $deps . $d . " "; + } + } + } + print FH $thislib . ": $cpp $deps ". $specialdeps{$cpp} . "\n"; + print FH " \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c $rawcpp\n"; + if (exists($extrabuildlines{$cpp})) + { + print FH " " . $extrabuildlines{$cpp} . "\n"; + } + print FH " \$(CC) -pipe $libcrap -o " . $thislib . " " . $objs . "\n\n"; + } -EOM -} + print FH "moo:\n \${MAKE} -C \"commands\" DIRNAME=\"src/commands\" CC=\"\$(CC)\" \$(MAKEARGS)\n\n"; # close main makefile close(FH); @@ -1639,4 +1566,4 @@ ITEM # \$(CC) -pipe -I../../include \$(FLAGS) -export-dynamic -c cmd_$cmd.cpp # \$(CC) -pipe $SHARED -o cmd_$cmd.so cmd_$cmd.o } -ed + |