summaryrefslogtreecommitdiff
path: root/make/unit-cc.pl
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-03-18 15:14:31 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-03-18 15:14:31 +0000
commit7cb909b0f3378b7f8f7e2e2fe067685c9e788f6c (patch)
treea83b537d34e2f42c8d8906d0ebdb70f4030e8dfb /make/unit-cc.pl
parentd1dae54d89444e23cff2a96d020010415c548e3d (diff)
PURE_STATIC fixes to use normal <module> tags
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12641 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'make/unit-cc.pl')
-rwxr-xr-xmake/unit-cc.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/make/unit-cc.pl b/make/unit-cc.pl
index e64053b66..aefefa4ac 100755
--- a/make/unit-cc.pl
+++ b/make/unit-cc.pl
@@ -29,6 +29,10 @@ my $cflags = $ENV{CXXFLAGS};
$cflags =~ s/ -pedantic// if nopedantic($file);
$cflags .= ' ' . getcompilerflags($file);
+if ($file =~ m#(?:^|/)((?:m|cmd)_[^/. ]+)(?:\.cpp|/.*\.cpp)$#) {
+ $cflags .= ' -DMODNAME='.$1.'.so';
+}
+
my $flags;
if ($out =~ /\.so$/) {
$flags = join ' ', $cflags, $ENV{PICLDFLAGS}, getlinkerflags($file);