X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Fcalcdep.pl;h=5dc0f687821094c8b8e5cadbcb6d67b93ea22fa3;hb=2d50984185c7902d37783a98f19637c86694a452;hp=3b4ae6b0d7041b3f149489f847504bdcd0330289;hpb=c83ce753688bde7b6106acf2de44c3cf29b30a7e;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/make/calcdep.pl b/make/calcdep.pl index 3b4ae6b0d..5dc0f6878 100755 --- a/make/calcdep.pl +++ b/make/calcdep.pl @@ -59,11 +59,7 @@ sub run() { open MAKE, '>real.mk' or die "Could not write real.mk: $!"; chdir "${\SOURCEPATH}/src"; - if ($ENV{INSPIRCD_STATIC}) { - run_static(); - } else { - run_dynamic(); - } + run_dynamic(); close MAKE; } @@ -83,7 +79,7 @@ all: inspircd modules END my(@core_deps, @modlist); - for my $file (<*.cpp>, , , "threadengines/threadengine_pthread.cpp") { + for my $file (<*.cpp>, , "threadengines/threadengine_pthread.cpp") { my $out = find_output $file; dep_cpp $file, $out, 'gen-o'; next if $file =~ m#^socketengines/# && $file ne "socketengines/socketengine_$ENV{SOCKETENGINE}.cpp"; @@ -133,56 +129,11 @@ modules: $mods END } -sub run_static() { - print MAKE <, , , , , - , , "threadengines/threadengine_pthread.cpp") { - my $out = find_output $file, 1; - if ($out =~ m#obj/([^/]+)/[^/]+.o$#) { - mkdir "${\BUILDPATH}/obj/$1"; - } - dep_cpp $file, $out, 'gen-o'; - next if $file =~ m#^socketengines/# && $file ne "socketengines/socketengine_$ENV{SOCKETENGINE}.cpp"; - push @deps, $out; - push @srcs, $file; - } - - my $core_mk = join ' ', @deps; - my $core_src = join ' ', @srcs; - print MAKE < - -bin/inspircd: $core_mk obj/ld-extra.cmd - \@\$(SOURCEPATH)/make/unit-cc.pl static-ld \$\@ \$^ \$> - -inspircd: bin/inspircd - -.PHONY: all bad-target inspircd - -END -} - sub find_output { - my($file, $static) = @_; + my $file = shift; my($path,$base) = $file =~ m#^((?:.*/)?)([^/]+)\.cpp# or die "Bad file $file"; if ($path eq 'modules/' || $path eq 'coremods/') { - return $static ? "obj/$base.o" : "modules/$base.so"; + return "modules/$base.so"; } elsif ($path eq '' || $path eq 'modes/' || $path =~ /^[a-z]+engines\/$/) { return "obj/$base.o"; } elsif ($path =~ m#modules/(m_.*)/# || $path =~ m#coremods/(core_.*)/#) {