X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Fcalcdep.pl;h=65e19773e0e29fe1c08d84b408a59954464f8750;hb=42b7f65a06e9307bf18deff2837535730b895d4a;hp=5130388430949a3b0509e1c96c327013c532f3c4;hpb=70faab99c83a9ee13cdbe84118e391ed9d5f5a9f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/make/calcdep.pl b/make/calcdep.pl index 513038843..65e19773e 100755 --- a/make/calcdep.pl +++ b/make/calcdep.pl @@ -85,6 +85,12 @@ END my $out = find_output $file; dep_cpp $file, $out, 'gen-o'; next if $file =~ m#^socketengines/# && $file ne "socketengines/socketengine_$ENV{SOCKETENGINE}.cpp"; + # Having a module in the src directory is a bad idea because it will be linked to the core binary + if ($file =~ /^(m|core)_.*\.cpp/) { + my $correctsubdir = ($file =~ /^m_/ ? "modules" : "coremods"); + print "Error: module $file is in the src directory, put it in src/$correctsubdir instead!\n"; + exit 1; + } push @core_deps, $out; } @@ -250,7 +256,7 @@ sub dep_dir($$) { if (@ofiles) { my $ofiles = join ' ', @ofiles; print MAKE "$outdir.so: $ofiles\n"; - print MAKE "\t@\$(SOURCEPATH)/make/unit-cc.pl link-dir\$(VERBOSE) \$\@ \$^ \$>\n"; + print MAKE "\t@\$(SOURCEPATH)/make/unit-cc.pl link-dir\$(VERBOSE) \$\@ ${\SOURCEPATH}/src/$dir \$^ \$>\n"; return 1; } else { return 0;