#!/usr/bin/perl # This is for Anope IRC Services # It lets you compile a module without recompiling the services, ect $file = $ARGV[0]; $compiled = $file; $modname = $file; $modname =~ s/\.c//; $compiled =~ s/\.c/\.o/; $shared = $compiled; $shared =~ s/\.o/\.so/; print "*** Compiling ".$modname."...\n"; system("gcc -pipe -g -O2 -I/usr/include/mysql -I/home/ircd/anope-1.7.13/include -pthread -export-dynamic -g -rdynamic -Wall -fPIC -DPIC -shared -c ".$file); if (-e $compiled) { system("gcc -shared ".$compiled." -o ".$shared); unlink($compiled); system("gzip -9 $file"); print "*** $modname compiled successfuly.\n"; } else { print "*** Failed to compile ".$modname."... Sorry ~.~\n"; }