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 'enable-openssl' => \$opt_use_openssl,
28 'disable-interactive' => \$opt_nointeractive,
29 'with-nick-length=i' => \$opt_nick_length,
30 'with-channel-length=i' => \$opt_chan_length,
31 'with-max-channels=i' => \$opt_maxchans,
32 'with-max-oper-channels=i' => \$opt_opermaxchans,
33 'with-max-clients=i' => \$opt_maxclients,
34 'enable-epoll' => \$opt_epoll,
35 'enable-kqueue' => \$opt_kqueue,
36 'disable-epoll' => \$opt_noepoll,
37 'disable-kqueue' => \$opt_nokqueue,
38 'enable-ipv6' => \$opt_ipv6,
39 'enable-remote-ipv6' => \$opt_ipv6links,
40 'disable-remote-ipv6' => \$opt_noipv6links,
41 'with-cc=s' => \$opt_cc,
42 'with-ident-length=i' => \$opt_ident,
43 'with-quit-length=i' => \$opt_quit,
44 'with-topic-length=i' => \$opt_topic,
45 'with-kick-length=i' => \$opt_kick,
46 'with-gecos-length=i' => \$opt_gecos,
47 'with-away-length=i' => \$opt_away,
48 'with-max-modes=i' => \$opt_modes,
49 'prefix=s' => \$opt_base_dir,
50 'config-dir=s' => \$opt_config_dir,
51 'module-dir=s' => \$opt_module_dir,
52 'binary-dir=s' => \$opt_binary_dir,
53 'library-dir=s' => \$opt_library_dir,
54 'disable-debuginfo' => sub { $opt_disable_debug = 1 },
55 'help' => sub { showhelp(); },
56 'modupdate' => sub { modupdate(); },
57 'update' => sub { update(); },
58 'svnupdate' => sub { svnupdate(); },
59 'clean' => sub { clean(); },
62 my $non_interactive = (
63 (defined $opt_library_dir) ||
64 (defined $opt_base_dir) ||
65 (defined $opt_config_dir) ||
66 (defined $opt_module_dir) ||
67 (defined $opt_base_dir) ||
68 (defined $opt_binary_dir) ||
69 (defined $opt_nointeractive) ||
70 (defined $opt_away) ||
71 (defined $opt_gecos) ||
72 (defined $opt_kick) ||
73 (defined $opt_maxclients) ||
74 (defined $opt_modes) ||
75 (defined $opt_topic) ||
76 (defined $opt_quit) ||
77 (defined $opt_ident) ||
79 (defined $opt_ipv6) ||
80 (defined $opt_ipv6links) ||
81 (defined $opt_noipv6links) ||
82 (defined $opt_kqueue) ||
83 (defined $opt_epoll) ||
84 (defined $opt_maxchans) ||
85 (defined $opt_opermaxchans) ||
86 (defined $opt_chan_length) ||
87 (defined $opt_nick_length) ||
88 (defined $opt_use_openssl) ||
89 (defined $opt_nokqueue) ||
90 (defined $opt_noepoll) ||
91 (defined $opt_use_gnutls)
93 my $interactive = !$non_interactive;
96 chomp($topdir = getcwd());
97 $this = resolve_directory($topdir); # PWD, Regardless.
98 @modlist = (); # Declare for Module List..
99 %config = (); # Initiate Configuration Hash..
100 $config{ME} = resolve_directory($topdir); # Present Working Directory
102 $config{BASE_DIR} = $config{ME};
104 if (defined $opt_base_dir)
106 $config{BASE_DIR} = $opt_base_dir;
109 $config{CONFIG_DIR} = resolve_directory($config{BASE_DIR}."/conf"); # Configuration Directory
110 $config{MODULE_DIR} = resolve_directory($config{BASE_DIR}."/modules"); # Modules Directory
111 $config{BINARY_DIR} = resolve_directory($config{BASE_DIR}."/bin"); # Binary Directory
112 $config{LIBRARY_DIR} = resolve_directory($config{BASE_DIR}."/lib"); # Library Directory
114 if (defined $opt_config_dir)
116 $config{CONFIG_DIR} = $opt_config_dir;
118 if (defined $opt_module_dir)
120 $config{MODULE_DIR} = $opt_module_dir;
122 if (defined $opt_binary_dir)
124 $config{BINARY_DIR} = $opt_binary_dir;
126 if (defined $opt_library_dir)
128 $config{LIBRARY_DIR} = $opt_library_dir;
130 chomp($config{HAS_GNUTLS} = `libgnutls-config --version 2>/dev/null | cut -c 1,2,3`); # GNUTLS Version.
131 chomp($config{HAS_OPENSSL} = `openssl version 2>/dev/null`); # Openssl version
132 $config{USE_GNUTLS} = "n";
133 if (defined $opt_use_gnutls)
135 $config{USE_GNUTLS} = "y"; # Use gnutls.
137 $config{USE_OPENSSL} = "n"; # Use openssl.
138 if (defined $opt_use_openssl)
140 $config{USE_OPENSSL} = "y";
143 # no, let's not change these.
144 $config{OPTIMITEMP} = "0"; # Default Optimisation Value
145 if (!defined $opt_disable_debug)
147 $config{OPTIMISATI} = "-O2 -g1"; # Optimisation Flag
151 $config{OPTIMISATI} = "-O2"; # DEBUGGING OFF!
154 $config{NICK_LENGT} = "31"; # Default Nick Length
155 if (defined $opt_nick_length)
157 $config{NICK_LENGT} = $opt_nick_length;
159 $config{CHAN_LENGT} = "64"; # Default Channel Name Length
160 if (defined $opt_chan_length)
162 $config{CHAN_LENGT} = $opt_chan_length;
164 $config{MAX_CHANNE} = "20"; # Default Max. Channels per user
165 if (defined $opt_maxchans)
167 $config{MAX_CHANNE} = $opt_maxchans;
169 $config{MAX_OPERCH} = "60"; # Default Max. Channels per oper
170 if (defined $opt_opermaxchans)
172 $config{MAX_OPERCH} = $opt_opermaxchans;
174 $config{MAXI_MODES} = "20"; # Default Max. Number of Modes set at once.
175 if (defined $opt_modes)
177 $config{MAXI_MODES} = $opt_modes;
179 $config{HAS_STRLCPY} = "false"; # strlcpy Check.
180 $config{HAS_STDINT} = "false"; # stdint.h check
181 $config{USE_KQUEUE} = "y"; # kqueue enabled
182 if (defined $opt_kqueue)
184 $config{USE_KQUEUE} = "y";
186 if (defined $opt_nokqueue)
188 $config{USE_KQUEUE} = "n";
190 $config{USE_EPOLL} = "y"; # epoll enabled
191 if (defined $opt_epoll)
193 $config{USE_EPOLL} = "y";
195 if (defined $opt_noepoll)
197 $config{USE_EPOLL} = "n";
199 $config{IPV6} = "n"; # IPv6 support (experimental)
200 if (defined $opt_ipv6)
204 $config{SUPPORT_IP6LINKS} = "y"; # IPv4 supporting IPv6 links (experimental)
205 if (defined $opt_ipv6links)
207 $config{SUPPORT_IP6LINKS} = "y";
209 if (defined $opt_noipv6links)
211 $config{SUPPORT_IP6LINKS} = "n";
213 $config{STATIC_LINK} = "no"; # are doing static modules?
214 chomp($config{MAX_CLIENT_T} = `sh -c \"ulimit -n\"`); # FD Limit
215 chomp($config{MAX_DESCRIPTORS} = `sh -c \"ulimit -n\"`); # Hard FD Limit
216 chomp($config{GCCVER} = `g++ -dumpversion | cut -c 1`); # Major GCC Version
217 $config{_SOMAXCONN} = SOMAXCONN; # Max connections in accept queue
218 $config{OSNAME} = $^O; # Operating System Name
219 $config{IS_DARWIN} = "NO"; # Is OSX?
220 $config{CC} = "g++"; # C++ compiler
223 $config{CC} = $opt_cc;
225 $exec = $config{CC} . " -dumpversion | cut -c 1";
226 chomp($config{GCCVER} = `$exec`); # Major GCC Version
227 $config{MAKEORDER} = "ircd mods"; # build order
228 $config{STATICLIBS} = ""; # library archive path
229 $config{MAX_IDENT} = "12"; # max ident size
230 $config{MAX_QUIT} = "255"; # max quit message size
231 $config{MAX_TOPIC} = "307"; # max topic size
232 $config{MAX_KICK} = "255"; # max kick message size
233 $config{MAX_GECOS} = "128"; # max GECOS size
234 $config{MAX_AWAY} = "200"; # max AWAY size
235 if (defined $opt_ident)
237 $config{MAX_IDENT} = $opt_ident;
239 if (defined $opt_quit)
241 $config{MAX_QUIT} = $opt_quit;
243 if (defined $opt_topic)
245 $config{MAX_TOPIC} = $opt_topic;
247 if (defined $opt_kick)
249 $config{MAX_KICK} = $opt_kick;
251 if (defined $opt_gecos)
253 $config{MAX_GECOS} = $opt_gecos;
255 if (defined $opt_away)
257 $config{MAX_AWAY} = $opt_away;
260 $config{HAS_OPENSSL} =~ /OpenSSL ([-[:digit:].]+)([a-z])?(\-[a-z][0-9])? (\w{3}|[0-9]+) (\w{3}|[0-9]+) [0-9]{4}/;
261 $config{HAS_OPENSSL} = $1;
263 if ($config{GCCVER} eq "") {
264 print $config{CC} . " was not found! You require g++ (the GNU C++ compiler, part of GCC) to build InspIRCd!\n";
268 if ($config{OSNAME} =~ /darwin/)
270 $config{IS_DARWIN} = "YES";
273 # Minihack! Convert Cygwin to 'Cyg-Static' so i can
274 # Keep my dynamic module experiments here for later
277 if ($config{OSNAME} =~ /CYGWIN/i)
279 $config{OSNAME} = "CYG-STATIC";
282 if (!$config{MAX_CLIENT_T}) {
283 $config{MAX_CLIENT_T} = 1024; # Set a reasonable 'Default'
284 $fd_scan_fail = "true"; # Used Later
287 # Get and Set some important vars..
292 system("rm -rf .config.cache");
298 chomp($topdir = getcwd());
299 $this = resolve_directory($topdir); # PWD, Regardless.
301 # Does the cache file exist?
303 # No, No it doesn't.. *BASH*
304 print "You have not run ./configure before. Please do this before trying to run the update script.\n";
307 # We've Loaded the cache file and all our variables..
308 print "Updating Files..\n";
310 if ($opt_disable_debug == 1)
312 print "Disabling debug information (-g).\n";
313 $config{OPTIMISATI} = "";
316 $has_epoll = $config{HAS_EPOLL};
317 $has_kqueue = $config{HAS_KQUEUE};
326 print "Configure update failed: $@\n";
334 chomp($topdir = getcwd());
335 $this = resolve_directory($topdir); # PWD, Regardless.
337 # Does the cache file exist?
339 # No, No it doesn't.. *BASH*
340 print "You have not run ./configure before. Please do this before trying to run the update script.\n";
343 # We've Loaded the cache file and all our variables..
344 print "Updating Files..\n";
346 $has_epoll = $config{HAS_EPOLL};
347 $has_kqueue = $config{HAS_KQUEUE};
356 print "Module update failed: $@\n";
366 open(FH,"<.svn/entries") or $fail = 1;
368 print "This is not an SVN copy of InspIRCd.\n";
371 system("svn update");
372 system("perl configure -update");
373 if ($ARGV[1] eq "rebuild") {
374 system("make install");
379 print "Running non-interactive configure...\n" unless $interactive;
380 print "Checking for cache from previous configure... ";
381 print ((getcache() eq "true") ? "found\n" : "not found\n");
382 print "Checking operating system version... ";
383 print getosflags() . "\n";
385 if (defined $opt_maxclients)
387 $config{MAX_CLIENT} = $opt_maxclients;
390 if (!$config{MAX_CLIENT}) {
391 # If the cache hasn't set the max clients, copy the variable of MAX_CLIENT_T, this
392 # allows us to keep _T for testing purposes. (ie. "Are you sure you want to go
393 # higher than the found value" :))
394 $config{MAX_CLIENT} = $config{MAX_CLIENT_T};
397 printf "Checking if stdint.h exists... ";
398 $config{HAS_STDINT} = "true";
400 open(STDINT, "</usr/include/stdint.h") or $config{HAS_STDINT} = "false";
401 if ($config{HAS_STDINT} eq "true") {
404 print "yes\n" if $config{HAS_STDINT} eq "true";
405 print "no\n" if $config{HAS_STDINT} eq "false";
408 printf "Checking if strlcpy exists... ";
409 # Perform the strlcpy() test..
410 $config{HAS_STRLCPY} = "false";
412 open(STRLCPY, "</usr/include/string.h") or $fail = 1;
414 while (chomp($line = <STRLCPY>)) {
415 # try and find the delcaration of:
416 # size_t strlcpy(...)
417 if ($line =~ /size_t(\0x9|\s)+strlcpy/) {
418 $config{HAS_STRLCPY} = "true";
423 print "yes\n" if $config{HAS_STRLCPY} eq "true";
424 print "no\n" if $config{HAS_STRLCPY} eq "false";
427 printf "Checking if kqueue exists... ";
430 open(KQUEUE, "</usr/include/sys/event.h") or $fail = 1;
432 while (chomp($line = <KQUEUE>)) {
433 # try and find the delcaration of:
435 if ($line =~ /int(\0x9|\s)+kqueue/) {
441 print "yes\n" if $has_kqueue == 1;
442 print "no\n" if $has_kqueue == 0;
444 printf "Checking if epoll exists... ";
447 open(EPOLL, "</usr/include/sys/epoll.h") or $fail = 1;
453 my $kernel = `uname -r`;
455 if (($kernel =~ /^2\.0\./) || ($kernel =~ /^2\.2\./) || ($kernel =~ /^2\.4\./)) {
459 print "yes\n" if $has_epoll == 1;
460 print "no\n" if $has_epoll == 0;
462 if (($config{OSNAME} =~ /CYGWIN/) || ($config{OSNAME} eq "CYG-STATIC")) {
463 $config{HAS_STRLCPY} = "true";
466 $config{HAS_EPOLL} = $has_epoll;
467 $config{HAS_KQUEUE} = $has_kqueue;
469 printf "Checking for libgnutls... ";
470 if (($config{HAS_GNUTLS}) && (($config{HAS_GNUTLS} >= 1.2) || ($config{HAS_GNUTLS} eq "y"))) {
472 $config{HAS_GNUTLS} = "y";
475 $config{HAS_GNUTLS} = "n";
478 printf "Checking for openssl... ";
479 if (($config{HAS_OPENSSL}) && (($config{HAS_OPENSSL} >= 0.8) || ($config{HAS_OPENSSL} eq "y"))) {
481 $config{HAS_OPENSSL} = "y";
484 $config{HAS_OPENSSL} = "n";
487 ################################################################################
488 # BEGIN INTERACTIVE PART #
489 ################################################################################
497 my $rev = getrevision();
498 # Display Introduction Message..
500 Welcome to the \033[1mInspIRCd\033[0m Configuration program! (\033[1minteractive mode\033[0m)
501 \033[1mPackage maintainers: Type ./configure --help for non-interactive help\033[0m
503 *** If you are unsure of any of these values, leave it blank for ***
504 *** standard settings that will work, and your server will run ***
505 *** using them. Please consult your IRC network admin if in doubt. ***
507 Press \033[1m<RETURN>\033[0m to accept the default for any option, or enter
508 a new value. Please note: You will \033[1mHAVE\033[0m to read the docs
509 dir, otherwise you won't have a config file!
511 Your operating system is: \033[1;32m$config{OSNAME}\033[0m ($wholeos)
512 Maximum file descriptors: \033[1;32m$config{MAX_CLIENT_T}\033[0m
513 Your InspIRCd revision ID is \033[1;32mr$rev\033[0m";
515 print " (Non-SVN build)";
519 $config{CHANGE_COMPILER} = "n";
520 print "I have detected the following compiler: \033[1;32m$config{CC}\033[0m (version \033[1;32m$config{GCCVER}.x\033[0m)\n";
522 while (($config{GCCVER} < 3) || ($config{GCCVER} eq "")) {
523 print "\033[1;32mIMPORTANT!\033[0m A GCC 2.x compiler has been detected, and
524 should NOT be used. You should probably specify a newer compiler.\n\n";
525 yesno(CHANGE_COMPILER,"Do you want to change the compiler?");
526 if ($config{CHANGE_COMPILER} =~ /y/i) {
527 print "What command do you want to use to invoke your compiler?\n";
528 print "[\033[1;32m$config{CC}\033[0m] -> ";
529 chomp($config{CC} = <STDIN>);
530 if ($config{CC} eq "") {
533 chomp($foo = `$config{CC} -dumpversion | cut -c 1`);
535 chomp($config{GCCVER} = `$config{CC} -dumpversion | cut -c 1`); # we must redo these if we change compilers
536 print "Queried compiler: \033[1;32m$config{CC}\033[0m (version \033[1;32m$config{GCCVER}.x\033[0m)\n";
537 if ($config{GCCVER} < 3) {
538 print "\033[1;32mGCC 2.x WILL NOT WORK!\033[0m. Let's try that again, shall we?\n";
542 print "\033[1;32mWARNING!\033[0m Could not execute the compiler you specified. You may want to try again.\n";
549 # Directory Settings..
550 my $tmpbase = $config{BASE_DIR};
551 dir_check("do you wish to install the InspIRCd base", "BASE_DIR");
552 if ($tmpbase ne $config{BASE_DIR}) {
553 $config{CONFIG_DIR} = resolve_directory($config{BASE_DIR}."/conf"); # Configuration Dir
554 $config{MODULE_DIR} = resolve_directory($config{BASE_DIR}."/modules"); # Modules Directory
555 $config{BINARY_DIR} = resolve_directory($config{BASE_DIR}."/bin"); # Binary Directory
556 $config{LIBRARY_DIR} = resolve_directory($config{BASE_DIR}."/lib"); # Library Directory
559 dir_check("are the configuration files", "CONFIG_DIR");
560 dir_check("are the modules to be compiled to", "MODULE_DIR");
561 dir_check("is the IRCd binary to be placed", "BINARY_DIR");
562 dir_check("are the IRCd libraries to be placed", "LIBRARY_DIR");
565 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?");
569 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?");
572 $chose_hiperf = (($config{USE_EPOLL} eq "y") || ($config{USE_KQUEUE} eq "y"));
573 if (!$chose_hiperf) {
574 print "No high-performance socket engines are available, or you chose\n";
575 print "not to enable one. Defaulting to select() engine.\n\n";
578 yesno(IPV6,"Would you like to build InspIRCd with IPv6 support?");
581 if ($config{IPV6} eq "y") {
582 print "You have chosen to build an \033[1;32mIPV6-only\033[0m server.\nTo accept IPV4 users, you must use the '::ffff:' notation of addresses.\n\n";
583 $config{SUPPORT_IP6LINKS} = "y";
585 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 which are using '::ffff:' notation?\nIf you are using a recent operating\nsystem and are unsure, answer yes.");
589 if (($config{HAS_GNUTLS} eq "y") && ($config{HAS_OPENSSL} eq "y")) {
590 print "I have detected both GnuTLS and OpenSSL on your system.\n";
591 print "I will default to GnuTLS. If you wish to use OpenSSL\n";
592 print "instead, you should enable the OpenSSL module yourself\n";
593 print "by copying it from src/modules/extra to src/modules.\n\n";
596 if ($config{HAS_GNUTLS} eq "y") {
597 yesno(USE_GNUTLS, "Would you like to enable SSL Support?");
598 if ($config{USE_GNUTLS} eq "y") {
599 print "\nUsing GnuTLS SSL module.\n";
601 } elsif ($config{HAS_OPENSSL} eq "y") {
602 yesno(USE_OPENSSL, "Would you like to enable SSL Support?");
603 if ($config{USE_OPENSSL} eq "y") {
604 print "\nUsing OpenSSL SSL module.\nYou will get better performance if you move to GnuTLS in the future.\n";
608 print "\nThe following questions will ask you for various figures relating\n";
609 print "To your IRCd install. Please note that these should usually be left\n";
610 print "as defaults unless you have a real reason to change them. If they\n";
611 print "changed, then the values must be identical on all servers on your\n";
612 print "network, or malfunctions and/or crashes may occur, with the exception\n";
613 print "of the 'maximum number of clients' setting which may be different on\n";
614 print "different servers on the network.\n\n";
616 # File Descriptor Settings..
617 promptnumeric("number of clients at any one time", "MAX_CLIENT_T");
618 $config{MAX_CLIENT} = $config{MAX_CLIENT_T};
619 $config{MAX_DESCRIPTORS} = $config{MAX_CLIENT_T};
621 promptnumeric("length of nicknames", "NICK_LENGT");
622 promptnumeric("length of channel names", "CHAN_LENGT");
623 promptnumeric("number of channels a normal user may join at any one time", "MAX_CHANNE");
624 promptnumeric("number of channels an oper may join at any one time", "MAX_OPERCH");
625 promptnumeric("number of mode changes in one line", "MAXI_MODES");
626 promptnumeric("length of an ident (username)", "MAX_IDENT");
627 promptnumeric("length of a quit message", "MAX_QUIT");
628 promptnumeric("length of a channel topic", "MAX_TOPIC");
629 promptnumeric("length of a kick message", "MAX_KICK");
630 promptnumeric("length of a GECOS (real name)", "MAX_GECOS");
631 promptnumeric("length of an away message", "MAX_AWAY");
636 if (($config{USE_GNUTLS} eq "y") && ($config{HAS_GNUTLS} ne "y"))
638 print "Sorry, but i couldn't detect gnutls. Make sure gnutls-config is in your path.\n";
641 if (($config{USE_OPENSSL} eq "y") && ($config{HAS_OPENSSL} ne "y"))
643 print "Sorry, but i couldn't detect openssl. Make sure openssl is in your path.\n";
647 if ($config{USE_GNUTLS} eq "y") {
649 open(TMP, "<src/modules/m_ssl_gnutls.cpp") or $failed = 1;
652 print "Symlinking src/modules/m_ssl_gnutls.cpp from extra/\n";
653 chdir("src/modules");
654 system("ln -s extra/m_ssl_gnutls.cpp");
655 system("ln -s extra/ssl_cert.h");
662 open(TMP, "<$config{CONFIG_DIR}/key.pem") or $failed = 1;
664 open(TMP, "<$config{CONFIG_DIR}/cert.pem") or $failed = 1;
667 print "SSL Certificates Not found, Generating.. \n\n
668 *************************************************************
669 * Generating the Private Key may take some time, go grab a *
670 * Coffee. Even better, to generate some more entropy if it *
671 * is taking a while, open another console and type du / a *
672 * few times and get that HD going :) Then answer the *
673 * Questions which follow. If you are unsure, just hit enter *
674 *************************************************************\n\n";
675 system("certtool --generate-privkey --outfile key.pem");
676 system("certtool --generate-self-signed --load-privkey key.pem --outfile cert.pem");
677 print "\nCertificate generation complete, copying to config directory... ";
678 system("mv key.pem $config{CONFIG_DIR}/key.pem");
679 system("mv cert.pem $config{CONFIG_DIR}/cert.pem");
682 print "SSL Certificates found, skipping.\n\n"
687 print "Skipping SSL certificate generation\nin non-interactive mode.\n\n";
689 } elsif ($config{USE_OPENSSL} eq "y") {
691 open(TMP, "<src/modules/m_ssl_openssl.cpp") or $failed = 1;
694 print "Symlinking src/modules/m_ssl_openssl.cpp from extra/\n";
695 chdir("src/modules");
696 system("ln -s extra/m_ssl_openssl.cpp");
697 system("ln -s extra/ssl_cert.h");
704 open(TMP, "<$config{CONFIG_DIR}/key.pem") or $failed = 1;
706 open(TMP, "<$config{CONFIG_DIR}/cert.pem") or $failed = 1;
709 print "SSL Certificates Not found, Generating.. \n\n
710 *************************************************************
711 * Generating the certificates may take some time, go grab a *
712 * coffee, or something. *
713 *************************************************************\n\n";
714 system("openssl req -x509 -nodes -newkey rsa:1024 -keyout key.pem -out cert.pem");
715 system("openssl dhparam -out dhparams.pem 1024");
716 print "\nCertificate generation complete, copying to config directory... ";
717 system("mv key.pem $config{CONFIG_DIR}/key.pem");
718 system("mv cert.pem $config{CONFIG_DIR}/cert.pem");
719 system("mv dhparams.pem $config{CONFIG_DIR}/dhparams.pem");
722 print "SSL Certificates found, skipping.\n\n"
727 print "Skipping SSL certificate generation\nin non-interactive mode.\n\n";
730 if (($config{USE_GNUTLS} eq "n") && ($config{USE_OPENSSL} eq "n")) {
731 print "Skipping SSL Certificate generation, SSL support is not available.\n\n";
739 print "To build your server with these settings, please type '\033[1;32m$config{MAKEPROG}\033[0m' now.\n";
740 if (($config{USE_GNUTLS} eq "y") || ($config{USE_OPENSSL} eq "y")) {
741 print "Please remember that to enable \033[1;32mSSL support\033[0m you must\n";
742 print "load the required modules in your config. This configure process\n";
743 print "has just prepared these modules to be compiled for you, and has not\n";
744 print "configured them to be compiled into the core of the ircd.\n";
746 print "*** \033[1;32mRemember to edit your configuration files!!!\033[0m ***\n\n\n";
747 if (($config{OSNAME} eq "OpenBSD") && ($config{CC} ne "eg++")) {
748 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";
751 if ($config{GCCVER} < "3") {
753 \033[1;32mWARNING!\033[0m You are attempting to compile InspIRCd on GCC 2.x!
754 GCC 2.x series compilers only had partial (read as broken) C++ support, and
755 your compile will most likely fail horribly! If you have any problems, do NOT
756 report them to the bugtracker or forums without first upgrading your compiler
757 to a newer 3.x or 4.x (or whatever is available currently) version.
761 ################################################################################
763 ################################################################################
765 # Retrieves the .config.cache file, and loads values into the main config hash.
766 open(CACHE, ".config.cache") or return undef;
769 # Ignore Blank lines, and comments..
772 my ($key, $value) = split("=", $_, 2);
773 $value =~ /^\"(.*)\"$/;
774 # Do something with data here!
782 # Dump the contents of %config
783 print "Writing \033[1;32mcache file\033[0m for future ./configures ...\n";
784 open(FILEHANDLE, ">.config.cache");
785 foreach $key (keys %config) {
786 print FILEHANDLE "$key=\"$config{$key}\"\n";
792 my ($desc, $hash_key) = @_;
795 print "In what directory $desc?\n";
796 print "[\033[1;32m$config{$hash_key}\033[0m] -> ";
797 chomp($var = <STDIN>);
799 $var = $config{$hash_key};
801 if ($var =~ /^\~\/(.+)$/) {
802 # Convert it to a full path..
803 $var = resolve_directory($ENV{HOME} . "/" . $1);
805 elsif ((($config{OSNAME} =~ /MINGW32/i) and ($var !~ /^[A-Z]{1}:\\.*/)) and (substr($var,0,1) ne "/"))
807 # Assume relative Path was given.. fill in the rest.
808 $var = $this . "/$var";
811 $var = resolve_directory($var);
813 print "$var does not exist. Create it?\n[\033[1;32my\033[0m] ";
814 chomp($tmp = <STDIN>);
815 if (($tmp eq "") || ($tmp =~ /^y/i)) {
816 # Attempt to Create the Dir..
818 system("mkdir -p \"$var\" >> /dev/null 2>&1");
819 $chk = system("mkdir -p \"$var\" >> /dev/null 2>&1") / 256;
821 print "Unable to create directory. ($var)\n\n";
826 # They said they don't want to create, and we can't install there.
832 # Target exists, but is not a directory.
833 print "File $var exists, but is not a directory.\n\n";
837 # Either Dir Exists, or was created fine.
838 $config{$hash_key} = $var;
846 $config{LDLIBS} = "-lstdc++";
847 $config{FLAGS} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}";
848 $config{MAKEPROG} = "make";
849 $SHARED = "-Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared";
851 if ($config{OSNAME} =~ /OpenBSD/i) {
852 $config{MAKEPROG} = "gmake";
853 chomp($foo = `eg++ -dumpversion | cut -c 1`);
854 # theyre running the package version of gcc (eg++)... detect it and set up its version numbers.
855 # if theyre not running this, configure lets the build continue but they probably wont manage to
856 # compile as this standard version is 2.95.3!
858 $config{CC} = "eg++";
859 chomp($config{GCCVER} = `eg++ -dumpversion | cut -c 1`); # we must redo these if we change the compiler path
864 if ($config{OSNAME} =~ /darwin/i) {
865 $SHARED = "-bundle -undefined dynamic_lookup";
866 $config{LDLIBS} = "-ldl -lstdc++";
868 if ($config{OSNAME} =~ /Linux/i) {
869 $config{LDLIBS} = "-ldl -lstdc++";
870 $config{FLAGS} = "-fno-strict-aliasing -fPIC -Wall -Woverloaded-virtual $config{OPTIMISATI}";
871 $config{FLAGS} .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS});
872 $config{MAKEPROG} = "make";
873 if ($config{OSNAME} =~ /CYGWIN/) {
874 $config{FLAGS} = "-fno-strict-aliasing -Wall -Woverloaded-virtual $config{OPTIMISATI}";
875 $config{LDLIBS} = "";
876 $config{MAKEPROG} = "/usr/bin/make";
877 $config{MAKEORDER} = "ircd mods";
879 } elsif ($config{OSNAME} eq "CYG-STATIC") {
880 $config{FLAGS} = "-fno-strict-aliasing -Wall -Woverloaded-virtual $config{OPTIMISATI}";
881 $config{LDLIBS} = "";
882 $config{MAKEPROG} = "/usr/bin/make";
883 $config{MAKEORDER} = "mods ircd";
884 $config{STATICLIBS} = "modules/mods.a";
885 $config{STATIC_LINK} = "yes";
886 return "Cygwin-Static";
888 $config{FLAGS} .= " " . $ENV{CXXFLAGS} if exists($ENV{CXXFLAGS});
891 if ($config{OSNAME} =~ /SunOS/i)
893 # solaris/sunos needs these
894 # socket = bsd sockets api
896 # rt = POSIX realtime extensions
897 # resolv = inet_aton only (why isnt this in nsl?!)
898 $config{MAKEPROG} = "gmake";
899 $config{LDLIBS} = $config{LDLIBS} . " -lsocket -lnsl -lrt -lresolv";
903 if($config{OSNAME} =~ /MINGW32/i)
905 # All code is position-independent on windows
906 $config{FLAGS} =~ s/-fPIC //;
910 return $config{OSNAME};
914 my($writeheader) = @_;
915 # First File.. inspircd_config.h
916 chomp(my $incos = `uname -n -s -r`);
917 chomp(my $version = `sh ./src/version.sh`);
918 chomp(my $revision = getrevision());
919 $version = "$version(r$revision)";
920 chomp(my $revision2 = getrevision());
921 if ($writeheader == 1)
923 print "Writing \033[1;32minspircd_config.h\033[0m\n";
924 open(FILEHANDLE, ">include/inspircd_config.h");
925 my $NL = $config{NICK_LENGT}+1;
926 my $CL = $config{CHAN_LENGT}+1;
927 print FILEHANDLE <<EOF;
928 /* Auto generated by configure, do not modify! */
929 #ifndef __CONFIGURATION_AUTO__
930 #define __CONFIGURATION_AUTO__
932 #define CONFIG_FILE "$config{CONFIG_DIR}/inspircd.conf"
933 #define MOD_PATH "$config{MODULE_DIR}"
934 #define VERSION "$version"
935 #define REVISION "$revision2"
936 #define MAXCLIENTS $config{MAX_CLIENT}
937 #define MAXCLIENTS_S "$config{MAX_CLIENT}"
938 #define SOMAXCONN_S "$config{_SOMAXCONN}"
939 #define MAX_DESCRIPTORS $config{MAX_DESCRIPTORS}
942 #define MAXCHANS $config{MAX_CHANNE}
943 #define OPERMAXCHANS $config{MAX_OPERCH}
944 #define MAXMODES $config{MAXI_MODES}
945 #define IDENTMAX $config{MAX_IDENT}
946 #define MAXQUIT $config{MAX_QUIT}
947 #define MAXTOPIC $config{MAX_TOPIC}
948 #define MAXKICK $config{MAX_KICK}
949 #define MAXGECOS $config{MAX_GECOS}
950 #define MAXAWAY $config{MAX_AWAY}
951 #define OPTIMISATION $config{OPTIMITEMP}
952 #define LIBRARYDIR "$config{LIBRARY_DIR}"
953 #define SYSTEM "$incos"
956 if ($config{OSNAME} =~ /SunOS/i) {
957 print FILEHANDLE "#define IS_SOLARIS\n";
959 if ($config{OSNAME} =~ /CYGWIN/i) {
960 print FILEHANDLE "#define IS_CYGWIN\n";
961 print FILEHANDLE "#ifndef FD_SETSIZE\n#define FD_SETSIZE 1024\n#endif\n";
963 if ($config{OSNAME} =~ /MINGW32/i) {
964 print FILEHANDLE "#define IS_MINGW\n";
966 if ($config{OSNAME} =~ /CYG-STATIC/i) {
967 print FILEHANDLE "#ifndef FD_SETSIZE\n#define FD_SETSIZE 1024\n#endif\n";
969 if ($config{STATIC_LINK} eq "yes") {
970 print FILEHANDLE "#define STATIC_LINK\n";
972 if ($config{GCCVER} >= 3) {
973 print FILEHANDLE "#define GCC3\n";
975 if ($config{HAS_STRLCPY} eq "true") {
976 print FILEHANDLE "#define HAS_STRLCPY\n";
978 if ($config{HAS_STDINT} eq "true") {
979 print FILEHANDLE "#define HAS_STDINT\n";
981 if ($config{IPV6} =~ /y/i) {
982 print FILEHANDLE "#define IPV6\n";
984 if ($config{SUPPORT_IP6LINKS} =~ /y/i) {
985 print FILEHANDLE "#define SUPPORT_IP6LINKS\n";
988 if (($has_kqueue) && ($config{USE_KQUEUE} eq "y")) {
989 print FILEHANDLE "#define USE_KQUEUE\n";
990 $se = "socketengine_kqueue";
993 if (($has_epoll) && ($config{USE_EPOLL} eq "y")) {
994 print FILEHANDLE "#define USE_EPOLL\n";
995 $se = "socketengine_epoll";
998 # user didn't choose either epoll or select for their OS.
999 # default them to USE_SELECT (ewwy puke puke)
1001 print FILEHANDLE "#define USE_SELECT\n";
1002 $se = "socketengine_select";
1004 print FILEHANDLE "\n#endif\n";
1010 open(FILEHANDLE, ">include/inspircd_se_config.h");
1011 print FILEHANDLE <<EOF;
1012 /* Auto generated by configure, do not modify or commit to svn! */
1013 #ifndef __CONFIGURATION_SOCKETENGINE__
1014 #define __CONFIGURATION_SOCKETENGINE__
1024 # Create a Modules List..
1026 foreach $i (@modlist)
1028 if ($config{STATIC_LINK} eq "yes") {
1029 $modules .= "m_".$i.".o ";
1032 $modules .= "m_".$i.".so ";
1035 chomp($modules); # Remove Redundant whitespace..
1037 opendir(DIRHANDLE, "src/modules");
1038 foreach $name (sort readdir(DIRHANDLE)) {
1039 if ($name =~ /^m_(.+?)$/) {
1040 if (opendir(MDIRHANDLE, "src/modules/$name") != 0) {
1041 closedir(MDIRHANDLE);
1042 $modules .= "$name.so ";
1046 closedir(DIRHANDLE);
1049 # Write all .in files.
1052 my $exe = "inspircd";
1054 if ($config{OSNAME} =~ /CYGWIN/i) {
1055 $exe = "inspircd.exe";
1058 opendir(DIRHANDLE, $this);
1060 # Do this once here, and cache it in the .*.inc files,
1061 # rather than attempting to read src/version.sh from
1062 # compiled code -- we might not have the source to hand.
1063 # Fix for bug#177 by Brain.
1065 chomp(my $version = `sh ./src/version.sh`);
1066 chomp(my $revision = getrevision());
1067 $version = "$version(r$revision)";
1069 # We can actually parse any file starting with . and ending with .inc,
1070 # but right now we only parse .inspircd.inc to form './inspircd'
1072 foreach $name (sort readdir(DIRHANDLE)) {
1073 if ($name =~ /^\.(.+)\.inc$/) {
1075 # All .name.inc files need parsing!
1077 open(FILEHANDLE, ".$file.inc");
1078 while (<FILEHANDLE>) {
1083 $tmp =~ s/\@CC\@/$config{CC}/;
1084 $tmp =~ s/\@MAKEPROG\@/$config{MAKEPROG}/;
1085 $tmp =~ s/\@FLAGS\@/$config{FLAGS}/;
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/\@MODULES\@/$modules/;
1093 $tmp =~ s/\@EXECUTABLE\@/$exe/;
1094 $tmp =~ s/\@MAKEORDER\@/$config{MAKEORDER}/;
1095 $tmp =~ s/\@STATICLIBS\@/$config{STATICLIBS}/;
1096 $tmp =~ s/\@IS_DARWIN\@/$config{IS_DARWIN}/;
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{OSNAME} =~ /darwin/) {
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)
1523 foreach my $cmd (@cmdlist) {
1532 CMD_OBJS = \$(CMD_SRC:.cpp=.o)
1534 CPPFILES_OBJS = \$(RELCPPFILES:.cpp=.o)
1536 CMD_LINK_OBJS = \$(CMD_OBJS:.o=.so)
1540 if ($config{OSNAME} =~ /darwin/) {
1542 all: \$(CPPFILES_OBJS) \$(CMD_OBJS) \$(CMD_LINK_OBJS) libIRCDtimer.dylib libIRCDcull_list.dylib libIRCDuserprocess.dylib libIRCDsocketengine.dylib libIRCDsocket.dylib libIRCDhash.dylib libIRCDchannels.dylib libIRCDmode.dylib libIRCDxline.dylib libIRCDstring.dylib libIRCDasyncdns.dylib libIRCDbase.dylib libIRCDconfigreader.dylib libIRCDinspsocket.dylib libIRCDcommands.dylib libIRCDdynamic.dylib libIRCDusers.dylib libIRCDmodules.dylib libIRCDwildcard.dylib libIRCDhelper.dylib libIRCDcommand_parse.dylib libIRCDsnomasks.dylib inspircd
1544 inspircd: inspircd.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/channels.h ../include/globals.h ../include/inspircd_config.h ../include/socket.h \$(CPPFILES_OBJS) \$(CMD_OBJS) \$(CMD_LINK_OBJS) libIRCDtimer.dylib libIRCDcull_list.dylib libIRCDuserprocess.dylib libIRCDsocketengine.dylib libIRCDsocket.dylib libIRCDhash.dylib libIRCDchannels.dylib libIRCDmode.dylib libIRCDxline.dylib libIRCDstring.dylib libIRCDasyncdns.dylib libIRCDbase.dylib libIRCDconfigreader.dylib libIRCDinspsocket.dylib libIRCDsnomasks.dylib libIRCDcommands.dylib libIRCDdynamic.dylib libIRCDusers.dylib libIRCDmodules.dylib libIRCDwildcard.dylib libIRCDhelper.dylib libIRCDcommand_parse.dylib
1545 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspircd.cpp
1546 \$(CC) -pipe -dynamic -L. -o inspircd \$(LDLIBS) inspircd.o libIRCDchannels.dylib libIRCDmode.dylib libIRCDxline.dylib libIRCDstring.dylib libIRCDasyncdns.dylib libIRCDbase.dylib libIRCDconfigreader.dylib libIRCDinspsocket.dylib libIRCDcommands.dylib libIRCDdynamic.dylib libIRCDusers.dylib libIRCDmodules.dylib libIRCDwildcard.dylib libIRCDhelper.dylib libIRCDhash.dylib libIRCDsocket.dylib libIRCDsocketengine.dylib libIRCDuserprocess.dylib libIRCDcull_list.dylib libIRCDcommand_parse.dylib libIRCDtimer.dylib libIRCDsnomasks.dylib
1548 libIRCDsocketengine.dylib: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
1549 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp $se.cpp
1550 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDsocketengine.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDsocketengine.dylib socketengine.o $se.o
1552 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
1553 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp
1554 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDsnomasks.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDsnomasks.dylib snomasks.o
1556 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
1557 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c command_parse.cpp
1558 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDcommand_parse.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDcommand_parse.dylib command_parse.o
1560 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
1561 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cull_list.cpp
1562 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDcull_list.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDcull_list.dylib cull_list.o
1564 libIRCDuserprocess.dylib: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h
1565 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c userprocess.cpp
1566 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDuserprocess.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDuserprocess.dylib userprocess.o
1568 libIRCDhash.dylib: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1569 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp
1570 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDhash.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDhash.dylib hashcomp.o
1572 libIRCDhelper.dylib: helperfuncs.cpp ../include/base.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1573 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
1574 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDhelper.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDhelper.dylib helperfuncs.o
1576 libIRCDchannels.dylib: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1577 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp
1578 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDchannels.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDchannels.dylib channels.o
1580 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)
1581 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp
1582 \${MAKE} -C "modes" DIRNAME="src/modes" CC="\$(CC)" \$(MAKEARGS) CPPFILES="\$(CPPFILES)"
1583 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDmode.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDmode.dylib mode.o modes/modeclasses.a
1585 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
1586 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c xline.cpp
1587 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDxline.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDxline.dylib xline.o
1589 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
1590 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspstring.cpp
1591 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDstring.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDstring.dylib inspstring.o
1593 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
1594 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dns.cpp
1595 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDasyncdns.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDasyncdns.dylib dns.o
1597 libIRCDbase.dylib: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h
1598 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp
1599 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDbase.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDbase.dylib base.o
1601 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
1602 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
1603 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDconfigreader.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDconfigreader.dylib configreader.o
1605 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
1606 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp
1607 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDcommands.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDcommands.dylib commands.o
1609 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
1610 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dynamic.cpp
1611 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDdynamic.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDdynamic.dylib dynamic.o
1613 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
1614 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c users.cpp
1615 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDusers.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDusers.dylib users.o
1617 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
1618 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c modules.cpp
1619 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDmodules.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDmodules.dylib modules.o
1621 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
1622 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c wildcard.cpp
1623 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDwildcard.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDwildcard.dylib wildcard.o
1625 libIRCDsocket.dylib: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1626 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp
1627 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDsocket.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDsocket.dylib socket.o
1629 libIRCDinspsocket.dylib: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1630 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspsocket.cpp
1631 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDinspsocket.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDinspsocket.dylib inspsocket.o
1633 libIRCDtimer.dylib: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1634 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c timer.cpp
1635 \$(CC) -pipe -install_name $config{LIBRARY_DIR}/libIRCDtimer.dylib -dynamiclib -twolevel_namespace -undefined dynamic_lookup -o libIRCDtimer.dylib timer.o
1642 all: \$(CPPFILES_OBJS) \$(CMD_OBJS) \$(CMD_LINK_OBJS) libIRCDtimer.so libIRCDcull_list.so libIRCDuserprocess.so libIRCDsocketengine.so libIRCDsocket.so libIRCDhash.so libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDcommand_parse.so libIRCDsnomasks.so inspircd
1644 inspircd: inspircd.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/channels.h ../include/globals.h ../include/inspircd_config.h ../include/socket.h \$(CPPFILES_OBJS) \$(CMD_OBJS) \$(CMD_LINK_OBJS) libIRCDtimer.so libIRCDcull_list.so libIRCDuserprocess.so libIRCDsocketengine.so libIRCDsocket.so libIRCDhash.so libIRCDchannels.so libIRCDmode.so libIRCDxline.so libIRCDstring.so libIRCDasyncdns.so libIRCDbase.so libIRCDconfigreader.so libIRCDinspsocket.so libIRCDsnomasks.so libIRCDcommands.so libIRCDdynamic.so libIRCDusers.so libIRCDmodules.so libIRCDwildcard.so libIRCDhelper.so libIRCDcommand_parse.so
1645 \$(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
1647 libIRCDsocketengine.so: $se.cpp socketengine.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h ../include/$se.h
1648 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socketengine.cpp $se.cpp
1649 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsocketengine.so socketengine.o $se.o
1651 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
1652 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c snomasks.cpp
1653 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsnomasks.so snomasks.o
1655 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
1656 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c command_parse.cpp
1657 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommand_parse.so command_parse.o
1659 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
1660 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cull_list.cpp
1661 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcull_list.so cull_list.o
1663 libIRCDuserprocess.so: userprocess.cpp ../include/base.h ../include/hashcomp.h ../include/globals.h ../include/inspircd_config.h
1664 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c userprocess.cpp
1665 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDuserprocess.so userprocess.o
1667 libIRCDhash.so: hashcomp.cpp ../include/base.h ../include/hashcomp.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1668 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c hashcomp.cpp
1669 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDhash.so hashcomp.o
1671 libIRCDhelper.so: helperfuncs.cpp ../include/base.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1672 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c helperfuncs.cpp
1673 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDhelper.so helperfuncs.o
1675 libIRCDchannels.so: channels.cpp ../include/base.h ../include/channels.h ../include/inspircd.h ../include/users.h ../include/globals.h ../include/inspircd_config.h
1676 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c channels.cpp
1677 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDchannels.so channels.o
1679 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)
1680 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c mode.cpp
1681 \${MAKE} -C "modes" DIRNAME="src/modes" CC="\$(CC)" \$(MAKEARGS) CPPFILES="\$(CPPFILES)"
1682 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmode.so mode.o modes/modeclasses.a
1684 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
1685 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c xline.cpp
1686 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDxline.so xline.o
1688 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
1689 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspstring.cpp
1690 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDstring.so inspstring.o
1692 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
1693 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dns.cpp
1694 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDasyncdns.so dns.o
1696 libIRCDbase.so: base.cpp ../include/base.h ../include/globals.h ../include/inspircd_config.h
1697 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c base.cpp
1698 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDbase.so base.o
1700 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
1701 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c configreader.cpp
1702 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDconfigreader.so configreader.o
1704 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
1705 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c commands.cpp
1706 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDcommands.so commands.o
1708 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
1709 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c dynamic.cpp
1710 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDdynamic.so dynamic.o
1712 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
1713 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c users.cpp
1714 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDusers.so users.o
1716 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
1717 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c modules.cpp
1718 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDmodules.so modules.o
1720 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
1721 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c wildcard.cpp
1722 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDwildcard.so wildcard.o
1724 libIRCDsocket.so: socket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h
1725 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c socket.cpp
1726 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDsocket.so socket.o
1728 libIRCDinspsocket.so: inspsocket.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1729 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c inspsocket.cpp
1730 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDinspsocket.so inspsocket.o
1732 libIRCDtimer.so: timer.cpp ../include/base.h ../include/inspircd.h ../include/globals.h ../include/inspircd_config.h ../include/timer.h
1733 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c timer.cpp
1734 \$(CC) -pipe -Wl,--rpath -Wl,$config{LIBRARY_DIR} -shared -o libIRCDtimer.so timer.o
1741 foreach my $cmd (@cmdlist) {
1743 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
1744 \$(CC) -pipe -I../include \$(FLAGS) -export-dynamic -c cmd_$cmd.cpp
1745 \$(CC) -pipe $SHARED -o cmd_$cmd.so cmd_$cmd.o