3 # InspIRCd Configuration Script
5 # Copyright 2002-2007 The ChatSpike Development Team
6 # <brain@chatspike.net>
7 # <Craig@chatspike.net>
9 # [14:21] Brain: <matrix impression> i know perl-fu!
13 ########################################
21 # Utility functions for our buildsystem
26 'enable-gnutls' => \$opt_use_gnutls,
27 'rebuild' => \$opt_rebuild,
28 'enable-openssl' => \$opt_use_openssl,
29 'disable-interactive' => \$opt_nointeractive,
30 'with-nick-length=i' => \$opt_nick_length,
31 'with-channel-length=i' => \$opt_chan_length,
32 'with-max-clients=i' => \$opt_maxclients,
33 'enable-epoll' => \$opt_epoll,
34 'enable-kqueue' => \$opt_kqueue,
35 'disable-epoll' => \$opt_noepoll,
36 'disable-kqueue' => \$opt_nokqueue,
37 'enable-ipv6' => \$opt_ipv6,
38 'enable-remote-ipv6' => \$opt_ipv6links,
39 'disable-remote-ipv6' => \$opt_noipv6links,
40 'with-cc=s' => \$opt_cc,
41 'with-ident-length=i' => \$opt_ident,
42 'with-quit-length=i' => \$opt_quit,
43 'with-topic-length=i' => \$opt_topic,
44 'with-kick-length=i' => \$opt_kick,
45 'with-gecos-length=i' => \$opt_gecos,
46 'with-away-length=i' => \$opt_away,
47 'with-max-modes=i' => \$opt_modes,
48 'prefix=s' => \$opt_base_dir,
49 'config-dir=s' => \$opt_config_dir,
50 'module-dir=s' => \$opt_module_dir,
51 'binary-dir=s' => \$opt_binary_dir,
52 'library-dir=s' => \$opt_library_dir,
53 'disable-debuginfo' => sub { $opt_disable_debug = 1 },
54 'help' => sub { showhelp(); },
55 'modupdate' => sub { modupdate(); },
56 'update' => sub { update(); },
57 'svnupdate' => sub { svnupdate(); },
58 'clean' => sub { clean(); },
61 my $non_interactive = (
62 (defined $opt_library_dir) ||
63 (defined $opt_base_dir) ||
64 (defined $opt_config_dir) ||
65 (defined $opt_module_dir) ||
66 (defined $opt_base_dir) ||
67 (defined $opt_binary_dir) ||
68 (defined $opt_nointeractive) ||
69 (defined $opt_away) ||
70 (defined $opt_gecos) ||
71 (defined $opt_kick) ||
72 (defined $opt_maxclients) ||
73 (defined $opt_modes) ||
74 (defined $opt_topic) ||
75 (defined $opt_quit) ||
76 (defined $opt_ident) ||
78 (defined $opt_ipv6) ||
79 (defined $opt_ipv6links) ||
80 (defined $opt_noipv6links) ||
81 (defined $opt_kqueue) ||
82 (defined $opt_epoll) ||
83 (defined $opt_maxchans) ||
84 (defined $opt_opermaxchans) ||
85 (defined $opt_chan_length) ||
86 (defined $opt_nick_length) ||
87 (defined $opt_use_openssl) ||
88 (defined $opt_nokqueue) ||
89 (defined $opt_noepoll) ||
90 (defined $opt_use_gnutls)
92 my $interactive = !$non_interactive;
95 chomp($topdir = getcwd());
96 $this = resolve_directory($topdir); # PWD, Regardless.
97 @modlist = (); # Declare for Module List..
98 %config = (); # Initiate Configuration Hash..
99 $config{ME} = resolve_directory($topdir); # Present Working Directory
101 $config{BASE_DIR} = $config{ME};
103 if (defined $opt_base_dir)
105 $config{BASE_DIR} = $opt_base_dir;
108 $config{CONFIG_DIR} = resolve_directory($config{BASE_DIR}."/conf"); # Configuration Directory
109 $config{MODULE_DIR} = resolve_directory($config{BASE_DIR}."/modules"); # Modules Directory
110 $config{BINARY_DIR} = resolve_directory($config{BASE_DIR}."/bin"); # Binary Directory
111 $config{LIBRARY_DIR} = resolve_directory($config{BASE_DIR}."/lib"); # Library Directory
113 if (defined $opt_config_dir)
115 $config{CONFIG_DIR} = $opt_config_dir;
117 if (defined $opt_module_dir)
119 $config{MODULE_DIR} = $opt_module_dir;
121 if (defined $opt_binary_dir)
123 $config{BINARY_DIR} = $opt_binary_dir;
125 if (defined $opt_library_dir)
127 $config{LIBRARY_DIR} = $opt_library_dir;
129 chomp($config{HAS_GNUTLS} = `libgnutls-config --version 2>/dev/null | cut -c 1,2,3`); # GNUTLS Version.
130 chomp($config{HAS_OPENSSL} = `pkg-config --modversion openssl 2>/dev/null`); # Openssl version
131 chomp($gnutls_ver = $config{HAS_GNUTLS});
132 chomp($openssl_ver = $config{HAS_OPENSSL});
133 $config{USE_GNUTLS} = "n";
134 if (defined $opt_use_gnutls)
136 $config{USE_GNUTLS} = "y"; # Use gnutls.
138 $config{USE_OPENSSL} = "n"; # Use openssl.
139 if (defined $opt_use_openssl)
141 $config{USE_OPENSSL} = "y";
144 # no, let's not change these.
145 $config{OPTIMITEMP} = "0"; # Default Optimisation Value
146 if (!defined $opt_disable_debug)
148 $config{OPTIMISATI} = "-g1"; # Optimisation Flag
152 $config{OPTIMISATI} = "-O2"; # DEBUGGING OFF!
155 $config{NICK_LENGT} = "31"; # Default Nick Length
156 if (defined $opt_nick_length)
158 $config{NICK_LENGT} = $opt_nick_length;
160 $config{CHAN_LENGT} = "64"; # Default Channel Name Length
161 if (defined $opt_chan_length)
163 $config{CHAN_LENGT} = $opt_chan_length;
165 $config{MAXI_MODES} = "20"; # Default Max. Number of Modes set at once.
166 if (defined $opt_modes)
168 $config{MAXI_MODES} = $opt_modes;
170 $config{HAS_STRLCPY} = "false"; # strlcpy Check.
171 $config{HAS_STDINT} = "false"; # stdint.h check
172 $config{USE_KQUEUE} = "y"; # kqueue enabled
173 if (defined $opt_kqueue)
175 $config{USE_KQUEUE} = "y";
177 if (defined $opt_nokqueue)
179 $config{USE_KQUEUE} = "n";
181 $config{USE_EPOLL} = "y"; # epoll enabled
182 if (defined $opt_epoll)
184 $config{USE_EPOLL} = "y";
186 if (defined $opt_noepoll)
188 $config{USE_EPOLL} = "n";
190 $config{IPV6} = "n"; # IPv6 support (experimental)
191 if (defined $opt_ipv6)
195 $config{SUPPORT_IP6LINKS} = "y"; # IPv4 supporting IPv6 links (experimental)
196 if (defined $opt_ipv6links)
198 $config{SUPPORT_IP6LINKS} = "y";
200 if (defined $opt_noipv6links)
202 $config{SUPPORT_IP6LINKS} = "n";
204 $config{STATIC_LINK} = "no"; # are doing static modules?
205 chomp($config{MAX_CLIENT_T} = `sh -c \"ulimit -n\"`); # FD Limit
206 chomp($config{MAX_DESCRIPTORS} = `sh -c \"ulimit -n\"`); # Hard FD Limit
207 chomp($config{GCCVER} = `g++ -dumpversion | cut -c 1`); # Major GCC Version
208 $config{_SOMAXCONN} = SOMAXCONN; # Max connections in accept queue
209 $config{OSNAME} = $^O; # Operating System Name
210 $config{IS_DARWIN} = "NO"; # Is OSX?
211 if ($config{OSNAME} =~ /darwin/i)
213 $config{IS_DARWIN} = "YES";
215 $config{CC} = "g++"; # C++ compiler
218 $config{CC} = $opt_cc;
220 $exec = $config{CC} . " -dumpversion | cut -c 1";
221 chomp($config{GCCVER} = `$exec`); # Major GCC Version
222 $config{MAKEORDER} = "ircd mods"; # build order
223 $config{STATICLIBS} = ""; # library archive path
224 $config{MAX_IDENT} = "12"; # max ident size
225 $config{MAX_QUIT} = "255"; # max quit message size
226 $config{MAX_TOPIC} = "307"; # max topic size
227 $config{MAX_KICK} = "255"; # max kick message size
228 $config{MAX_GECOS} = "128"; # max GECOS size
229 $config{MAX_AWAY} = "200"; # max AWAY size
230 if (defined $opt_ident)
232 $config{MAX_IDENT} = $opt_ident;
234 if (defined $opt_quit)
236 $config{MAX_QUIT} = $opt_quit;
238 if (defined $opt_topic)
240 $config{MAX_TOPIC} = $opt_topic;
242 if (defined $opt_kick)
244 $config{MAX_KICK} = $opt_kick;
246 if (defined $opt_gecos)
248 $config{MAX_GECOS} = $opt_gecos;
250 if (defined $opt_away)
252 $config{MAX_AWAY} = $opt_away;
255 $config{HAS_OPENSSL} =~ /^([-[:digit:].]+)([a-z])?(\-[a-z][0-9])?$/;
256 $config{HAS_OPENSSL} = $1;
258 if ($config{GCCVER} eq "") {
259 print $config{CC} . " was not found! You require g++ (the GNU C++ compiler, part of GCC) to build InspIRCd!\n";
263 # Minihack! Convert Cygwin to 'Cyg-Static' so i can
264 # Keep my dynamic module experiments here for later
267 if ($config{OSNAME} =~ /CYGWIN/i)
269 $config{OSNAME} = "CYG-STATIC";
272 if (!$config{MAX_CLIENT_T}) {
273 $config{MAX_CLIENT_T} = 1024; # Set a reasonable 'Default'
274 $fd_scan_fail = "true"; # Used Later
277 # Get and Set some important vars..
282 system("rm -rf .config.cache");
288 chomp($topdir = getcwd());
289 $this = resolve_directory($topdir); # PWD, Regardless.
291 # Does the cache file exist?
293 # No, No it doesn't.. *BASH*
294 print "You have not run ./configure before. Please do this before trying to run the update script.\n";
297 # We've Loaded the cache file and all our variables..
298 print "Updating Files..\n";
300 if ($opt_disable_debug == 1)
302 print "Disabling debug information (-g).\n";
303 $config{OPTIMISATI} = "";
306 $has_epoll = $config{HAS_EPOLL};
307 $has_kqueue = $config{HAS_KQUEUE};
316 print "Configure update failed: $@\n";
324 chomp($topdir = getcwd());
325 $this = resolve_directory($topdir); # PWD, Regardless.
327 # Does the cache file exist?
329 # No, No it doesn't.. *BASH*
330 print "You have not run ./configure before. Please do this before trying to run the update script.\n";
333 # We've Loaded the cache file and all our variables..
334 print "Updating Files..\n";
336 $has_epoll = $config{HAS_EPOLL};
337 $has_kqueue = $config{HAS_KQUEUE};
346 print "Module update failed: $@\n";
356 open(FH,"<.svn/entries") or $fail = 1;
358 print "This is not an SVN copy of InspIRCd.\n";
365 system("svn update");
366 system("perl configure -update");
367 if (defined $opt_rebuild) {
368 system("make install");
373 print "Running non-interactive configure...\n" unless $interactive;
374 print "Checking for cache from previous configure... ";
375 print ((getcache() eq "true") ? "found\n" : "not found\n");
376 print "Checking operating system version... ";
377 print getosflags() . "\n";
379 if (defined $opt_maxclients)
381 $config{MAX_CLIENT} = $opt_maxclients;
384 if (!$config{MAX_CLIENT}) {
385 # If the cache hasn't set the max clients, copy the variable of MAX_CLIENT_T, this
386 # allows us to keep _T for testing purposes. (ie. "Are you sure you want to go
387 # higher than the found value" :))
388 $config{MAX_CLIENT} = $config{MAX_CLIENT_T};
391 printf "Checking if stdint.h exists... ";
392 $config{HAS_STDINT} = "true";
394 open(STDINT, "</usr/include/stdint.h") or $config{HAS_STDINT} = "false";
395 if ($config{HAS_STDINT} eq "true") {
398 print "yes\n" if $config{HAS_STDINT} eq "true";
399 print "no\n" if $config{HAS_STDINT} eq "false";
402 printf "Checking if strlcpy exists... ";
403 # Perform the strlcpy() test..
404 $config{HAS_STRLCPY} = "false";
406 open(STRLCPY, "</usr/include/string.h") or $fail = 1;
408 while (chomp($line = <STRLCPY>)) {
409 # try and find the delcaration of:
410 # size_t strlcpy(...)
411 if ($line =~ /size_t(\0x9|\s)+strlcpy/) {
412 $config{HAS_STRLCPY} = "true";
417 print "yes\n" if $config{HAS_STRLCPY} eq "true";
418 print "no\n" if $config{HAS_STRLCPY} eq "false";
421 printf "Checking if kqueue exists... ";
424 open(KQUEUE, "</usr/include/sys/event.h") or $fail = 1;
426 while (chomp($line = <KQUEUE>)) {
427 # try and find the delcaration of:
429 if ($line =~ /int(\0x9|\s)+kqueue/) {
435 print "yes\n" if $has_kqueue == 1;
436 print "no\n" if $has_kqueue == 0;
438 printf "Checking if epoll exists... ";
441 open(EPOLL, "</usr/include/sys/epoll.h") or $fail = 1;
447 my $kernel = `uname -r`;
449 if (($kernel =~ /^2\.0\./) || ($kernel =~ /^2\.2\./) || ($kernel =~ /^2\.4\./)) {
453 print "yes\n" if $has_epoll == 1;
454 print "no\n" if $has_epoll == 0;
456 if (($config{OSNAME} =~ /CYGWIN/) || ($config{OSNAME} eq "CYG-STATIC")) {
457 $config{HAS_STRLCPY} = "true";
460 $config{HAS_EPOLL} = $has_epoll;
461 $config{HAS_KQUEUE} = $has_kqueue;
463 printf "Checking for libgnutls... ";
464 if (($config{HAS_GNUTLS}) && (($config{HAS_GNUTLS} >= 1.2) || ($config{HAS_GNUTLS} eq "y"))) {
466 $config{HAS_GNUTLS} = "y";
469 $config{HAS_GNUTLS} = "n";
472 printf "Checking for openssl... ";
473 if (($config{HAS_OPENSSL}) && (($config{HAS_OPENSSL} >= 0.8) || ($config{HAS_OPENSSL} eq "y"))) {
475 $config{HAS_OPENSSL} = "y";
478 $config{HAS_OPENSSL} = "n";
481 ################################################################################
482 # BEGIN INTERACTIVE PART #
483 ################################################################################
491 my $rev = getrevision();
492 # Display Introduction Message..
494 Welcome to the \033[1mInspIRCd\033[0m Configuration program! (\033[1minteractive mode\033[0m)
495 \033[1mPackage maintainers: Type ./configure --help for non-interactive help\033[0m
497 *** If you are unsure of any of these values, leave it blank for ***
498 *** standard settings that will work, and your server will run ***
499 *** using them. Please consult your IRC network admin if in doubt. ***
501 Press \033[1m<RETURN>\033[0m to accept the default for any option, or enter
502 a new value. Please note: You will \033[1mHAVE\033[0m to read the docs
503 dir, otherwise you won't have a config file!
505 Your operating system is: \033[1;32m$config{OSNAME}\033[0m ($wholeos)
506 Maximum file descriptors: \033[1;32m$config{MAX_CLIENT_T}\033[0m
507 Your InspIRCd revision ID is \033[1;32mr$rev\033[0m";
509 print " (Non-SVN build)";
513 $config{CHANGE_COMPILER} = "n";
514 print "I have detected the following compiler: \033[1;32m$config{CC}\033[0m (version \033[1;32m$config{GCCVER}.x\033[0m)\n";
516 while (($config{GCCVER} < 3) || ($config{GCCVER} eq "")) {
517 print "\033[1;32mIMPORTANT!\033[0m A GCC 2.x compiler has been detected, and
518 should NOT be used. You should probably specify a newer compiler.\n\n";
519 yesno(CHANGE_COMPILER,"Do you want to change the compiler?");
520 if ($config{CHANGE_COMPILER} =~ /y/i) {
521 print "What command do you want to use to invoke your compiler?\n";
522 print "[\033[1;32m$config{CC}\033[0m] -> ";
523 chomp($config{CC} = <STDIN>);
524 if ($config{CC} eq "") {
527 chomp($foo = `$config{CC} -dumpversion | cut -c 1`);
529 chomp($config{GCCVER} = `$config{CC} -dumpversion | cut -c 1`); # we must redo these if we change compilers
530 print "Queried compiler: \033[1;32m$config{CC}\033[0m (version \033[1;32m$config{GCCVER}.x\033[0m)\n";
531 if ($config{GCCVER} < 3) {
532 print "\033[1;32mGCC 2.x WILL NOT WORK!\033[0m. Let's try that again, shall we?\n";
536 print "\033[1;32mWARNING!\033[0m Could not execute the compiler you specified. You may want to try again.\n";
543 # Directory Settings..
544 my $tmpbase = $config{BASE_DIR};
545 dir_check("do you wish to install the InspIRCd base", "BASE_DIR");
546 if ($tmpbase ne $config{BASE_DIR}) {
547 $config{CONFIG_DIR} = resolve_directory($config{BASE_DIR}."/conf"); # Configuration Dir
548 $config{MODULE_DIR} = resolve_directory($config{BASE_DIR}."/modules"); # Modules Directory
549 $config{BINARY_DIR} = resolve_directory($config{BASE_DIR}."/bin"); # Binary Directory
550 $config{LIBRARY_DIR} = resolve_directory($config{BASE_DIR}."/lib"); # Library Directory
553 dir_check("are the configuration files", "CONFIG_DIR");
554 dir_check("are the modules to be compiled to", "MODULE_DIR");
555 dir_check("is the IRCd binary to be placed", "BINARY_DIR");
556 dir_check("are the IRCd libraries to be placed", "LIBRARY_DIR");
559 yesno(USE_KQUEUE,"You are running a BSD operating system, and kqueue\nwas detected. Would you like to enable kqueue support?\nThis is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable kqueue?");
563 yesno(USE_EPOLL,"You are running a Linux 2.6+ operating system, and epoll\nwas detected. Would you like to enable epoll support?\nThis is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable epoll?");
566 $chose_hiperf = (($config{USE_EPOLL} eq "y") || ($config{USE_KQUEUE} eq "y"));
567 if (!$chose_hiperf) {
568 print "No high-performance socket engines are available, or you chose\n";
569 print "not to enable one. Defaulting to select() engine.\n\n";
572 yesno(IPV6,"Would you like to build InspIRCd with IPv6 support?");
575 if ($config{IPV6} eq "y") {
576 print "You have chosen to build an \033[1;32mIPV6-enabled\033[0m server.\nTo accept IPV4 users, you can still use IPV4 addresses\nin your port bindings..\n\n";
577 $config{SUPPORT_IP6LINKS} = "y";
579 yesno(SUPPORT_IP6LINKS,"You have chosen to build an \033[1;32mIPV4-only\033[0m server.\nWould you like to enable support for linking to IPV6-enabled\nInspIRCd servers?\nIf you are using a recent operating\nsystem and are unsure, answer yes.\nIf you answer 'no' here, your InspIRCd server will be unable\nto parse IPV6 addresses (e.g. for CIDR bans)");
583 if (($config{HAS_GNUTLS} eq "y") && ($config{HAS_OPENSSL} eq "y")) {
584 print "I have detected both \033[1;32mGnuTLS\033[0m and \033[1;32mOpenSSL\033[0m on your system.\n";
585 print "I will default to GnuTLS. If you wish to use OpenSSL\n";
586 print "instead, you should enable the OpenSSL module yourself\n";
587 print "by copying it from src/modules/extra to src/modules.\n\n";
588 print "Detected GnuTLS version: \033[1;32m" . $gnutls_ver . "\033[0m\n";
589 print "Detected OpenSSL version: \033[1;32m" . $openssl_ver . "\033[0m\n\n";
592 if ($config{HAS_GNUTLS} eq "y") {
593 yesno(USE_GNUTLS, "Would you like to enable SSL Support?");
594 if ($config{USE_GNUTLS} eq "y") {
595 print "\nUsing GnuTLS SSL module.\n";
597 } elsif ($config{HAS_OPENSSL} eq "y") {
598 yesno(USE_OPENSSL, "Would you like to enable SSL Support?");
599 if ($config{USE_OPENSSL} eq "y") {
600 print "\nUsing OpenSSL SSL module.\nYou will get better performance if you move to GnuTLS in the future.\n";
604 print "\nCould not detect OpenSSL or GnuTLS. Make sure pkg-config is installed if\nyou intend to use OpenSSL, or that GnuTLS is in your path if you intend\nto use GnuTLS.\n\n";
607 print "\nThe following questions will ask you for various figures relating\n";
608 print "To your IRCd install. Please note that these should usually be left\n";
609 print "as defaults unless you have a real reason to change them. If they\n";
610 print "changed, then the values must be identical on all servers on your\n";
611 print "network, or malfunctions and/or crashes may occur, with the exception\n";
612 print "of the 'maximum number of clients' setting which may be different on\n";
613 print "different servers on the network.\n\n";
615 # File Descriptor Settings..
616 promptnumeric("number of clients at any one time", "MAX_CLIENT_T");
617 $config{MAX_CLIENT} = $config{MAX_CLIENT_T};
618 $config{MAX_DESCRIPTORS} = $config{MAX_CLIENT_T};
620 promptnumeric("length of nicknames", "NICK_LENGT");
621 promptnumeric("length of channel names", "CHAN_LENGT");
622 promptnumeric("number of mode changes in one line", "MAXI_MODES");
623 promptnumeric("length of an ident (username)", "MAX_IDENT");
624 promptnumeric("length of a quit message", "MAX_QUIT");
625 promptnumeric("length of a channel topic", "MAX_TOPIC");
626 promptnumeric("length of a kick message", "MAX_KICK");
627 promptnumeric("length of a GECOS (real name)", "MAX_GECOS");
628 promptnumeric("length of an away message", "MAX_AWAY");
633 if (($config{USE_GNUTLS} eq "y") && ($config{HAS_GNUTLS} ne "y"))
635 print "Sorry, but i couldn't detect gnutls. Make sure gnutls-config is in your path.\n";
638 if (($config{USE_OPENSSL} eq "y") && ($config{HAS_OPENSSL} ne "y"))
640 print "Sorry, but i couldn't detect openssl. Make sure openssl is in your path.\n";
644 if ($config{USE_GNUTLS} eq "y") {
646 open(TMP, "<src/modules/m_ssl_gnutls.cpp") or $failed = 1;
649 print "Symlinking src/modules/m_ssl_gnutls.cpp from extra/\n";
650 chdir("src/modules");
651 system("ln -s extra/m_ssl_gnutls.cpp");
658 open(TMP, "<$config{CONFIG_DIR}/key.pem") or $failed = 1;
660 open(TMP, "<$config{CONFIG_DIR}/cert.pem") or $failed = 1;
663 print "SSL Certificates Not found, Generating.. \n\n
664 *************************************************************
665 * Generating the Private Key may take some time, go grab a *
666 * Coffee. Even better, to generate some more entropy if it *
667 * is taking a while, open another console and type du / a *
668 * few times and get that HD going :) Then answer the *
669 * Questions which follow. If you are unsure, just hit enter *
670 *************************************************************\n\n";
671 system("certtool --generate-privkey --outfile key.pem");
672 system("certtool --generate-self-signed --load-privkey key.pem --outfile cert.pem");
673 print "\nCertificate generation complete, copying to config directory... ";
674 system("mv key.pem $config{CONFIG_DIR}/key.pem");
675 system("mv cert.pem $config{CONFIG_DIR}/cert.pem");
678 print "SSL Certificates found, skipping.\n\n"
683 print "Skipping SSL certificate generation\nin non-interactive mode.\n\n";
685 } elsif ($config{USE_OPENSSL} eq "y") {
687 open(TMP, "<src/modules/m_ssl_openssl.cpp") or $failed = 1;
690 print "Symlinking src/modules/m_ssl_openssl.cpp from extra/\n";
691 chdir("src/modules");
692 system("ln -s extra/m_ssl_openssl.cpp");
699 open(TMP, "<$config{CONFIG_DIR}/key.pem") or $failed = 1;
701 open(TMP, "<$config{CONFIG_DIR}/cert.pem") or $failed = 1;
704 print "SSL Certificates Not found, Generating.. \n\n
705 *************************************************************
706 * Generating the certificates may take some time, go grab a *
707 * coffee, or something. *
708 *************************************************************\n\n";
709 system("openssl req -x509 -nodes -newkey rsa:1024 -keyout key.pem -out cert.pem");
710 system("openssl dhparam -out dhparams.pem 1024");
711 print "\nCertificate generation complete, copying to config directory... ";
712 system("mv key.pem $config{CONFIG_DIR}/key.pem");
713 system("mv cert.pem $config{CONFIG_DIR}/cert.pem");
714 system("mv dhparams.pem $config{CONFIG_DIR}/dhparams.pem");
717 print "SSL Certificates found, skipping.\n\n"
722 print "Skipping SSL certificate generation\nin non-interactive mode.\n\n";
725 if (($config{USE_GNUTLS} eq "n") && ($config{USE_OPENSSL} eq "n")) {
726 print "Skipping SSL Certificate generation, SSL support is not available.\n\n";
734 print "To build your server with these settings, please type '\033[1;32m$config{MAKEPROG}\033[0m' now.\n";
735 if (($config{USE_GNUTLS} eq "y") || ($config{USE_OPENSSL} eq "y")) {
736 print "Please remember that to enable \033[1;32mSSL support\033[0m you must\n";
737 print "load the required modules in your config. This configure process\n";
738 print "has just prepared these modules to be compiled for you, and has not\n";
739 print "configured them to be compiled into the core of the ircd.\n";
741 print "*** \033[1;32mRemember to edit your configuration files!!!\033[0m ***\n\n\n";
742 if (($config{OSNAME} eq "OpenBSD") && ($config{CC} ne "eg++")) {
743 print "\033[1;32mWARNING!\033[0m You are running OpenBSD but you are using the base gcc package\nrather than eg++. This compile will most likely fail, but i'm letting you\ngo ahead with it anyway, just in case i'm wrong :-)\n";
746 if ($config{GCCVER} < "3") {
748 \033[1;32mWARNING!\033[0m You are attempting to compile InspIRCd on GCC 2.x!
749 GCC 2.x series compilers only had partial (read as broken) C++ support, and
750 your compile will most likely fail horribly! If you have any problems, do NOT
751 report them to the bugtracker or forums without first upgrading your compiler
752 to a newer 3.x or 4.x (or whatever is available currently) version.
756 ################################################################################
758 ################################################################################
760 # Retrieves the .config.cache file, and loads values into the main config hash.
761 open(CACHE, ".config.cache") or return undef;
764 # Ignore Blank lines, and comments..
767 my ($key, $value) = split("=", $_, 2);
768 $value =~ /^\"(.*)\"$/;
769 # Do something with data here!
777 # Dump the contents of %config
778 print "Writing \033[1;32mcache file\033[0m for future ./configures ...\n";
779 open(FILEHANDLE, ">.config.cache");
780 foreach $key (keys %config) {
781 print FILEHANDLE "$key=\"$config{$key}\"\n";
787 my ($desc, $hash_key) = @_;
790 print "In what directory $desc?\n";
791 print "[\033[1;32m$config{$hash_key}\033[0m] -> ";
792 chomp($var = <STDIN>);
794 $var = $config{$hash_key};
796 if ($var =~ /^\~\/(.+)$/) {
797 # Convert it to a full path..
798 $var = resolve_directory($ENV{HOME} . "/" . $1);
800 elsif ((($config{OSNAME} =~ /MINGW32/i) and ($var !~ /^[A-Z]{1}:\\.*/)) and (substr($var,0,1) ne "/"))
802 # Assume relative Path was given.. fill in the rest.
803 $var = $this . "/$var";
806 $var = resolve_directory($var);
808 print "$var does not exist. Create it?\n[\033[1;32my\033[0m] ";
809 chomp($tmp = <STDIN>);
810 if (($tmp eq "") || ($tmp =~ /^y/i)) {
811 # Attempt to Create the Dir..
813 system("mkdir -p \"$var\" >> /dev/null 2>&1");
814 $chk = system("mkdir -p \"$var\" >> /dev/null 2>&1") / 256;
816 print "Unable to create directory. ($var)\n\n";
821 # They said they don't want to create, and we can't install there.
827 # Target exists, but is not a directory.
828 print "File $var exists, but is not a directory.\n\n";
832 # Either Dir Exists, or was created fine.
833 $config{$hash_key} = $var;
841 $config{LDLIBS} = "-lstdc++";
842 $config{FLAGS} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}";
843 $config{DEVELOPER} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual -g";
844 $SHARED = "-Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared";
845 $config{MAKEPROG} = "make";
847 if ($config{OSNAME} =~ /darwin/i) {
848 $config{FLAGS} = "-DDARWIN -frtti -fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}";
849 $SHARED = "-bundle -twolevel_namespace -undefined dynamic_lookup";
850 $config{LDLIBS} = "-ldl -lstdc++";
853 if ($config{OSNAME} =~ /OpenBSD/i) {
854 $config{MAKEPROG} = "gmake";
855 chomp($foo = `eg++ -dumpversion | cut -c 1`);
856 # theyre running the package version of gcc (eg++)... detect it and set up its version numbers.
857 # if theyre not running this, configure lets the build continue but they probably wont manage to
858 # compile as this standard version is 2.95.3!
860 $config{CC} = "eg++";
861 chomp($config{GCCVER} = `eg++ -dumpversion | cut -c 1`); # we must redo these if we change the compiler path
866 if ($config{OSNAME} =~ /Linux/i) {
867 $config{LDLIBS} = "-ldl -lstdc++";
868 $config{FLAGS} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}";
869 $config{FLAGS} .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS});
870 $config{MAKEPROG} = "make";
871 if ($config{OSNAME} =~ /CYGWIN/) {
872 $config{FLAGS} = "-fno-strict-aliasing -Wall -Woverloaded-virtual $config{OPTIMISATI}";
873 $config{LDLIBS} = "";
874 $config{MAKEPROG} = "/usr/bin/make";
875 $config{MAKEORDER} = "ircd mods";
877 } elsif ($config{OSNAME} eq "CYG-STATIC") {
878 $config{FLAGS} = "-fno-strict-aliasing -Wall -Woverloaded-virtual $config{OPTIMISATI}";
879 $config{LDLIBS} = "";
880 $config{MAKEPROG} = "/usr/bin/make";
881 $config{MAKEORDER} = "mods ircd";
882 $config{STATICLIBS} = "modules/mods.a";
883 $config{STATIC_LINK} = "yes";
884 return "Cygwin-Static";
886 $config{FLAGS} .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS});
889 if ($config{OSNAME} =~ /SunOS/i)
891 # solaris/sunos needs these
892 # socket = bsd sockets api
894 # rt = POSIX realtime extensions
895 # resolv = inet_aton only (why isnt this in nsl?!)
896 $config{MAKEPROG} = "gmake";
897 $config{LDLIBS} = $config{LDLIBS} . " -lsocket -lnsl -lrt -lresolv";
901 if($config{OSNAME} =~ /MINGW32/i)
903 # All code is position-independent on windows
904 $config{FLAGS} =~ s/-fPIC //;
908 return $config{OSNAME};
912 my($writeheader) = @_;
913 # First File.. inspircd_config.h
914 chomp(my $incos = `uname -n -s -r`);
915 chomp($version = `sh src/version.sh`);
916 chomp(my $revision2 = getrevision());
917 if ($writeheader == 1)
919 print "Writing \033[1;32minspircd_config.h\033[0m\n";
920 open(FILEHANDLE, ">include/inspircd_config.h");
921 my $NL = $config{NICK_LENGT}+1;
922 my $CL = $config{CHAN_LENGT}+1;
923 print FILEHANDLE <<EOF;
924 /* Auto generated by configure, do not modify! */
925 #ifndef __CONFIGURATION_AUTO__
926 #define __CONFIGURATION_AUTO__
928 #define CONFIG_FILE "$config{CONFIG_DIR}/inspircd.conf"
929 #define MOD_PATH "$config{MODULE_DIR}"
930 #define VERSION "$version"
931 #define REVISION "$revision2"
932 #define MAXCLIENTS $config{MAX_CLIENT}
933 #define MAXCLIENTS_S "$config{MAX_CLIENT}"
934 #define SOMAXCONN_S "$config{_SOMAXCONN}"
935 #define MAX_DESCRIPTORS $config{MAX_DESCRIPTORS}
938 #define MAXMODES $config{MAXI_MODES}
939 #define IDENTMAX $config{MAX_IDENT}
940 #define MAXQUIT $config{MAX_QUIT}
941 #define MAXTOPIC $config{MAX_TOPIC}
942 #define MAXKICK $config{MAX_KICK}
943 #define MAXGECOS $config{MAX_GECOS}
944 #define MAXAWAY $config{MAX_AWAY}
945 #define OPTIMISATION $config{OPTIMITEMP}
946 #define LIBRARYDIR "$config{LIBRARY_DIR}"
947 #define SYSTEM "$incos"
950 if ($config{OSNAME} =~ /SunOS/i) {
951 print FILEHANDLE "#define IS_SOLARIS\n";
953 if ($config{OSNAME} =~ /CYGWIN/i) {
954 print FILEHANDLE "#define IS_CYGWIN\n";
955 print FILEHANDLE "#ifndef FD_SETSIZE\n#define FD_SETSIZE 1024\n#endif\n";
957 if ($config{OSNAME} =~ /MINGW32/i) {
958 print FILEHANDLE "#define IS_MINGW\n";
960 if ($config{OSNAME} =~ /CYG-STATIC/i) {
961 print FILEHANDLE "#ifndef FD_SETSIZE\n#define FD_SETSIZE 1024\n#endif\n";
963 if ($config{STATIC_LINK} eq "yes") {
964 print FILEHANDLE "#define STATIC_LINK\n";
966 if ($config{GCCVER} >= 3) {
967 print FILEHANDLE "#define GCC3\n";
969 if ($config{HAS_STRLCPY} eq "true") {
970 print FILEHANDLE "#define HAS_STRLCPY\n";
972 if ($config{HAS_STDINT} eq "true") {
973 print FILEHANDLE "#define HAS_STDINT\n";
975 if ($config{IPV6} =~ /y/i) {
976 print FILEHANDLE "#define IPV6\n";
978 if ($config{SUPPORT_IP6LINKS} =~ /y/i) {
979 print FILEHANDLE "#define SUPPORT_IP6LINKS\n";
982 if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) {
983 print FILEHANDLE "#define USE_KQUEUE\n";
984 $se = "socketengine_kqueue";
987 if (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
988 print FILEHANDLE "#define USE_EPOLL\n";
989 $se = "socketengine_epoll";
992 # user didn't choose either epoll or select for their OS.
993 # default them to USE_SELECT (ewwy puke puke)
995 print FILEHANDLE "#define USE_SELECT\n";
996 $se = "socketengine_select";
998 print FILEHANDLE "\n#endif\n";
1004 open(FILEHANDLE, ">include/inspircd_se_config.h");
1005 print FILEHANDLE <<EOF;
1006 /* Auto generated by configure, do not modify or commit to svn! */
1007 #ifndef __CONFIGURATION_SOCKETENGINE__
1008 #define __CONFIGURATION_SOCKETENGINE__
1018 # Create a Modules List..
1020 foreach $i (@modlist)
1022 if ($config{STATIC_LINK} eq "yes") {
1023 $modules .= "m_".$i.".o ";
1026 $modules .= "m_".$i.".so ";
1029 chomp($modules); # Remove Redundant whitespace..
1031 opendir(DIRHANDLE, "src/modules");
1032 foreach $name (sort readdir(DIRHANDLE)) {
1033 if ($name =~ /^m_(.+?)$/) {
1034 if (opendir(MDIRHANDLE, "src/modules/$name") != 0) {
1035 closedir(MDIRHANDLE);
1036 $modules .= "$name.so ";
1040 closedir(DIRHANDLE);
1043 # Write all .in files.
1046 my $exe = "inspircd";
1048 if ($config{OSNAME} =~ /CYGWIN/i) {
1049 $exe = "inspircd.exe";
1052 opendir(DIRHANDLE, $this);
1054 # Do this once here, and cache it in the .*.inc files,
1055 # rather than attempting to read src/version.sh from
1056 # compiled code -- we might not have the source to hand.
1057 # Fix for bug#177 by Brain.
1059 chomp(my $version = `sh ./src/version.sh`);
1060 chomp(my $revision = getrevision());
1061 $version = "$version(r$revision)";
1064 if ($config{IS_DARWIN} eq "YES")
1068 # We can actually parse any file starting with . and ending with .inc,
1069 # but right now we only parse .inspircd.inc to form './inspircd'
1071 foreach $name (sort readdir(DIRHANDLE)) {
1072 if ($name =~ /^\.(.+)\.inc$/) {
1074 # All .name.inc files need parsing!
1076 open(FILEHANDLE, ".$file.inc");
1077 while (<FILEHANDLE>) {
1082 $tmp =~ s/\@CC\@/$config{CC}/;
1083 $tmp =~ s/\@MAKEPROG\@/$config{MAKEPROG}/;
1084 $tmp =~ s/\@FLAGS\@/$config{FLAGS}/;
1085 $tmp =~ s/\@DEVELOPER\@/$config{DEVELOPER}/;
1086 $tmp =~ s/\@LDLIBS\@/$config{LDLIBS}/;
1087 $tmp =~ s/\@BASE_DIR\@/$config{BASE_DIR}/;
1088 $tmp =~ s/\@CONFIG_DIR\@/$config{CONFIG_DIR}/;
1089 $tmp =~ s/\@MODULE_DIR\@/$config{MODULE_DIR}/;
1090 $tmp =~ s/\@BINARY_DIR\@/$config{BINARY_DIR}/;
1091 $tmp =~ s/\@LIBRARY_DIR\@/$config{LIBRARY_DIR}/;
1092 $tmp =~ s/\@LIBRARY_EXT\@/$LIBEXT/;
1093 $tmp =~ s/\@MODULES\@/$modules/;
1094 $tmp =~ s/\@EXECUTABLE\@/$exe/;
1095 $tmp =~ s/\@MAKEORDER\@/$config{MAKEORDER}/;
1096 $tmp =~ s/\@STATICLIBS\@/$config{STATICLIBS}/;
1097 $tmp =~ s/\@VERSION\@/$version/;
1099 print "Writing \033[1;32m$file\033[0m\n";
1100 open(FILEHANDLE, ">$file");
1101 print FILEHANDLE $tmp;
1104 closedir(DIRHANDLE);
1106 # Make inspircd executable!
1107 chmod 0744, 'inspircd';
1109 if ($config{STATIC_LINK} eq "yes") {
1110 print "Writing static-build \033[1;32msrc/Makefile\033[0m\n";
1111 write_static_makefile();
1112 write_static_modules_makefile();
1113 } elsif ($config{OSNAME} =~ /CYGWIN/i) {
1114 print "Writing cygwin-build \033[1;32msrc/Makefile\033[0m\n";
1115 write_static_makefile();
1116 write_dynamic_modules_makefile();
1118 print "Writing dynamic-build \033[1;32msrc/Makefile\033[0m\n";
1119 write_dynamic_makefile();
1120 write_dynamic_modules_makefile();
1124 sub write_static_modules_makefile {
1125 # Modules Makefile..
1126 print "Writing \033[1;32msrc/modules/Makefile\033[0m\n";
1127 open(FILEHANDLE, ">src/modules/Makefile");
1130 # Module Makefile Header
1132 print FILEHANDLE <<EOF;
1133 # (C) ChatSpike development team
1134 # Makefile by <Craig\@ChatSpike.net>
1135 # Many Thanks to Andrew Church <achurch\@achurch.org>
1136 # for assisting with making this work right.
1138 # Automatically Generated by ./configure to add a modules
1139 # please run ./configure --update
1145 # End Module Makefile Header
1148 # Create a Modules List..
1153 open(MODLIST,">include/modlist.h");
1156 # Include File Header
1158 print MODLIST <<HEADER;
1159 // Generated automatically by configure. DO NOT EDIT!
1161 #ifndef __SYMBOLS__H_CONFIGURED__
1162 #define __SYMBOLS__H_CONFIGURED__
1166 # End Include File Header
1169 # Place Module List into Include
1170 foreach $i (@modlist) {
1171 if ($i !~ /_static$/) {
1172 print MODLIST "extern \"C\" void * $i\_init (void);\n";
1175 print MODLIST "\nstruct {const char *name; initfunc *value; } modsyms[] = {\n";
1180 foreach $i (@modlist)
1182 if ($i !~ /_static$/) {
1183 $cmflags = getcompilerflags("src/modules/m_".$i.".cpp");
1184 $liflags = getlinkerflags("src/modules/m_".$i.".cpp");
1185 $deps = getdependencies("src/modules/m_".$i.".cpp");
1187 #print "file: $i: cmflags=$cmflags; liflags=$liflags; deps=$deps\n";
1190 # Write Entry to the Makefile
1192 print FILEHANDLE <<EOCHEESE;
1193 m_$i.o: .m_$i\_static.cpp ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h $deps
1194 \$(CC) -pipe -I../../include \$(FLAGS) $flags -export-dynamic -c .m_$i\_static.cpp
1195 mv .m_$i\_static.o ../m_$i.o
1199 # End Write Entry to the MakeFile
1201 print "Configuring module [\033[1;32mm_$i.so\033[0m] for static linking... ";
1202 open(MODULE,"<src/modules/m_".$i.".cpp") or die("Could not open m_".$i.".cpp");
1203 open(MUNGED,">src/modules/.m_".$i."_static.cpp") or die("Could not create .m_".$i."_static.cpp");
1204 while (chomp($a = <MODULE>)) {
1205 $a =~ s/init_module/$i\_init/g;
1206 print MUNGED "$a\n";
1210 print MODLIST <<EOENT;
1211 {"m_$i.so",\&$i\_init},
1217 print MODLIST "{0}};\n\n#endif\n";
1221 sub write_dynamic_modules_makefile {
1222 # Modules Makefile..
1223 print "Writing \033[1;32msrc/modules/Makefile\033[0m\n";
1224 open(FILEHANDLE, ">src/modules/Makefile");
1227 if ($config{OSNAME} =~ /CYGWIN/i) {
1228 $extra = "../inspircd.dll.a";
1232 # Module Makefile Header
1234 print FILEHANDLE <<EOF;
1235 # (C) ChatSpike development team
1236 # Makefile by <Craig\@ChatSpike.net>
1237 # Many Thanks to Andrew Church <achurch\@achurch.org>
1238 # for assisting with making this work right.
1240 # Automatically Generated by ./configure to add a modules
1241 # please run ./configure -update or ./configure -modupdate
1247 # End Module Makefile Header
1250 # Create a Modules List..
1256 foreach $i (@modlist) {
1258 # Write Entry to the MakeFile
1260 $cmflags = getcompilerflags("src/modules/m_".$i.".cpp");
1261 $liflags = getlinkerflags("src/modules/m_".$i.".cpp");
1262 $deps = getdependencies("src/modules/m_".$i.".cpp");
1264 #print "file: $i: cmflags=$cmflags; liflags=$liflags; deps=$deps\n";
1266 print FILEHANDLE <<EOCHEESE;
1267 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
1268 \$(CC) -pipe -I../../include \$(FLAGS) $cmflags -export-dynamic -c m_$i.cpp
1271 if ($config{OSNAME} =~ /darwin/) {
1272 print FILEHANDLE <<EOCHEESE;
1273 \$(CC) -pipe -twolevel_namespace -undefined dynamic_lookup \$(FLAGS) -bundle $liflags -o m_$i.so m_$i.o $extra
1277 print FILEHANDLE <<EOCHEESE;
1278 \$(CC) -pipe \$(FLAGS) -shared $liflags -o m_$i.so m_$i.o $extra
1282 $crud = $crud . " install -m \$(INSTMODE) m_$i.so \$(MODPATH)\n";
1284 # End Write Entry to the MakeFile
1288 opendir(DIRHANDLE, "src/modules");
1289 foreach $name (sort readdir(DIRHANDLE)) {
1290 if ($name =~ /^m_(.+?)$/) {
1293 # A module made of multiple files, in a dir, e.g. src/modules/m_spanningtree/
1294 if (opendir(MDIRHANDLE, "src/modules/$name") != 0) {
1295 print "Composing Makefile rules for directory \033[1;32m$name\033[0m... ";
1297 print FILEHANDLE "$name.so: ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h ../../include/inspircd_config.h ../../include/inspircd.h ../../include/configreader.h";
1298 foreach $fname (sort readdir(MDIRHANDLE)) {
1299 if ($fname =~ /\.cpp$/) {
1300 $cmflags = getcompilerflags("src/modules/$name/$fname");
1301 $liflags = getlinkerflags("src/modules/$name/$fname");
1302 $deps = getdependencies("src/modules/$name/$fname");
1304 $oname =~ s/\.cpp$/.o/g;
1305 print FILEHANDLE " $name/$oname";
1306 $crapola = $crapola . "$name/$oname: $name/$fname ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h ../../include/inspircd_config.h ../../include/inspircd.h ../../include/configreader.h $deps\n";
1307 $crapola = $crapola . " \$(CC) -pipe -I../../include -I. \$(FLAGS) $cmflags -export-dynamic -o $name/$oname -c $name/$fname\n\n";
1308 $crap3 = $crap3 . " $name/$oname";
1312 print "(\033[1;32m$i files found\033[0m)\n";
1313 if ($config{IS_DARWIN} eq "YES") {
1314 print FILEHANDLE "\n \$(CC) -pipe -twolevel_namespace -undefined dynamic_lookup \$(FLAGS) -bundle -o $name.so $crap3\n";
1316 print FILEHANDLE "\n \$(CC) -pipe \$(FLAGS) -shared $liflags -o $name.so $crap3\n";
1318 print FILEHANDLE "\n$crapola\n";
1319 closedir(MDIRHANDLE);
1320 $crud = $crud . " install -m \$(INSTMODE) $name.so \$(MODPATH)\n";
1324 closedir(DIRHANDLE);
1326 print FILEHANDLE "modinst:\n \@echo \"Installing modules...\"\n" . $crud;
1330 sub write_static_makefile {
1331 open(FH,">src/Makefile") or die("Could not write src/Makefile!");
1334 opendir(DIRHANDLE, "src");
1335 foreach $name (sort readdir(DIRHANDLE)) {
1336 if ($name =~ /^cmd_(.+)\.cpp$/) {
1337 $cmdlist[$i++] = $1;
1340 closedir(DIRHANDLE);
1343 foreach my $cmd (@cmdlist) {
1344 $cmdobjs = $cmdobjs . "cmd_$cmd.o ";
1345 $srcobjs = $srcobjs . "cmd_$cmd.cpp ";
1350 # (C) ChatSpike development team
1351 # Makefile by <Craig\@ChatSpike.net>
1352 # Makefile version 2 (statically linked core) by <brain\@inspircd.org>
1355 CC = im a cheezeball
1357 CXXFLAGS = -I../include \${FLAGS}
1358 CPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* //' | grep -v svn)
1359 RELCPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* /modes\\//' | grep -v svn)
1363 $se = "socketengine_select";
1364 if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) {
1365 $se = "socketengine_kqueue";
1367 elsif (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
1368 $se = "socketengine_epoll";
1372 # This next section is for cygwin dynamic module builds.
1373 # Basically, what we do, is build the inspircd core as a library
1374 # then the main executable uses that. the library is capable of
1375 # loading / unloading the modules dynamically :)
1376 # Massive thanks to the guys on #cygwin @ irc.freenode.net for helping
1380 if ($config{OSNAME} =~ /CYGWIN/i) {
1382 all: timer.o command_parse.o cull_list.o userprocess.o socketengine.o socket.o hashcomp.o channels.o mode.o xline.o inspstring.o dns.o base.o configreader.o inspsocket.o $cmdobjs commands.o dynamic.o users.o modules.o wildcard.o helperfuncs.o snomasks.o inspircd.exe
1384 inspircd.exe: inspircd.dll.a
1387 inspircd.dll inspircd.dll.a: inspircd.o channels.o mode.o xline.o inspstring.o dns.o base.o configreader.o inspsocket.o $cmdobjs commands.o dynamic.o users.o modules.o wildcard.o helperfuncs.o hashcomp.o socket.o socketengine.o userprocess.o cull_list.o command_parse.o timer.o snomasks.o
1388 \$(CC) -shared -Wl,--out-implib=inspircd.dll.a -o inspircd.dll \$^
1392 all: timer.o command_parse.o cull_list.o userprocess.o socketengine.o socket.o hashcomp.o channels.o mode.o xline.o inspstring.o dns.o base.o configreader.o inspsocket.o $cmdobjs commands.o dynamic.o users.o modules.o wildcard.o helperfuncs.o snomasks.o \$(MODULES) inspircd.exe
1394 inspircd.exe: inspircd.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/channels.h ../include/globals.h ../include/inspircd_config.h ../include/base.h
1395 \$(CC) -I../include \$(FLAGS) inspircd.cpp -o inspircd.exe \$(LDLIBS) channels.o mode.o xline.o inspstring.o dns.o base.o inspsocket.o configreader.o $cmdobjs commands.o dynamic.o users.o modules.o wildcard.o helperfuncs.o hashcomp.o socket.o socketengine.o userprocess.o cull_list.o command_parse.o timer.o snomasks.o modes/modeclasses.a \$(MODULES)
1401 cull_list.o: cull_list.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/users.h ../include/channels.h
1402 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cull_list.cpp
1404 snomasks.o: snomasks.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/channels.h
1405 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp
1407 command_parse.o: command_parse.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1408 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c command_parse.cpp
1410 userprocess.o: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h
1411 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c userprocess.cpp
1413 socketengine.o: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
1414 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp $se.cpp
1416 hashcomp.o: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1417 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp
1419 helperfuncs.o: helperfuncs.cpp ../include/base.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1420 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
1422 channels.o: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1423 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp
1425 mode.o: 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) modes/modeclasses.a
1426 \${MAKE} -C "modes" DIRNAME="src/modes" CC="\$(CC)" \$(MAKEARGS)
1427 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp
1429 xline.o: xline.cpp ../include/base.h ../include/xline.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1430 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c xline.cpp
1432 inspstring.o: inspstring.cpp ../include/base.h ../include/inspstring.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1433 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspstring.cpp
1435 dns.o: 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
1436 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dns.cpp
1438 base.o: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h
1439 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp
1441 configreader.o: configreader.cpp ../include/base.h ../include/configreader.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1442 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
1444 commands.o: commands.cpp ../include/base.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h $srcobjs
1445 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp $cmdobjs
1447 dynamic.o: dynamic.cpp ../include/base.h ../include/dynamic.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1448 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dynamic.cpp
1450 users.o: 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
1451 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c users.cpp
1453 modules.o: 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
1454 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c modules.cpp
1456 wildcard.o: wildcard.cpp ../include/base.h ../include/wildcard.h ../include/inspircd.h ../include/channels.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1457 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c wildcard.cpp
1459 socket.o: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1460 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp
1462 inspsocket.o: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1463 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspsocket.cpp
1465 timer.o: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1466 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c timer.cpp
1469 foreach my $cmd (@cmdlist) {
1471 cmd_$cmd.o: 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
1472 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cmd_$cmd.cpp
1478 sub write_dynamic_makefile {
1482 opendir(DIRHANDLE, "src");
1483 foreach $name (sort readdir(DIRHANDLE)) {
1484 if ($name =~ /^cmd_(.+)\.cpp$/) {
1485 $cmdlist[$i++] = $1;
1488 closedir(DIRHANDLE);
1492 foreach my $cmd (@cmdlist) {
1493 $cmdobjs = $cmdobjs . "cmd_$cmd.so ";
1494 $srcobjs = $srcobjs . "cmd_$cmd.cpp ";
1497 $se = "socketengine_select";
1498 if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) {
1499 $se = "socketengine_kqueue";
1501 elsif (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
1502 $se = "socketengine_epoll";
1505 open(FH,">src/Makefile") or die("Could not write src/Makefile");
1509 # (C) ChatSpike development team
1510 # Makefile by <Craig\@ChatSpike.net>
1511 # Makefile version 2 (dynamically linked core) by <brain\@inspircd.org>
1514 CC = im a cheezeball
1516 CXXFLAGS = -I../include \${FLAGS}
1517 CPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* //' | grep -v svn)
1518 RELCPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* /modes\\//' | grep -v svn)
1522 if ($config{IS_DARWIN} eq "YES") {
1524 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 inspircd
1526 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 $cmdobjs 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
1527 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspircd.cpp
1528 \$(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
1530 libIRCDsocketengine.dylib: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
1531 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp
1532 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c $se.cpp
1533 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDsocketengine.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDsocketengine.dylib socketengine.o $se.o
1535 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
1536 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp
1537 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDsnomasks.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDsnomasks.dylib snomasks.o
1539 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
1540 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c command_parse.cpp
1541 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDcommand_parse.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDcommand_parse.dylib command_parse.o
1543 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
1544 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cull_list.cpp
1545 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDcull_list.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDcull_list.dylib cull_list.o
1547 libIRCDuserprocess.dylib: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h
1548 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c userprocess.cpp
1549 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDuserprocess.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDuserprocess.dylib userprocess.o
1551 libIRCDhash.dylib: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1552 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp
1553 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDhash.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDhash.dylib hashcomp.o
1555 libIRCDhelper.dylib: helperfuncs.cpp ../include/base.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1556 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
1557 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDhelper.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDhelper.dylib helperfuncs.o
1559 libIRCDchannels.dylib: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1560 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp
1561 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDchannels.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDchannels.dylib channels.o
1563 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)
1564 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp
1565 \${MAKE} -C "modes" DIRNAME="src/modes" CC="\$(CC)" \$(MAKEARGS) CPPFILES="\$(CPPFILES)"
1566 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDmode.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDmode.dylib mode.o modes/modeclasses.a
1568 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
1569 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c xline.cpp
1570 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDxline.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDxline.dylib xline.o
1572 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
1573 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspstring.cpp
1574 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDstring.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDstring.dylib inspstring.o
1576 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
1577 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dns.cpp
1578 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDasyncdns.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDasyncdns.dylib dns.o
1580 libIRCDbase.dylib: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h
1581 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp
1582 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDbase.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDbase.dylib base.o
1584 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
1585 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
1586 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDconfigreader.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDconfigreader.dylib configreader.o
1588 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
1589 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp
1590 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDcommands.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDcommands.dylib commands.o
1592 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
1593 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dynamic.cpp
1594 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDdynamic.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDdynamic.dylib dynamic.o
1596 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
1597 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c users.cpp
1598 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDusers.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDusers.dylib users.o
1600 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
1601 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c modules.cpp
1602 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDmodules.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDmodules.dylib modules.o
1604 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
1605 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c wildcard.cpp
1606 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDwildcard.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDwildcard.dylib wildcard.o
1608 libIRCDsocket.dylib: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1609 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp
1610 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDsocket.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDsocket.dylib socket.o
1612 libIRCDinspsocket.dylib: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1613 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspsocket.cpp
1614 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDinspsocket.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDinspsocket.dylib inspsocket.o
1616 libIRCDtimer.dylib: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1617 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c timer.cpp
1618 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDtimer.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDtimer.dylib timer.o
1625 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
1627 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
1628 \$(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
1630 libIRCDsocketengine.so: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
1631 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp $se.cpp
1632 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsocketengine.so socketengine.o $se.o
1634 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
1635 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp
1636 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsnomasks.so snomasks.o
1638 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
1639 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c command_parse.cpp
1640 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommand_parse.so command_parse.o
1642 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
1643 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cull_list.cpp
1644 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcull_list.so cull_list.o
1646 libIRCDuserprocess.so: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h
1647 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c userprocess.cpp
1648 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDuserprocess.so userprocess.o
1650 libIRCDhash.so: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1651 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp
1652 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDhash.so hashcomp.o
1654 libIRCDhelper.so: helperfuncs.cpp ../include/base.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1655 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
1656 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDhelper.so helperfuncs.o
1658 libIRCDchannels.so: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1659 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp
1660 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDchannels.so channels.o
1662 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)
1663 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp
1664 \${MAKE} -C "modes" DIRNAME="src/modes" CC="\$(CC)" \$(MAKEARGS) CPPFILES="\$(CPPFILES)"
1665 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmode.so mode.o modes/modeclasses.a
1667 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
1668 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c xline.cpp
1669 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDxline.so xline.o
1671 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
1672 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspstring.cpp
1673 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDstring.so inspstring.o
1675 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
1676 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dns.cpp
1677 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDasyncdns.so dns.o
1679 libIRCDbase.so: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h
1680 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp
1681 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDbase.so base.o
1683 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
1684 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
1685 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDconfigreader.so configreader.o
1687 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
1688 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp
1689 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommands.so commands.o
1691 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
1692 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dynamic.cpp
1693 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDdynamic.so dynamic.o
1695 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
1696 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c users.cpp
1697 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDusers.so users.o
1699 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
1700 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c modules.cpp
1701 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmodules.so modules.o
1703 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
1704 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c wildcard.cpp
1705 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDwildcard.so wildcard.o
1707 libIRCDsocket.so: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1708 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp
1709 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsocket.so socket.o
1711 libIRCDinspsocket.so: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1712 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspsocket.cpp
1713 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDinspsocket.so inspsocket.o
1715 libIRCDtimer.so: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1716 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c timer.cpp
1717 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDtimer.so timer.o
1721 foreach my $cmd (@cmdlist) {
1723 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
1724 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cmd_$cmd.cpp
1725 \$(CC) -pipe $SHARED -o cmd_$cmd.so cmd_$cmd.o