diff options
| author | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-02-06 19:18:15 +0000 |
|---|---|---|
| committer | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-02-06 19:18:15 +0000 |
| commit | 9b3a357193a020c53624b29f84e0bca4795722f0 (patch) | |
| tree | be1a500c8a469dad8164a72d1266780ac8c28510 /src | |
| parent | f8ac398b86ea6a26dba62064d9810796466e4118 (diff) | |
BUILD : 1.7.8 (565) BUGS : 293 NOTES : Merge of Win32 branch into the main, support for Unreal +I, German language updated, fixed bug vidents not updating, Setting and Removal of sqlines on forbid or drop
git-svn-id: svn://svn.anope.org/anope/trunk@567 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@417 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
37 files changed, 965 insertions, 157 deletions
diff --git a/src/anope-icon.ico b/src/anope-icon.ico Binary files differnew file mode 100644 index 000000000..b60a7994c --- /dev/null +++ b/src/anope-icon.ico diff --git a/src/bahamut.c b/src/bahamut.c index 5e40a7266..36bd28f6d 100644 --- a/src/bahamut.c +++ b/src/bahamut.c @@ -102,6 +102,7 @@ IRCDVar ircd[] = { 1, /* +I support */ 0, /* SJOIN ban char */ 0, /* SJOIN except char */ + 0, /* SJOIN invite char */ 0, /* Can remove User Channel Modes with SVSMODE */ 0, /* Sglines are not enforced until user reconnects */ NULL, /* vhost char */ @@ -856,6 +857,9 @@ void anope_cmd_pong(char *servname, char *who) void anope_cmd_connect(int servernum) { + me_server = + new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL); + if (servernum == 1) { anope_cmd_pass(RemotePassword); } else if (servernum == 2) { diff --git a/src/base64.c b/src/base64.c index 68fa80b96..0056822bc 100644 --- a/src/base64.c +++ b/src/base64.c @@ -1,6 +1,6 @@ /* base64 routines. * - * (C) 2003-1005 Anope Team + * (C) 2003-2005 Anope Team * Contact us at info@anope.org * * Please read COPYING and README for further details. diff --git a/src/channels.c b/src/channels.c index 78bdbb045..b9ab710ac 100644 --- a/src/channels.c +++ b/src/channels.c @@ -777,14 +777,14 @@ void do_sjoin(const char *source, int ac, char **av) } } - /* Unreal plans to add +I - for now add the hook to allow - 1.7.6 to work with it and not cause problems - TSL */ - if (*s == '\'') { - add_invite(c, myStrGetToken(s, '\'', 1)); - if (!end) - break; - s = end + 1; - continue; + if (ircd->sjoininvchar) { + if (*s == ircd->sjoininvchar) { + add_invite(c, myStrGetToken(s, ircd->sjoininvchar, 1)); + if (!end) + break; + s = end + 1; + continue; + } } while (csmodes[(int) *s] != 0) diff --git a/src/chanserv.c b/src/chanserv.c index affa29519..ce8863133 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -2925,6 +2925,10 @@ static int do_drop(User * u) } } + if (ircd->chansqline && (ci->flags & CI_VERBOTEN)) { + anope_cmd_unsqline(ci->name); + } + alog("%s: Channel %s dropped by %s!%s@%s (founder: %s)", s_ChanServ, ci->name, u->nick, u->username, common_get_vhost(u), @@ -6360,6 +6364,10 @@ static int do_forbid(User * u) "\2%s\2 used FORBID on channel \2%s\2", u->nick, ci->name); + if (ircd->chansqline) { + anope_cmd_sqline(ci->name, ((reason) ? reason : "Forbidden")); + } + alog("%s: %s set FORBID for channel %s", s_ChanServ, u->nick, ci->name); notice_lang(s_ChanServ, u, CHAN_FORBID_SUCCEEDED, chan); diff --git a/src/compat.c b/src/compat.c index 9db98fc0f..b9931ced9 100644 --- a/src/compat.c +++ b/src/compat.c @@ -136,19 +136,27 @@ char *strerror(int errnum) /*************************************************************************/ #if !HAVE_STRSIGNAL +/* Windows only supports 6 signals: + * SIGINT, SIGILL, SIGABRT, SIGFPE, SIGSEGV, SIGTERM + * -- codemastr + */ char *strsignal(int signum) { static char buf[32]; switch (signum) { +#ifndef _WIN32 case SIGHUP: strscpy(buf, "Hangup", sizeof(buf)); break; +#endif case SIGINT: strscpy(buf, "Interrupt", sizeof(buf)); break; +#ifndef _WIN32 case SIGQUIT: strscpy(buf, "Quit", sizeof(buf)); break; +#endif #ifdef SIGILL case SIGILL: strscpy(buf, "Illegal instruction", sizeof(buf)); @@ -172,15 +180,18 @@ char *strsignal(int signum) case SIGFPE: strscpy(buf, "Floating point exception", sizeof(buf)); break; +#ifndef _WIN32 case SIGKILL: strscpy(buf, "Killed", sizeof(buf)); break; case SIGUSR1: strscpy(buf, "User signal 1", sizeof(buf)); break; +#endif case SIGSEGV: strscpy(buf, "Segmentation fault", sizeof(buf)); break; +#ifndef _WIN32 case SIGUSR2: strscpy(buf, "User signal 2", sizeof(buf)); break; @@ -190,9 +201,11 @@ char *strsignal(int signum) case SIGALRM: strscpy(buf, "Alarm clock", sizeof(buf)); break; +#endif case SIGTERM: strscpy(buf, "Terminated", sizeof(buf)); break; +#ifndef _WIN32 case SIGSTOP: strscpy(buf, "Suspended (signal)", sizeof(buf)); break; @@ -202,6 +215,7 @@ char *strsignal(int signum) case SIGIO: strscpy(buf, "I/O error", sizeof(buf)); break; +#endif default: snprintf(buf, sizeof(buf), "Signal %d\n", signum); break; @@ -210,4 +224,25 @@ char *strsignal(int signum) } #endif +#ifdef _WIN32 + +#ifdef USE_THREADS +/* Simulate pthread conditional variable waiting */ +int ano_cond_wait(ano_cond_t cond, ano_mutex_t mutex) +{ + ReleaseMutex(mutex); + if (WaitForSingleObject(cond, INFINITE) == WAIT_FAILED) + return 1; + if (WaitForSingleObject(mutex, INFINITE) == WAIT_FAILED) + return 1; + return 0; +} + +/* Used for the cleanup functions */ +ano_thread_start __declspec(thread) cleanup_func = NULL; + +#endif + +#endif + /*************************************************************************/ diff --git a/src/datafiles.c b/src/datafiles.c index 48f460f8c..72c795952 100644 --- a/src/datafiles.c +++ b/src/datafiles.c @@ -101,7 +101,8 @@ static dbFILE *open_db_read(const char *service, const char *filename) int errno_save = errno; #ifndef NOT_MAIN if (errno != ENOENT) - log_perror("Can't read %s database %s", service, f->filename); + log_perror("Can not read %s database %s", service, + f->filename); #endif free(f); errno = errno_save; @@ -126,16 +127,33 @@ static dbFILE *open_db_write(const char *service, const char *filename, { dbFILE *f; int fd; +#ifdef _WIN32 + char buffer[_MAX_PATH]; + char win32filename[MAXPATHLEN]; + + /* Get the current working directory: */ + if (_getcwd(buffer, _MAX_PATH) == NULL) { + alog("debug: Unable to set Current working directory"); + } +#endif f = scalloc(sizeof(*f), 1); if (!f) { #ifndef NOT_MAIN - log_perror("Can't read %s database %s", service, filename); + log_perror("Can not read %s database %s", service, filename); +#else + alog("Can not read %s database %s", service, filename); #endif return NULL; } strscpy(f->filename, filename, sizeof(f->filename)); +#ifndef _WIN32 filename = f->filename; +#else + snprintf(win32filename, sizeof(win32filename), "%s\\%s", buffer, + f->filename); + filename = win32filename; +#endif f->mode = 'w'; *f->backupname = 0; @@ -150,19 +168,30 @@ static dbFILE *open_db_write(const char *service, const char *filename, errno = errno_save; return NULL; } - unlink(f->backupname); +#ifndef _WIN32 + unlink(filename); +#else + DeleteFile(filename); +#endif f->backupfp = fopen(filename, "rb"); +#ifdef _WIN32 + if (!MoveFileExA(filename, f->backupname, MOVEFILE_COPY_ALLOWED) + && GetLastError() != ENOENT) { + int errno_save = GetLastError(); +#else if (rename(filename, f->backupname) < 0 && errno != ENOENT) { int errno_save = errno; +#endif #ifndef NOT_MAIN static int walloped = 0; if (!walloped) { walloped++; - anope_cmd_global(NULL, "Can't back up %s database %s", service, - filename); + anope_cmd_global(NULL, "Can not back up %s database %s", + service, filename); } + alog("errno %d %d %d", errno, ENOENT, EACCES); errno = errno_save; - log_perror("Can't back up %s database %s", service, filename); + log_perror("Can not back up %s database %s", service, filename); if (!NoBackupOkay) { #endif if (f->backupfp) @@ -175,9 +204,17 @@ static dbFILE *open_db_write(const char *service, const char *filename, #endif *f->backupname = 0; } +#ifndef _WIN32 unlink(filename); +#else + DeleteFile(filename); +#endif /* Use open() to avoid people sneaking a new file in under us */ +#ifndef _WIN32 fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0666); +#else + fd = open(filename, O_WRONLY | O_CREAT | O_EXCL | _O_BINARY, 0666); +#endif f->fp = fdopen(fd, "wb"); /* will fail and return NULL if fd < 0 */ if (!f->fp || !write_file_version(f, version)) { int errno_save = errno; @@ -193,7 +230,11 @@ static dbFILE *open_db_write(const char *service, const char *filename, #endif if (f->fp) { fclose(f->fp); +#ifndef _WIN32 unlink(filename); +#else + DeleteFile(filename); +#endif } if (*f->backupname && rename(f->backupname, filename) < 0) #ifndef NOT_MAIN @@ -283,7 +324,11 @@ void restore_db(dbFILE * f) if (f->backupfp) fclose(f->backupfp); if (*f->backupname) +#ifndef _WIN32 unlink(f->backupname); +#else + DeleteFile(f->backupname); +#endif } fclose(f->fp); if (!errno_save) @@ -306,7 +351,11 @@ void close_db(dbFILE * f) && strcmp(f->backupname, f->filename) != 0) { if (f->backupfp) fclose(f->backupfp); +#ifndef _WIN32 unlink(f->backupname); +#else + DeleteFile(f->backupname); +#endif } fclose(f->fp); free(f); @@ -539,19 +588,47 @@ static void remove_backups(void) strftime(ext, sizeof(ext), "%Y%m%d", &tm); snprintf(path, sizeof(path), "backups/%s.%s", NickDBName, ext); +#ifndef _WIN32 unlink(path); +#else + DeleteFile(path); +#endif snprintf(path, sizeof(path), "backups/%s.%s", BotDBName, ext); +#ifndef _WIN32 unlink(path); +#else + DeleteFile(path); +#endif snprintf(path, sizeof(path), "backups/%s.%s", ChanDBName, ext); +#ifndef _WIN32 unlink(path); +#else + DeleteFile(path); +#endif snprintf(path, sizeof(path), "backups/%s.%s", OperDBName, ext); +#ifndef _WIN32 unlink(path); +#else + DeleteFile(path); +#endif snprintf(path, sizeof(path), "backups/%s.%s", NewsDBName, ext); +#ifndef _WIN32 unlink(path); +#else + DeleteFile(path); +#endif snprintf(path, sizeof(path), "backups/%s.%s", ExceptionDBName, ext); +#ifndef _WIN32 unlink(path); +#else + DeleteFile(path); +#endif snprintf(path, sizeof(path), "backups/%s.%s", HostDBName, ext); +#ifndef _WIN32 unlink(path); +#else + DeleteFile(path); +#endif } /*************************************************************************/ diff --git a/src/dreamforge.c b/src/dreamforge.c index 4193b9df9..8d90704ec 100644 --- a/src/dreamforge.c +++ b/src/dreamforge.c @@ -100,6 +100,7 @@ IRCDVar ircd[] = { 0, /* +I support */ 0, /* SJOIN ban char */ 0, /* SJOIN except char */ + 0, /* SJOIN invite char */ 0, /* Can remove User Channel Modes with SVSMODE */ 0, /* Sglines are not enforced until user reconnects */ NULL, /* vhost char */ @@ -619,6 +620,9 @@ void anope_pong(char *servname) void anope_cmd_connect(int servernum) { + me_server = + new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL); + anope_cmd_capab(); if (servernum == 1) anope_cmd_pass(RemotePassword); diff --git a/src/hybrid.c b/src/hybrid.c index e8ddbe477..8ab40ce4a 100644 --- a/src/hybrid.c +++ b/src/hybrid.c @@ -100,6 +100,7 @@ IRCDVar ircd[] = { 0, /* +I support */ 0, /* SJOIN ban char */ 0, /* SJOIN except char */ + 0, /* SJOIN invite char */ 0, /* Can remove User Channel Modes with SVSMODE */ 0, /* Sglines are not enforced until user reconnects */ NULL, /* vhost char */ @@ -778,6 +779,9 @@ void anope_cmd_svsmode(User * u, int ac, char **av) void anope_cmd_connect(int servernum) { + me_server = + new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL); + if (servernum == 1) anope_cmd_pass(RemotePassword); else if (servernum == 2) diff --git a/src/init.c b/src/init.c index 2b77668eb..e26378dfb 100644 --- a/src/init.c +++ b/src/init.c @@ -440,8 +440,9 @@ int init(int ac, char **av) } /* Read configuration file; exit if there are problems. */ - if (!read_config(0)) + if (!read_config(0)) { return -1; + } /* Add IRCD Message handlers */ moduleAddIRCDMsgs(); @@ -452,7 +453,7 @@ int init(int ac, char **av) /* Parse all remaining command-line options. */ parse_options(ac, av); - /* Detach ourselves if requested. */ +#ifndef _WIN32 if (!nofork) { if ((i = fork()) < 0) { perror("fork()"); @@ -470,6 +471,21 @@ int init(int ac, char **av) return -1; } } +#else + /* Initialize winsocks -- codemastr */ + { + WSADATA wsa; + if (WSAStartup(MAKEWORD(1, 1), &wsa)) { + alog("Failed to initialized WinSock library"); + return -1; + } + } + if (!nofork) { + alog("Launching Anope into the background"); + FreeConsole(); + } +#endif + /* Write our PID to the PID file. */ write_pidfile(); @@ -515,21 +531,27 @@ int init(int ac, char **av) } #endif signal(SIGTERM, sighandler); +#ifndef _WIN32 signal(SIGQUIT, sighandler); +#endif if (!DumpCore) { signal(SIGSEGV, sighandler); +#ifndef _WIN32 signal(SIGBUS, sighandler); - signal(SIGILL, sighandler); signal(SIGTRAP, sighandler); +#endif } else { signal(SIGSEGV, SIG_DFL); - signal(SIGBUS, SIG_DFL); - signal(SIGILL, SIG_DFL); - signal(SIGTRAP, SIG_DFL); +#ifndef _WIN32 + signal(SIGBUS, sighandler); + signal(SIGTRAP, sighandler); +#endif } +#ifndef _WIN32 signal(SIGQUIT, sighandler); signal(SIGHUP, sighandler); signal(SIGUSR2, sighandler); +#endif #ifdef SIGIOT signal(SIGIOT, sighandler); @@ -537,8 +559,10 @@ int init(int ac, char **av) signal(SIGFPE, sighandler); #if !defined(USE_THREADS) || !defined(LINUX20) +#ifndef _WIN32 signal(SIGUSR1, sighandler); /* This is our "out-of-memory" panic switch */ #endif +#endif /* Initialize multi-language support */ lang_init(); @@ -659,15 +683,6 @@ int init(int ac, char **av) alog("Info: Not reflecting database records."); } #endif - /* Make myself known to myself in the serverlist */ - if (UseTS6 && ircd->ts6) { - me_server = - new_server(NULL, ServerName, ServerDesc, SERVER_ISME, TS6SID); - } else { - me_server = - new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL); - } - /* Connect to the remote server */ servsock = conn(RemoteServer, RemotePort, LocalHost, LocalPort); if (servsock < 0 && RemoteServer2) { diff --git a/src/language.c b/src/language.c index a43e03d65..849d7a4a6 100644 --- a/src/language.c +++ b/src/language.c @@ -73,7 +73,11 @@ static void load_lang(int index, const char *filename) index, filename); } snprintf(buf, sizeof(buf), "languages/%s", filename); +#ifndef _WIN32 if (!(f = fopen(buf, "r"))) { +#else + if (!(f = fopen(buf, "rb"))) { +#endif log_perror("Failed to load language %d (%s)", index, filename); return; } else if (read_int32(&num, f) < 0) { @@ -58,7 +58,11 @@ static void remove_log(void) if (!get_logname(name, sizeof(name), &tm)) return; +#ifndef _WIN32 unlink(name); +#else + DeleteFile(name); +#endif } /*************************************************************************/ @@ -314,3 +318,48 @@ void fatal_perror(const char *fmt, ...) } /*************************************************************************/ + +/* Same thing, but do it like perror(). + * This is for socket errors. On *nix, it works just like fatal_perror, + * on Win32, it uses the socket error code and formatting functions. + */ + +void fatal_sockerror(const char *fmt, ...) +{ + va_list args; + time_t t; + struct tm tm; + char buf[256], buf2[4096]; + int errno_save = ano_sockgeterr(); + + checkday(); + + va_start(args, fmt); + time(&t); + tm = *localtime(&t); +#if HAVE_GETTIMEOFDAY + if (debug) { + char *s; + struct timeval tv; + gettimeofday(&tv, NULL); + strftime(buf, sizeof(buf) - 1, "[%b %d %H:%M:%S", &tm); + s = buf + strlen(buf); + s += snprintf(s, sizeof(buf) - (s - buf), ".%06d", tv.tv_usec); + strftime(s, sizeof(buf) - (s - buf) - 1, " %Y] ", &tm); + } else { +#endif + strftime(buf, sizeof(buf) - 1, "[%b %d %H:%M:%S %Y] ", &tm); +#if HAVE_GETTIMEOFDAY + } +#endif + vsnprintf(buf2, sizeof(buf2), fmt, args); + if (logfile) + fprintf(logfile, "%sFATAL: %s: %s\n", buf, buf2, + ano_sockstrerror(errno_save)); + if (stderr) + fprintf(stderr, "%sFATAL: %s: %s\n", buf, buf2, + ano_sockstrerror(errno_save)); + if (servsock >= 0) + wallops(NULL, "FATAL ERROR! %s: %s", buf2, strerror(errno_save)); + exit(1); +} diff --git a/src/main.c b/src/main.c index 6ff76b67f..d75a88f00 100644 --- a/src/main.c +++ b/src/main.c @@ -282,6 +282,7 @@ static void services_shutdown(void) void sighandler(int signum) { if (started) { +#ifndef _WIN32 if (signum == SIGHUP) { /* SIGHUP = save databases and restart */ signal(SIGHUP, SIG_IGN); signal(SIGUSR2, SIG_IGN); @@ -300,7 +301,8 @@ void sighandler(int signum) quitmsg = "Restart attempt failed--SERVICES_BIN not defined (rerun configure)"; #endif - + } else if (signum == SIGQUIT) { + /* had to move it to here to make win32 happy */ } else if (signum == SIGUSR2) { alog("Received SIGUSR2: Saving Databases & Rehash Configuration"); @@ -315,9 +317,13 @@ void sighandler(int signum) } return; - } else if (signum == SIGTERM) { + } else +#endif + if (signum == SIGTERM) { signal(SIGTERM, SIG_IGN); +#ifndef _WIN32 signal(SIGHUP, SIG_IGN); +#endif alog("Received SIGTERM, exiting."); @@ -326,7 +332,6 @@ void sighandler(int signum) quitmsg = "Shutting down on SIGTERM"; services_shutdown(); exit(0); - } else if (signum == SIGINT) { if (nofork) { signal(SIGINT, SIG_IGN); @@ -337,8 +342,6 @@ void sighandler(int signum) services_shutdown(); exit(0); } - } else if (signum == SIGQUIT) { - /* nothing -- terminate below */ } else if (!waiting) { alog("PANIC! buffer = %s", inbuf); /* Cut off if this would make IRC command >510 characters. */ @@ -347,7 +350,7 @@ void sighandler(int signum) inbuf[447] = '>'; inbuf[448] = 0; } - anope_cmd_global(NULL, "PANIC! buffer = %s\r\n", inbuf); + wallops(NULL, "PANIC! buffer = %s\r\n", inbuf); } else if (waiting < 0) { /* This is static on the off-chance we run low on stack */ static char buf[BUFSIZE]; @@ -403,14 +406,13 @@ void sighandler(int signum) default: snprintf(buf, sizeof(buf), "waiting=%d", waiting); } - anope_cmd_global(NULL, "PANIC! %s (%s)", buf, - strsignal(signum)); + wallops(NULL, "PANIC! %s (%s)", buf, strsignal(signum)); alog("PANIC! %s (%s)", buf, strsignal(signum)); } } if ( -#if !defined(USE_THREADS) || !defined(LINUX20) +#if (!defined(USE_THREADS) || !defined(LINUX20)) && !defined(_WIN32) signum == SIGUSR1 || #endif !(quitmsg = calloc(BUFSIZE, 1))) { @@ -599,6 +601,7 @@ int main(int ac, char **av, char **envp) void do_backtrace(int show_segheader) { +#ifndef _WIN32 #ifdef HAVE_BACKTRACE void *array[50]; size_t size; @@ -619,9 +622,9 @@ void do_backtrace(int show_segheader) free(strings); alog("Backtrace: complete"); #else - if (show_segheader) { - alog("Backtrace: Segmentation fault detected"); - } - alog("Backtrace: not available on this system"); + alog("Backtrace: not available on this platform"); +#endif +#else + alog("Backtrace: not available on this windows"); #endif } diff --git a/src/makefile.win32 b/src/makefile.win32 new file mode 100644 index 000000000..e7434cdba --- /dev/null +++ b/src/makefile.win32 @@ -0,0 +1,107 @@ +# Make file for Win32 +# +# (C) 2003-2005 Anope Team +# Contact us at info@anope.org +# +# Please read COPYING and README for further details. +# +# Based on the original code of Epona by Lara. +# Based on the original code of Services by Andy Church. +# +# $Id:$ +# + +# Source Makefile + +include ../Makefile.inc.win32 + +########################################################################### + +OBJS = actions.obj base64.obj botserv.obj channels.obj chanserv.obj commands.obj compat.obj \ + converter.obj config.obj datafiles.obj encrypt.obj helpserv.obj hostserv.obj \ + init.obj language.obj list.obj log.obj mail.obj main.obj memory.obj memoserv.obj \ + messages.obj misc.obj modules.obj news.obj nickserv.obj operserv.obj \ + process.obj proxy.obj send.obj servers.obj sessions.obj slist.obj sockutil.obj \ + timeout.obj users.obj $(RDB_O) $(MYSQL_O) $(CAPAB_O) + +SRCS = actions.c base64.c botserv.c channels.c chanserv.c commands.c compat.c converter.c \ + config.c datafiles.c encrypt.c helpserv.c hostserv.c init.c language.c list.c log.c mail.c main.c \ + memory.c memoserv.c messages.c misc.c modules.c news.c nickserv.c operserv.c \ + process.c proxy.c send.c servers.obj sessions.c slist.c sockutil.c \ + timeout.c users.c $(RDB_C) $(MYSQL_C) $(CAPAB_C) + +########################################################################### + +.c.obj: + $(CC) $(CFLAGS) $(IRCTYPE) -c $< + +all: $(PROGRAM) + +$(PROGRAM): $(OBJS) win32.res + $(CC) $(OBJS) win32.res /link /out:$(PROGRAM) /implib:anope.lib $(LIBS) $(LFLAGS) $(MLIBS) $(ELIBS) + +spotless: + -@erase *.obj *.exe *.exp *.lib tools\*.exe *.res + +install: + -@copy anope.exe ..\anope.exe + -@copy tools\anopesmtp.exe ..\anopesmtp.exe + -@mkdir ..\$(DATDEST)\bin + -@copy bin\* ..\$(DATDEST)\bin + +win32.res: win32.rc + $(RC) /l 0x409 /fowin32.res win32.rc + + +########################################################################### + +# Catch any changes in compilation options at the top of this file +$(OBJS): + +actions.obj: actions.c ..\include\services.h +base64.obj: base64.c ..\include\services.h +botserv.obj: botserv.c ..\include\services.h ..\include\pseudo.h ..\include\language.h +channels.obj: channels.c ..\include\services.h +chanserv.obj: chanserv.c ..\include\services.h ..\include\pseudo.h +commands.obj: commands.c ..\include\services.h ..\include\commands.h ..\include\language.h +compat.obj: compat.c ..\include\services.h +config.obj: config.c ..\include\services.h +converter.obj: converter.c ..\include\services.h ..\include\datafiles.h +datafiles.obj: datafiles.c ..\include\services.h ..\include\datafiles.h +encrypt.obj: encrypt.c ..\include\encrypt.h ..\include\sysconf.h +init.obj: init.c ..\include\services.h +hostserv.obj: hostserv.c ..\include\services.h ..\include\pseudo.h +l |
