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} = `openssl version 2>/dev/null`); # Openssl version
131 $config{USE_GNUTLS} = "n";
132 if (defined $opt_use_gnutls)
134 $config{USE_GNUTLS} = "y"; # Use gnutls.
136 $config{USE_OPENSSL} = "n"; # Use openssl.
137 if (defined $opt_use_openssl)
139 $config{USE_OPENSSL} = "y";
142 # no, let's not change these.
143 $config{OPTIMITEMP} = "0"; # Default Optimisation Value
144 if (!defined $opt_disable_debug)
146 $config{OPTIMISATI} = "-g1"; # Optimisation Flag
150 $config{OPTIMISATI} = "-O2"; # DEBUGGING OFF!
153 $config{NICK_LENGT} = "31"; # Default Nick Length
154 if (defined $opt_nick_length)
156 $config{NICK_LENGT} = $opt_nick_length;
158 $config{CHAN_LENGT} = "64"; # Default Channel Name Length
159 if (defined $opt_chan_length)
161 $config{CHAN_LENGT} = $opt_chan_length;
163 $config{MAXI_MODES} = "20"; # Default Max. Number of Modes set at once.
164 if (defined $opt_modes)
166 $config{MAXI_MODES} = $opt_modes;
168 $config{HAS_STRLCPY} = "false"; # strlcpy Check.
169 $config{HAS_STDINT} = "false"; # stdint.h check
170 $config{USE_KQUEUE} = "y"; # kqueue enabled
171 if (defined $opt_kqueue)
173 $config{USE_KQUEUE} = "y";
175 if (defined $opt_nokqueue)
177 $config{USE_KQUEUE} = "n";
179 $config{USE_EPOLL} = "y"; # epoll enabled
180 if (defined $opt_epoll)
182 $config{USE_EPOLL} = "y";
184 if (defined $opt_noepoll)
186 $config{USE_EPOLL} = "n";
188 $config{IPV6} = "n"; # IPv6 support (experimental)
189 if (defined $opt_ipv6)
193 $config{SUPPORT_IP6LINKS} = "y"; # IPv4 supporting IPv6 links (experimental)
194 if (defined $opt_ipv6links)
196 $config{SUPPORT_IP6LINKS} = "y";
198 if (defined $opt_noipv6links)
200 $config{SUPPORT_IP6LINKS} = "n";
202 $config{STATIC_LINK} = "no"; # are doing static modules?
203 chomp($config{MAX_CLIENT_T} = `sh -c \"ulimit -n\"`); # FD Limit
204 chomp($config{MAX_DESCRIPTORS} = `sh -c \"ulimit -n\"`); # Hard FD Limit
205 chomp($config{GCCVER} = `g++ -dumpversion | cut -c 1`); # Major GCC Version
206 $config{_SOMAXCONN} = SOMAXCONN; # Max connections in accept queue
207 $config{OSNAME} = $^O; # Operating System Name
208 $config{IS_DARWIN} = "NO"; # Is OSX?
209 if ($config{OSNAME} =~ /darwin/i)
211 $config{IS_DARWIN} = "YES";
213 $config{CC} = "g++"; # C++ compiler
216 $config{CC} = $opt_cc;
218 $exec = $config{CC} . " -dumpversion | cut -c 1";
219 chomp($config{GCCVER} = `$exec`); # Major GCC Version
220 $config{MAKEORDER} = "ircd mods"; # build order
221 $config{STATICLIBS} = ""; # library archive path
222 $config{MAX_IDENT} = "12"; # max ident size
223 $config{MAX_QUIT} = "255"; # max quit message size
224 $config{MAX_TOPIC} = "307"; # max topic size
225 $config{MAX_KICK} = "255"; # max kick message size
226 $config{MAX_GECOS} = "128"; # max GECOS size
227 $config{MAX_AWAY} = "200"; # max AWAY size
228 if (defined $opt_ident)
230 $config{MAX_IDENT} = $opt_ident;
232 if (defined $opt_quit)
234 $config{MAX_QUIT} = $opt_quit;
236 if (defined $opt_topic)
238 $config{MAX_TOPIC} = $opt_topic;
240 if (defined $opt_kick)
242 $config{MAX_KICK} = $opt_kick;
244 if (defined $opt_gecos)
246 $config{MAX_GECOS} = $opt_gecos;
248 if (defined $opt_away)
250 $config{MAX_AWAY} = $opt_away;
253 $config{HAS_OPENSSL} =~ /OpenSSL ([-[:digit:].]+)([a-z])?(\-[a-z][0-9])? (\w{3}|[0-9]+) (\w{3}|[0-9]+) [0-9]{4}/;
254 $config{HAS_OPENSSL} = $1;
256 if ($config{GCCVER} eq "") {
257 print $config{CC} . " was not found! You require g++ (the GNU C++ compiler, part of GCC) to build InspIRCd!\n";
261 # Minihack! Convert Cygwin to 'Cyg-Static' so i can
262 # Keep my dynamic module experiments here for later
265 if ($config{OSNAME} =~ /CYGWIN/i)
267 $config{OSNAME} = "CYG-STATIC";
270 if (!$config{MAX_CLIENT_T}) {
271 $config{MAX_CLIENT_T} = 1024; # Set a reasonable 'Default'
272 $fd_scan_fail = "true"; # Used Later
275 # Get and Set some important vars..
280 system("rm -rf .config.cache");
286 chomp($topdir = getcwd());
287 $this = resolve_directory($topdir); # PWD, Regardless.
289 # Does the cache file exist?
291 # No, No it doesn't.. *BASH*
292 print "You have not run ./configure before. Please do this before trying to run the update script.\n";
295 # We've Loaded the cache file and all our variables..
296 print "Updating Files..\n";
298 if ($opt_disable_debug == 1)
300 print "Disabling debug information (-g).\n";
301 $config{OPTIMISATI} = "";
304 $has_epoll = $config{HAS_EPOLL};
305 $has_kqueue = $config{HAS_KQUEUE};
314 print "Configure update failed: $@\n";
322 chomp($topdir = getcwd());
323 $this = resolve_directory($topdir); # PWD, Regardless.
325 # Does the cache file exist?
327 # No, No it doesn't.. *BASH*
328 print "You have not run ./configure before. Please do this before trying to run the update script.\n";
331 # We've Loaded the cache file and all our variables..
332 print "Updating Files..\n";
334 $has_epoll = $config{HAS_EPOLL};
335 $has_kqueue = $config{HAS_KQUEUE};
344 print "Module update failed: $@\n";
354 open(FH,"<.svn/entries") or $fail = 1;
356 print "This is not an SVN copy of InspIRCd.\n";
363 system("svn update");
364 system("perl configure -update");
365 if (defined $opt_rebuild) {
366 system("make install");
371 print "Running non-interactive configure...\n" unless $interactive;
372 print "Checking for cache from previous configure... ";
373 print ((getcache() eq "true") ? "found\n" : "not found\n");
374 print "Checking operating system version... ";
375 print getosflags() . "\n";
377 if (defined $opt_maxclients)
379 $config{MAX_CLIENT} = $opt_maxclients;
382 if (!$config{MAX_CLIENT}) {
383 # If the cache hasn't set the max clients, copy the variable of MAX_CLIENT_T, this
384 # allows us to keep _T for testing purposes. (ie. "Are you sure you want to go
385 # higher than the found value" :))
386 $config{MAX_CLIENT} = $config{MAX_CLIENT_T};
389 printf "Checking if stdint.h exists... ";
390 $config{HAS_STDINT} = "true";
392 open(STDINT, "</usr/include/stdint.h") or $config{HAS_STDINT} = "false";
393 if ($config{HAS_STDINT} eq "true") {
396 print "yes\n" if $config{HAS_STDINT} eq "true";
397 print "no\n" if $config{HAS_STDINT} eq "false";
400 printf "Checking if strlcpy exists... ";
401 # Perform the strlcpy() test..
402 $config{HAS_STRLCPY} = "false";
404 open(STRLCPY, "</usr/include/string.h") or $fail = 1;
406 while (chomp($line = <STRLCPY>)) {
407 # try and find the delcaration of:
408 # size_t strlcpy(...)
409 if ($line =~ /size_t(\0x9|\s)+strlcpy/) {
410 $config{HAS_STRLCPY} = "true";
415 print "yes\n" if $config{HAS_STRLCPY} eq "true";
416 print "no\n" if $config{HAS_STRLCPY} eq "false";
419 printf "Checking if kqueue exists... ";
422 open(KQUEUE, "</usr/include/sys/event.h") or $fail = 1;
424 while (chomp($line = <KQUEUE>)) {
425 # try and find the delcaration of:
427 if ($line =~ /int(\0x9|\s)+kqueue/) {
433 print "yes\n" if $has_kqueue == 1;
434 print "no\n" if $has_kqueue == 0;
436 printf "Checking if epoll exists... ";
439 open(EPOLL, "</usr/include/sys/epoll.h") or $fail = 1;
445 my $kernel = `uname -r`;
447 if (($kernel =~ /^2\.0\./) || ($kernel =~ /^2\.2\./) || ($kernel =~ /^2\.4\./)) {
451 print "yes\n" if $has_epoll == 1;
452 print "no\n" if $has_epoll == 0;
454 if (($config{OSNAME} =~ /CYGWIN/) || ($config{OSNAME} eq "CYG-STATIC")) {
455 $config{HAS_STRLCPY} = "true";
458 $config{HAS_EPOLL} = $has_epoll;
459 $config{HAS_KQUEUE} = $has_kqueue;
461 printf "Checking for libgnutls... ";
462 if (($config{HAS_GNUTLS}) && (($config{HAS_GNUTLS} >= 1.2) || ($config{HAS_GNUTLS} eq "y"))) {
464 $config{HAS_GNUTLS} = "y";
467 $config{HAS_GNUTLS} = "n";
470 printf "Checking for openssl... ";
471 if (($config{HAS_OPENSSL}) && (($config{HAS_OPENSSL} >= 0.8) || ($config{HAS_OPENSSL} eq "y"))) {
473 $config{HAS_OPENSSL} = "y";
476 $config{HAS_OPENSSL} = "n";
479 ################################################################################
480 # BEGIN INTERACTIVE PART #
481 ################################################################################
489 my $rev = getrevision();
490 # Display Introduction Message..
492 Welcome to the \033[1mInspIRCd\033[0m Configuration program! (\033[1minteractive mode\033[0m)
493 \033[1mPackage maintainers: Type ./configure --help for non-interactive help\033[0m
495 *** If you are unsure of any of these values, leave it blank for ***
496 *** standard settings that will work, and your server will run ***
497 *** using them. Please consult your IRC network admin if in doubt. ***
499 Press \033[1m<RETURN>\033[0m to accept the default for any option, or enter
500 a new value. Please note: You will \033[1mHAVE\033[0m to read the docs
501 dir, otherwise you won't have a config file!
503 Your operating system is: \033[1;32m$config{OSNAME}\033[0m ($wholeos)
504 Maximum file descriptors: \033[1;32m$config{MAX_CLIENT_T}\033[0m
505 Your InspIRCd revision ID is \033[1;32mr$rev\033[0m";
507 print " (Non-SVN build)";
511 $config{CHANGE_COMPILER} = "n";
512 print "I have detected the following compiler: \033[1;32m$config{CC}\033[0m (version \033[1;32m$config{GCCVER}.x\033[0m)\n";
514 while (($config{GCCVER} < 3) || ($config{GCCVER} eq "")) {
515 print "\033[1;32mIMPORTANT!\033[0m A GCC 2.x compiler has been detected, and
516 should NOT be used. You should probably specify a newer compiler.\n\n";
517 yesno(CHANGE_COMPILER,"Do you want to change the compiler?");
518 if ($config{CHANGE_COMPILER} =~ /y/i) {
519 print "What command do you want to use to invoke your compiler?\n";
520 print "[\033[1;32m$config{CC}\033[0m] -> ";
521 chomp($config{CC} = <STDIN>);
522 if ($config{CC} eq "") {
525 chomp($foo = `$config{CC} -dumpversion | cut -c 1`);
527 chomp($config{GCCVER} = `$config{CC} -dumpversion | cut -c 1`); # we must redo these if we change compilers
528 print "Queried compiler: \033[1;32m$config{CC}\033[0m (version \033[1;32m$config{GCCVER}.x\033[0m)\n";
529 if ($config{GCCVER} < 3) {
530 print "\033[1;32mGCC 2.x WILL NOT WORK!\033[0m. Let's try that again, shall we?\n";
534 print "\033[1;32mWARNING!\033[0m Could not execute the compiler you specified. You may want to try again.\n";
541 # Directory Settings..
542 my $tmpbase = $config{BASE_DIR};
543 dir_check("do you wish to install the InspIRCd base", "BASE_DIR");
544 if ($tmpbase ne $config{BASE_DIR}) {
545 $config{CONFIG_DIR} = resolve_directory($config{BASE_DIR}."/conf"); # Configuration Dir
546 $config{MODULE_DIR} = resolve_directory($config{BASE_DIR}."/modules"); # Modules Directory
547 $config{BINARY_DIR} = resolve_directory($config{BASE_DIR}."/bin"); # Binary Directory
548 $config{LIBRARY_DIR} = resolve_directory($config{BASE_DIR}."/lib"); # Library Directory
551 dir_check("are the configuration files", "CONFIG_DIR");
552 dir_check("are the modules to be compiled to", "MODULE_DIR");
553 dir_check("is the IRCd binary to be placed", "BINARY_DIR");
554 dir_check("are the IRCd libraries to be placed", "LIBRARY_DIR");
557 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?");
561 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?");
564 $chose_hiperf = (($config{USE_EPOLL} eq "y") || ($config{USE_KQUEUE} eq "y"));
565 if (!$chose_hiperf) {
566 print "No high-performance socket engines are available, or you chose\n";
567 print "not to enable one. Defaulting to select() engine.\n\n";
570 yesno(IPV6,"Would you like to build InspIRCd with IPv6 support?");
573 if ($config{IPV6} eq "y") {
574 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";
575 $config{SUPPORT_IP6LINKS} = "y";
577 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)");
581 if (($config{HAS_GNUTLS} eq "y") && ($config{HAS_OPENSSL} eq "y")) {
582 print "I have detected both GnuTLS and OpenSSL on your system.\n";
583 print "I will default to GnuTLS. If you wish to use OpenSSL\n";
584 print "instead, you should enable the OpenSSL module yourself\n";
585 print "by copying it from src/modules/extra to src/modules.\n\n";
588 if ($config{HAS_GNUTLS} eq "y") {
589 yesno(USE_GNUTLS, "Would you like to enable SSL Support?");
590 if ($config{USE_GNUTLS} eq "y") {
591 print "\nUsing GnuTLS SSL module.\n";
593 } elsif ($config{HAS_OPENSSL} eq "y") {
594 yesno(USE_OPENSSL, "Would you like to enable SSL Support?");
595 if ($config{USE_OPENSSL} eq "y") {
596 print "\nUsing OpenSSL SSL module.\nYou will get better performance if you move to GnuTLS in the future.\n";
600 print "\nThe following questions will ask you for various figures relating\n";
601 print "To your IRCd install. Please note that these should usually be left\n";
602 print "as defaults unless you have a real reason to change them. If they\n";
603 print "changed, then the values must be identical on all servers on your\n";
604 print "network, or malfunctions and/or crashes may occur, with the exception\n";
605 print "of the 'maximum number of clients' setting which may be different on\n";
606 print "different servers on the network.\n\n";
608 # File Descriptor Settings..
609 promptnumeric("number of clients at any one time", "MAX_CLIENT_T");
610 $config{MAX_CLIENT} = $config{MAX_CLIENT_T};
611 $config{MAX_DESCRIPTORS} = $config{MAX_CLIENT_T};
613 promptnumeric("length of nicknames", "NICK_LENGT");
614 promptnumeric("length of channel names", "CHAN_LENGT");
615 promptnumeric("number of mode changes in one line", "MAXI_MODES");
616 promptnumeric("length of an ident (username)", "MAX_IDENT");
617 promptnumeric("length of a quit message", "MAX_QUIT");
618 promptnumeric("length of a channel topic", "MAX_TOPIC");
619 promptnumeric("length of a kick message", "MAX_KICK");
620 promptnumeric("length of a GECOS (real name)", "MAX_GECOS");
621 promptnumeric("length of an away message", "MAX_AWAY");
626 if (($config{USE_GNUTLS} eq "y") && ($config{HAS_GNUTLS} ne "y"))
628 print "Sorry, but i couldn't detect gnutls. Make sure gnutls-config is in your path.\n";
631 if (($config{USE_OPENSSL} eq "y") && ($config{HAS_OPENSSL} ne "y"))
633 print "Sorry, but i couldn't detect openssl. Make sure openssl is in your path.\n";
637 if ($config{USE_GNUTLS} eq "y") {
639 open(TMP, "<src/modules/m_ssl_gnutls.cpp") or $failed = 1;
642 print "Symlinking src/modules/m_ssl_gnutls.cpp from extra/\n";
643 chdir("src/modules");
644 system("ln -s extra/m_ssl_gnutls.cpp");
651 open(TMP, "<$config{CONFIG_DIR}/key.pem") or $failed = 1;
653 open(TMP, "<$config{CONFIG_DIR}/cert.pem") or $failed = 1;
656 print "SSL Certificates Not found, Generating.. \n\n
657 *************************************************************
658 * Generating the Private Key may take some time, go grab a *
659 * Coffee. Even better, to generate some more entropy if it *
660 * is taking a while, open another console and type du / a *
661 * few times and get that HD going :) Then answer the *
662 * Questions which follow. If you are unsure, just hit enter *
663 *************************************************************\n\n";
664 system("certtool --generate-privkey --outfile key.pem");
665 system("certtool --generate-self-signed --load-privkey key.pem --outfile cert.pem");
666 print "\nCertificate generation complete, copying to config directory... ";
667 system("mv key.pem $config{CONFIG_DIR}/key.pem");
668 system("mv cert.pem $config{CONFIG_DIR}/cert.pem");
671 print "SSL Certificates found, skipping.\n\n"
676 print "Skipping SSL certificate generation\nin non-interactive mode.\n\n";
678 } elsif ($config{USE_OPENSSL} eq "y") {
680 open(TMP, "<src/modules/m_ssl_openssl.cpp") or $failed = 1;
683 print "Symlinking src/modules/m_ssl_openssl.cpp from extra/\n";
684 chdir("src/modules");
685 system("ln -s extra/m_ssl_openssl.cpp");
692 open(TMP, "<$config{CONFIG_DIR}/key.pem") or $failed = 1;
694 open(TMP, "<$config{CONFIG_DIR}/cert.pem") or $failed = 1;
697 print "SSL Certificates Not found, Generating.. \n\n
698 *************************************************************
699 * Generating the certificates may take some time, go grab a *
700 * coffee, or something. *
701 *************************************************************\n\n";
702 system("openssl req -x509 -nodes -newkey rsa:1024 -keyout key.pem -out cert.pem");
703 system("openssl dhparam -out dhparams.pem 1024");
704 print "\nCertificate generation complete, copying to config directory... ";
705 system("mv key.pem $config{CONFIG_DIR}/key.pem");
706 system("mv cert.pem $config{CONFIG_DIR}/cert.pem");
707 system("mv dhparams.pem $config{CONFIG_DIR}/dhparams.pem");
710 print "SSL Certificates found, skipping.\n\n"
715 print "Skipping SSL certificate generation\nin non-interactive mode.\n\n";
718 if (($config{USE_GNUTLS} eq "n") && ($config{USE_OPENSSL} eq "n")) {
719 print "Skipping SSL Certificate generation, SSL support is not available.\n\n";
727 print "To build your server with these settings, please type '\033[1;32m$config{MAKEPROG}\033[0m' now.\n";
728 if (($config{USE_GNUTLS} eq "y") || ($config{USE_OPENSSL} eq "y")) {
729 print "Please remember that to enable \033[1;32mSSL support\033[0m you must\n";
730 print "load the required modules in your config. This configure process\n";
731 print "has just prepared these modules to be compiled for you, and has not\n";
732 print "configured them to be compiled into the core of the ircd.\n";
734 print "*** \033[1;32mRemember to edit your configuration files!!!\033[0m ***\n\n\n";
735 if (($config{OSNAME} eq "OpenBSD") && ($config{CC} ne "eg++")) {
736 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";
739 if ($config{GCCVER} < "3") {
741 \033[1;32mWARNING!\033[0m You are attempting to compile InspIRCd on GCC 2.x!
742 GCC 2.x series compilers only had partial (read as broken) C++ support, and
743 your compile will most likely fail horribly! If you have any problems, do NOT
744 report them to the bugtracker or forums without first upgrading your compiler
745 to a newer 3.x or 4.x (or whatever is available currently) version.
749 ################################################################################
751 ################################################################################
753 # Retrieves the .config.cache file, and loads values into the main config hash.
754 open(CACHE, ".config.cache") or return undef;
757 # Ignore Blank lines, and comments..
760 my ($key, $value) = split("=", $_, 2);
761 $value =~ /^\"(.*)\"$/;
762 # Do something with data here!
770 # Dump the contents of %config
771 print "Writing \033[1;32mcache file\033[0m for future ./configures ...\n";
772 open(FILEHANDLE, ">.config.cache");
773 foreach $key (keys %config) {
774 print FILEHANDLE "$key=\"$config{$key}\"\n";
780 my ($desc, $hash_key) = @_;
783 print "In what directory $desc?\n";
784 print "[\033[1;32m$config{$hash_key}\033[0m] -> ";
785 chomp($var = <STDIN>);
787 $var = $config{$hash_key};
789 if ($var =~ /^\~\/(.+)$/) {
790 # Convert it to a full path..
791 $var = resolve_directory($ENV{HOME} . "/" . $1);
793 elsif ((($config{OSNAME} =~ /MINGW32/i) and ($var !~ /^[A-Z]{1}:\\.*/)) and (substr($var,0,1) ne "/"))
795 # Assume relative Path was given.. fill in the rest.
796 $var = $this . "/$var";
799 $var = resolve_directory($var);
801 print "$var does not exist. Create it?\n[\033[1;32my\033[0m] ";
802 chomp($tmp = <STDIN>);
803 if (($tmp eq "") || ($tmp =~ /^y/i)) {
804 # Attempt to Create the Dir..
806 system("mkdir -p \"$var\" >> /dev/null 2>&1");
807 $chk = system("mkdir -p \"$var\" >> /dev/null 2>&1") / 256;
809 print "Unable to create directory. ($var)\n\n";
814 # They said they don't want to create, and we can't install there.
820 # Target exists, but is not a directory.
821 print "File $var exists, but is not a directory.\n\n";
825 # Either Dir Exists, or was created fine.
826 $config{$hash_key} = $var;
834 $config{LDLIBS} = "-lstdc++";
835 $config{FLAGS} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}";
836 $config{DEVELOPER} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual -g";
837 $SHARED = "-Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared";
838 $config{MAKEPROG} = "make";
840 if ($config{OSNAME} =~ /darwin/i) {
841 $config{FLAGS} = "-DDARWIN -frtti -fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}";
842 $SHARED = "-bundle -twolevel_namespace -undefined dynamic_lookup";
843 $config{LDLIBS} = "-ldl -lstdc++";
846 if ($config{OSNAME} =~ /OpenBSD/i) {
847 $config{MAKEPROG} = "gmake";
848 chomp($foo = `eg++ -dumpversion | cut -c 1`);
849 # theyre running the package version of gcc (eg++)... detect it and set up its version numbers.
850 # if theyre not running this, configure lets the build continue but they probably wont manage to
851 # compile as this standard version is 2.95.3!
853 $config{CC} = "eg++";
854 chomp($config{GCCVER} = `eg++ -dumpversion | cut -c 1`); # we must redo these if we change the compiler path
859 if ($config{OSNAME} =~ /Linux/i) {
860 $config{LDLIBS} = "-ldl -lstdc++";
861 $config{FLAGS} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}";
862 $config{FLAGS} .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS});
863 $config{MAKEPROG} = "make";
864 if ($config{OSNAME} =~ /CYGWIN/) {
865 $config{FLAGS} = "-fno-strict-aliasing -Wall -Woverloaded-virtual $config{OPTIMISATI}";
866 $config{LDLIBS} = "";
867 $config{MAKEPROG} = "/usr/bin/make";
868 $config{MAKEORDER} = "ircd mods";
870 } elsif ($config{OSNAME} eq "CYG-STATIC") {
871 $config{FLAGS} = "-fno-strict-aliasing -Wall -Woverloaded-virtual $config{OPTIMISATI}";
872 $config{LDLIBS} = "";
873 $config{MAKEPROG} = "/usr/bin/make";
874 $config{MAKEORDER} = "mods ircd";
875 $config{STATICLIBS} = "modules/mods.a";
876 $config{STATIC_LINK} = "yes";
877 return "Cygwin-Static";
879 $config{FLAGS} .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS});
882 if ($config{OSNAME} =~ /SunOS/i)
884 # solaris/sunos needs these
885 # socket = bsd sockets api
887 # rt = POSIX realtime extensions
888 # resolv = inet_aton only (why isnt this in nsl?!)
889 $config{MAKEPROG} = "gmake";
890 $config{LDLIBS} = $config{LDLIBS} . " -lsocket -lnsl -lrt -lresolv";
894 if($config{OSNAME} =~ /MINGW32/i)
896 # All code is position-independent on windows
897 $config{FLAGS} =~ s/-fPIC //;
901 return $config{OSNAME};
905 my($writeheader) = @_;
906 # First File.. inspircd_config.h
907 chomp(my $incos = `uname -n -s -r`);
908 chomp($version = `sh src/version.sh`);
909 chomp(my $revision2 = getrevision());
910 if ($writeheader == 1)
912 print "Writing \033[1;32minspircd_config.h\033[0m\n";
913 open(FILEHANDLE, ">include/inspircd_config.h");
914 my $NL = $config{NICK_LENGT}+1;
915 my $CL = $config{CHAN_LENGT}+1;
916 print FILEHANDLE <<EOF;
917 /* Auto generated by configure, do not modify! */
918 #ifndef __CONFIGURATION_AUTO__
919 #define __CONFIGURATION_AUTO__
921 #define CONFIG_FILE "$config{CONFIG_DIR}/inspircd.conf"
922 #define MOD_PATH "$config{MODULE_DIR}"
923 #define VERSION "$version"
924 #define REVISION "$revision2"
925 #define MAXCLIENTS $config{MAX_CLIENT}
926 #define MAXCLIENTS_S "$config{MAX_CLIENT}"
927 #define SOMAXCONN_S "$config{_SOMAXCONN}"
928 #define MAX_DESCRIPTORS $config{MAX_DESCRIPTORS}
931 #define MAXMODES $config{MAXI_MODES}
932 #define IDENTMAX $config{MAX_IDENT}
933 #define MAXQUIT $config{MAX_QUIT}
934 #define MAXTOPIC $config{MAX_TOPIC}
935 #define MAXKICK $config{MAX_KICK}
936 #define MAXGECOS $config{MAX_GECOS}
937 #define MAXAWAY $config{MAX_AWAY}
938 #define OPTIMISATION $config{OPTIMITEMP}
939 #define LIBRARYDIR "$config{LIBRARY_DIR}"
940 #define SYSTEM "$incos"
943 if ($config{OSNAME} =~ /SunOS/i) {
944 print FILEHANDLE "#define IS_SOLARIS\n";
946 if ($config{OSNAME} =~ /CYGWIN/i) {
947 print FILEHANDLE "#define IS_CYGWIN\n";
948 print FILEHANDLE "#ifndef FD_SETSIZE\n#define FD_SETSIZE 1024\n#endif\n";
950 if ($config{OSNAME} =~ /MINGW32/i) {
951 print FILEHANDLE "#define IS_MINGW\n";
953 if ($config{OSNAME} =~ /CYG-STATIC/i) {
954 print FILEHANDLE "#ifndef FD_SETSIZE\n#define FD_SETSIZE 1024\n#endif\n";
956 if ($config{STATIC_LINK} eq "yes") {
957 print FILEHANDLE "#define STATIC_LINK\n";
959 if ($config{GCCVER} >= 3) {
960 print FILEHANDLE "#define GCC3\n";
962 if ($config{HAS_STRLCPY} eq "true") {
963 print FILEHANDLE "#define HAS_STRLCPY\n";
965 if ($config{HAS_STDINT} eq "true") {
966 print FILEHANDLE "#define HAS_STDINT\n";
968 if ($config{IPV6} =~ /y/i) {
969 print FILEHANDLE "#define IPV6\n";
971 if ($config{SUPPORT_IP6LINKS} =~ /y/i) {
972 print FILEHANDLE "#define SUPPORT_IP6LINKS\n";
975 if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) {
976 print FILEHANDLE "#define USE_KQUEUE\n";
977 $se = "socketengine_kqueue";
980 if (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
981 print FILEHANDLE "#define USE_EPOLL\n";
982 $se = "socketengine_epoll";
985 # user didn't choose either epoll or select for their OS.
986 # default them to USE_SELECT (ewwy puke puke)
988 print FILEHANDLE "#define USE_SELECT\n";
989 $se = "socketengine_select";
991 print FILEHANDLE "\n#endif\n";
997 open(FILEHANDLE, ">include/inspircd_se_config.h");
998 print FILEHANDLE <<EOF;
999 /* Auto generated by configure, do not modify or commit to svn! */
1000 #ifndef __CONFIGURATION_SOCKETENGINE__
1001 #define __CONFIGURATION_SOCKETENGINE__
1011 # Create a Modules List..
1013 foreach $i (@modlist)
1015 if ($config{STATIC_LINK} eq "yes") {
1016 $modules .= "m_".$i.".o ";
1019 $modules .= "m_".$i.".so ";
1022 chomp($modules); # Remove Redundant whitespace..
1024 opendir(DIRHANDLE, "src/modules");
1025 foreach $name (sort readdir(DIRHANDLE)) {
1026 if ($name =~ /^m_(.+?)$/) {
1027 if (opendir(MDIRHANDLE, "src/modules/$name") != 0) {
1028 closedir(MDIRHANDLE);
1029 $modules .= "$name.so ";
1033 closedir(DIRHANDLE);
1036 # Write all .in files.
1039 my $exe = "inspircd";
1041 if ($config{OSNAME} =~ /CYGWIN/i) {
1042 $exe = "inspircd.exe";
1045 opendir(DIRHANDLE, $this);
1047 # Do this once here, and cache it in the .*.inc files,
1048 # rather than attempting to read src/version.sh from
1049 # compiled code -- we might not have the source to hand.
1050 # Fix for bug#177 by Brain.
1052 chomp(my $version = `sh ./src/version.sh`);
1053 chomp(my $revision = getrevision());
1054 $version = "$version(r$revision)";
1057 if ($config{IS_DARWIN} eq "YES")
1061 # We can actually parse any file starting with . and ending with .inc,
1062 # but right now we only parse .inspircd.inc to form './inspircd'
1064 foreach $name (sort readdir(DIRHANDLE)) {
1065 if ($name =~ /^\.(.+)\.inc$/) {
1067 # All .name.inc files need parsing!
1069 open(FILEHANDLE, ".$file.inc");
1070 while (<FILEHANDLE>) {
1075 $tmp =~ s/\@CC\@/$config{CC}/;
1076 $tmp =~ s/\@MAKEPROG\@/$config{MAKEPROG}/;
1077 $tmp =~ s/\@FLAGS\@/$config{FLAGS}/;
1078 $tmp =~ s/\@DEVELOPER\@/$config{DEVELOPER}/;
1079 $tmp =~ s/\@LDLIBS\@/$config{LDLIBS}/;
1080 $tmp =~ s/\@BASE_DIR\@/$config{BASE_DIR}/;
1081 $tmp =~ s/\@CONFIG_DIR\@/$config{CONFIG_DIR}/;
1082 $tmp =~ s/\@MODULE_DIR\@/$config{MODULE_DIR}/;
1083 $tmp =~ s/\@BINARY_DIR\@/$config{BINARY_DIR}/;
1084 $tmp =~ s/\@LIBRARY_DIR\@/$config{LIBRARY_DIR}/;
1085 $tmp =~ s/\@LIBRARY_EXT\@/$LIBEXT/;
1086 $tmp =~ s/\@MODULES\@/$modules/;
1087 $tmp =~ s/\@EXECUTABLE\@/$exe/;
1088 $tmp =~ s/\@MAKEORDER\@/$config{MAKEORDER}/;
1089 $tmp =~ s/\@STATICLIBS\@/$config{STATICLIBS}/;
1090 $tmp =~ s/\@VERSION\@/$version/;
1092 print "Writing \033[1;32m$file\033[0m\n";
1093 open(FILEHANDLE, ">$file");
1094 print FILEHANDLE $tmp;
1097 closedir(DIRHANDLE);
1099 # Make inspircd executable!
1100 chmod 0744, 'inspircd';
1102 if ($config{STATIC_LINK} eq "yes") {
1103 print "Writing static-build \033[1;32msrc/Makefile\033[0m\n";
1104 write_static_makefile();
1105 write_static_modules_makefile();
1106 } elsif ($config{OSNAME} =~ /CYGWIN/i) {
1107 print "Writing cygwin-build \033[1;32msrc/Makefile\033[0m\n";
1108 write_static_makefile();
1109 write_dynamic_modules_makefile();
1111 print "Writing dynamic-build \033[1;32msrc/Makefile\033[0m\n";
1112 write_dynamic_makefile();
1113 write_dynamic_modules_makefile();
1117 sub write_static_modules_makefile {
1118 # Modules Makefile..
1119 print "Writing \033[1;32msrc/modules/Makefile\033[0m\n";
1120 open(FILEHANDLE, ">src/modules/Makefile");
1123 # Module Makefile Header
1125 print FILEHANDLE <<EOF;
1126 # (C) ChatSpike development team
1127 # Makefile by <Craig\@ChatSpike.net>
1128 # Many Thanks to Andrew Church <achurch\@achurch.org>
1129 # for assisting with making this work right.
1131 # Automatically Generated by ./configure to add a modules
1132 # please run ./configure --update
1138 # End Module Makefile Header
1141 # Create a Modules List..
1146 open(MODLIST,">include/modlist.h");
1149 # Include File Header
1151 print MODLIST <<HEADER;
1152 // Generated automatically by configure. DO NOT EDIT!
1154 #ifndef __SYMBOLS__H_CONFIGURED__
1155 #define __SYMBOLS__H_CONFIGURED__
1159 # End Include File Header
1162 # Place Module List into Include
1163 foreach $i (@modlist) {
1164 if ($i !~ /_static$/) {
1165 print MODLIST "extern \"C\" void * $i\_init (void);\n";
1168 print MODLIST "\nstruct {const char *name; initfunc *value; } modsyms[] = {\n";
1173 foreach $i (@modlist)
1175 if ($i !~ /_static$/) {
1176 $cmflags = getcompilerflags("src/modules/m_".$i.".cpp");
1177 $liflags = getlinkerflags("src/modules/m_".$i.".cpp");
1178 $deps = getdependencies("src/modules/m_".$i.".cpp");
1180 #print "file: $i: cmflags=$cmflags; liflags=$liflags; deps=$deps\n";
1183 # Write Entry to the Makefile
1185 print FILEHANDLE <<EOCHEESE;
1186 m_$i.o: .m_$i\_static.cpp ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/base.h $deps
1187 \$(CC) -pipe -I../../include \$(FLAGS) $flags -export-dynamic -c .m_$i\_static.cpp
1188 mv .m_$i\_static.o ../m_$i.o
1192 # End Write Entry to the MakeFile
1194 print "Configuring module [\033[1;32mm_$i.so\033[0m] for static linking... ";
1195 open(MODULE,"<src/modules/m_".$i.".cpp") or die("Could not open m_".$i.".cpp");
1196 open(MUNGED,">src/modules/.m_".$i."_static.cpp") or die("Could not create .m_".$i."_static.cpp");
1197 while (chomp($a = <MODULE>)) {
1198 $a =~ s/init_module/$i\_init/g;
1199 print MUNGED "$a\n";
1203 print MODLIST <<EOENT;
1204 {"m_$i.so",\&$i\_init},
1210 print MODLIST "{0}};\n\n#endif\n";
1214 sub write_dynamic_modules_makefile {
1215 # Modules Makefile..
1216 print "Writing \033[1;32msrc/modules/Makefile\033[0m\n";
1217 open(FILEHANDLE, ">src/modules/Makefile");
1220 if ($config{OSNAME} =~ /CYGWIN/i) {
1221 $extra = "../inspircd.dll.a";
1225 # Module Makefile Header
1227 print FILEHANDLE <<EOF;
1228 # (C) ChatSpike development team
1229 # Makefile by <Craig\@ChatSpike.net>
1230 # Many Thanks to Andrew Church <achurch\@achurch.org>
1231 # for assisting with making this work right.
1233 # Automatically Generated by ./configure to add a modules
1234 # please run ./configure -update or ./configure -modupdate
1240 # End Module Makefile Header
1243 # Create a Modules List..
1249 foreach $i (@modlist) {
1251 # Write Entry to the MakeFile
1253 $cmflags = getcompilerflags("src/modules/m_".$i.".cpp");
1254 $liflags = getlinkerflags("src/modules/m_".$i.".cpp");
1255 $deps = getdependencies("src/modules/m_".$i.".cpp");
1257 #print "file: $i: cmflags=$cmflags; liflags=$liflags; deps=$deps\n";
1259 print FILEHANDLE <<EOCHEESE;
1260 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
1261 \$(CC) -pipe -I../../include \$(FLAGS) $cmflags -export-dynamic -c m_$i.cpp
1264 if ($config{OSNAME} =~ /darwin/) {
1265 print FILEHANDLE <<EOCHEESE;
1266 \$(CC) -pipe -twolevel_namespace -undefined dynamic_lookup \$(FLAGS) -bundle $liflags -o m_$i.so m_$i.o $extra
1270 print FILEHANDLE <<EOCHEESE;
1271 \$(CC) -pipe \$(FLAGS) -shared $liflags -o m_$i.so m_$i.o $extra
1275 $crud = $crud . " install -m \$(INSTMODE) m_$i.so \$(MODPATH)\n";
1277 # End Write Entry to the MakeFile
1281 opendir(DIRHANDLE, "src/modules");
1282 foreach $name (sort readdir(DIRHANDLE)) {
1283 if ($name =~ /^m_(.+?)$/) {
1286 # A module made of multiple files, in a dir, e.g. src/modules/m_spanningtree/
1287 if (opendir(MDIRHANDLE, "src/modules/$name") != 0) {
1288 print "Composing Makefile rules for directory \033[1;32m$name\033[0m... ";
1290 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";
1291 foreach $fname (sort readdir(MDIRHANDLE)) {
1292 if ($fname =~ /\.cpp$/) {
1293 $cmflags = getcompilerflags("src/modules/$name/$fname");
1294 $liflags = getlinkerflags("src/modules/$name/$fname");
1295 $deps = getdependencies("src/modules/$name/$fname");
1297 $oname =~ s/\.cpp$/.o/g;
1298 print FILEHANDLE " $name/$oname";
1299 $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";
1300 $crapola = $crapola . " \$(CC) -pipe -I../../include -I. \$(FLAGS) $cmflags -export-dynamic -o $name/$oname -c $name/$fname\n\n";
1301 $crap3 = $crap3 . " $name/$oname";
1305 print "(\033[1;32m$i files found\033[0m)\n";
1306 if ($config{IS_DARWIN} eq "YES") {
1307 print FILEHANDLE "\n \$(CC) -pipe -twolevel_namespace -undefined dynamic_lookup \$(FLAGS) -bundle -o $name.so $crap3\n";
1309 print FILEHANDLE "\n \$(CC) -pipe \$(FLAGS) -shared $liflags -o $name.so $crap3\n";
1311 print FILEHANDLE "\n$crapola\n";
1312 closedir(MDIRHANDLE);
1313 $crud = $crud . " install -m \$(INSTMODE) $name.so \$(MODPATH)\n";
1317 closedir(DIRHANDLE);
1319 print FILEHANDLE "modinst:\n \@echo \"Installing modules...\"\n" . $crud;
1323 sub write_static_makefile {
1324 open(FH,">src/Makefile") or die("Could not write src/Makefile!");
1327 opendir(DIRHANDLE, "src");
1328 foreach $name (sort readdir(DIRHANDLE)) {
1329 if ($name =~ /^cmd_(.+)\.cpp$/) {
1330 $cmdlist[$i++] = $1;
1333 closedir(DIRHANDLE);
1336 foreach my $cmd (@cmdlist) {
1337 $cmdobjs = $cmdobjs . "cmd_$cmd.o ";
1338 $srcobjs = $srcobjs . "cmd_$cmd.cpp ";
1343 # (C) ChatSpike development team
1344 # Makefile by <Craig\@ChatSpike.net>
1345 # Makefile version 2 (statically linked core) by <brain\@inspircd.org>
1348 CC = im a cheezeball
1350 CXXFLAGS = -I../include \${FLAGS}
1351 CPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* //' | grep -v svn)
1352 RELCPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* /modes\\//' | grep -v svn)
1356 $se = "socketengine_select";
1357 if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) {
1358 $se = "socketengine_kqueue";
1360 elsif (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
1361 $se = "socketengine_epoll";
1365 # This next section is for cygwin dynamic module builds.
1366 # Basically, what we do, is build the inspircd core as a library
1367 # then the main executable uses that. the library is capable of
1368 # loading / unloading the modules dynamically :)
1369 # Massive thanks to the guys on #cygwin @ irc.freenode.net for helping
1373 if ($config{OSNAME} =~ /CYGWIN/i) {
1375 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
1377 inspircd.exe: inspircd.dll.a
1380 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
1381 \$(CC) -shared -Wl,--out-implib=inspircd.dll.a -o inspircd.dll \$^
1385 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
1387 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
1388 \$(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)
1394 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
1395 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cull_list.cpp
1397 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
1398 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp
1400 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
1401 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c command_parse.cpp
1403 userprocess.o: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h
1404 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c userprocess.cpp
1406 socketengine.o: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
1407 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp $se.cpp
1409 hashcomp.o: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1410 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp
1412 helperfuncs.o: helperfuncs.cpp ../include/base.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1413 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
1415 channels.o: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1416 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp
1418 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
1419 \${MAKE} -C "modes" DIRNAME="src/modes" CC="\$(CC)" \$(MAKEARGS)
1420 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp
1422 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
1423 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c xline.cpp
1425 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
1426 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspstring.cpp
1428 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
1429 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dns.cpp
1431 base.o: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h
1432 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp
1434 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
1435 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
1437 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
1438 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp $cmdobjs
1440 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
1441 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dynamic.cpp
1443 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
1444 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c users.cpp
1446 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
1447 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c modules.cpp
1449 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
1450 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c wildcard.cpp
1452 socket.o: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1453 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp
1455 inspsocket.o: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1456 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspsocket.cpp
1458 timer.o: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1459 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c timer.cpp
1462 foreach my $cmd (@cmdlist) {
1464 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
1465 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cmd_$cmd.cpp
1471 sub write_dynamic_makefile {
1475 opendir(DIRHANDLE, "src");
1476 foreach $name (sort readdir(DIRHANDLE)) {
1477 if ($name =~ /^cmd_(.+)\.cpp$/) {
1478 $cmdlist[$i++] = $1;
1481 closedir(DIRHANDLE);
1485 foreach my $cmd (@cmdlist) {
1486 $cmdobjs = $cmdobjs . "cmd_$cmd.so ";
1487 $srcobjs = $srcobjs . "cmd_$cmd.cpp ";
1490 $se = "socketengine_select";
1491 if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) {
1492 $se = "socketengine_kqueue";
1494 elsif (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
1495 $se = "socketengine_epoll";
1498 open(FH,">src/Makefile") or die("Could not write src/Makefile");
1502 # (C) ChatSpike development team
1503 # Makefile by <Craig\@ChatSpike.net>
1504 # Makefile version 2 (dynamically linked core) by <brain\@inspircd.org>
1507 CC = im a cheezeball
1509 CXXFLAGS = -I../include \${FLAGS}
1510 CPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* //' | grep -v svn)
1511 RELCPPFILES = \$(shell /bin/ls -l modes/ | grep '\\.cpp' | sed 's/^.* /modes\\//' | grep -v svn)
1515 if ($config{IS_DARWIN} eq "YES") {
1517 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
1519 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
1520 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspircd.cpp
1521 \$(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
1523 libIRCDsocketengine.dylib: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
1524 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp
1525 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c $se.cpp
1526 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDsocketengine.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDsocketengine.dylib socketengine.o $se.o
1528 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
1529 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp
1530 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDsnomasks.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDsnomasks.dylib snomasks.o
1532 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
1533 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c command_parse.cpp
1534 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDcommand_parse.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDcommand_parse.dylib command_parse.o
1536 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
1537 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cull_list.cpp
1538 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDcull_list.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDcull_list.dylib cull_list.o
1540 libIRCDuserprocess.dylib: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h
1541 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c userprocess.cpp
1542 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDuserprocess.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDuserprocess.dylib userprocess.o
1544 libIRCDhash.dylib: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1545 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp
1546 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDhash.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDhash.dylib hashcomp.o
1548 libIRCDhelper.dylib: helperfuncs.cpp ../include/base.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1549 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
1550 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDhelper.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDhelper.dylib helperfuncs.o
1552 libIRCDchannels.dylib: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1553 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp
1554 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDchannels.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDchannels.dylib channels.o
1556 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)
1557 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp
1558 \${MAKE} -C "modes" DIRNAME="src/modes" CC="\$(CC)" \$(MAKEARGS) CPPFILES="\$(CPPFILES)"
1559 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDmode.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDmode.dylib mode.o modes/modeclasses.a
1561 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
1562 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c xline.cpp
1563 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDxline.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDxline.dylib xline.o
1565 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
1566 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspstring.cpp
1567 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDstring.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDstring.dylib inspstring.o
1569 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
1570 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dns.cpp
1571 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDasyncdns.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDasyncdns.dylib dns.o
1573 libIRCDbase.dylib: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h
1574 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp
1575 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDbase.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDbase.dylib base.o
1577 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
1578 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
1579 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDconfigreader.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDconfigreader.dylib configreader.o
1581 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
1582 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp
1583 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDcommands.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDcommands.dylib commands.o
1585 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
1586 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dynamic.cpp
1587 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDdynamic.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDdynamic.dylib dynamic.o
1589 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
1590 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c users.cpp
1591 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDusers.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDusers.dylib users.o
1593 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
1594 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c modules.cpp
1595 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDmodules.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDmodules.dylib modules.o
1597 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
1598 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c wildcard.cpp
1599 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDwildcard.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDwildcard.dylib wildcard.o
1601 libIRCDsocket.dylib: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1602 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp
1603 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDsocket.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDsocket.dylib socket.o
1605 libIRCDinspsocket.dylib: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1606 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspsocket.cpp
1607 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDinspsocket.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDinspsocket.dylib inspsocket.o
1609 libIRCDtimer.dylib: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1610 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c timer.cpp
1611 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDtimer.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDtimer.dylib timer.o
1618 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
1620 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
1621 \$(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
1623 libIRCDsocketengine.so: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
1624 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp $se.cpp
1625 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsocketengine.so socketengine.o $se.o
1627 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
1628 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp
1629 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsnomasks.so snomasks.o
1631 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
1632 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c command_parse.cpp
1633 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommand_parse.so command_parse.o
1635 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
1636 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cull_list.cpp
1637 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcull_list.so cull_list.o
1639 libIRCDuserprocess.so: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h
1640 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c userprocess.cpp
1641 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDuserprocess.so userprocess.o
1643 libIRCDhash.so: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1644 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp
1645 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDhash.so hashcomp.o
1647 libIRCDhelper.so: helperfuncs.cpp ../include/base.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1648 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
1649 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDhelper.so helperfuncs.o
1651 libIRCDchannels.so: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1652 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp
1653 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDchannels.so channels.o
1655 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)
1656 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp
1657 \${MAKE} -C "modes" DIRNAME="src/modes" CC="\$(CC)" \$(MAKEARGS) CPPFILES="\$(CPPFILES)"
1658 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmode.so mode.o modes/modeclasses.a
1660 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
1661 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c xline.cpp
1662 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDxline.so xline.o
1664 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
1665 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspstring.cpp
1666 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDstring.so inspstring.o
1668 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
1669 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dns.cpp
1670 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDasyncdns.so dns.o
1672 libIRCDbase.so: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h
1673 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp
1674 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDbase.so base.o
1676 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
1677 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
1678 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDconfigreader.so configreader.o
1680 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
1681 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp
1682 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommands.so commands.o
1684 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
1685 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dynamic.cpp
1686 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDdynamic.so dynamic.o
1688 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
1689 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c users.cpp
1690 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDusers.so users.o
1692 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
1693 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c modules.cpp
1694 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmodules.so modules.o
1696 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
1697 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c wildcard.cpp
1698 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDwildcard.so wildcard.o
1700 libIRCDsocket.so: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1701 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp
1702 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsocket.so socket.o
1704 libIRCDinspsocket.so: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1705 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspsocket.cpp
1706 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDinspsocket.so inspsocket.o
1708 libIRCDtimer.so: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1709 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c timer.cpp
1710 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDtimer.so timer.o
1714 foreach my $cmd (@cmdlist) {
1716 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
1717 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cmd_$cmd.cpp
1718 \$(CC) -pipe $SHARED -o cmd_$cmd.so cmd_$cmd.o