403Webshell
Server IP : 103.119.228.120  /  Your IP : 3.145.95.233
Web Server : Apache
System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : nobody ( 99)
PHP Version : 5.6.40
Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime
MySQL : ON |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : ON |  Pkexec : ON
Directory :  /usr/local/ssl/local/ssl/share/doc/git-1.8.3.1/contrib/buildsystems/Generators/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/local/ssl/local/ssl/share/doc/git-1.8.3.1/contrib/buildsystems/Generators/QMake.pm
package Generators::QMake;
require Exporter;

use strict;
use vars qw($VERSION);

our $VERSION = '1.00';
our(@ISA, @EXPORT, @EXPORT_OK, @AVAILABLE);
@ISA = qw(Exporter);

BEGIN {
    push @EXPORT_OK, qw(generate);
}

sub generate {
    my ($git_dir, $out_dir, $rel_dir, %build_structure) = @_;

    my @libs = @{$build_structure{"LIBS"}};
    foreach (@libs) {
        createLibProject($_, $git_dir, $out_dir, $rel_dir, %build_structure);
    }

    my @apps = @{$build_structure{"APPS"}};
    foreach (@apps) {
        createAppProject($_, $git_dir, $out_dir, $rel_dir, %build_structure);
    }

    createGlueProject($git_dir, $out_dir, $rel_dir, %build_structure);
    return 0;
}

sub createLibProject {
    my ($libname, $git_dir, $out_dir, $rel_dir, %build_structure) = @_;
    print "Generate $libname lib project\n";
    $rel_dir = "../$rel_dir";

    my $sources = join(" \\\n\t", sort(map("$rel_dir/$_", @{$build_structure{"LIBS_${libname}_SOURCES"}})));
    my $defines = join(" \\\n\t", sort(@{$build_structure{"LIBS_${libname}_DEFINES"}}));
    my $includes= join(" \\\n\t", sort(map("$rel_dir/$_", @{$build_structure{"LIBS_${libname}_INCLUDES"}})));
    my $cflags  = join(" ", sort(@{$build_structure{"LIBS_${libname}_CFLAGS"}}));

    my $cflags_debug = $cflags;
    $cflags_debug =~ s/-MT/-MTd/;
    $cflags_debug =~ s/-O.//;

    my $cflags_release = $cflags;
    $cflags_release =~ s/-MTd/-MT/;

    my @tmp  = @{$build_structure{"LIBS_${libname}_LFLAGS"}};
    my @tmp2 = ();
    foreach (@tmp) {
        if (/^-LTCG/) {
        } elsif (/^-L/) {
            $_ =~ s/^-L/-LIBPATH:$rel_dir\//;
        }
        push(@tmp2, $_);
    }
    my $lflags = join(" ", sort(@tmp));

    my $target = $libname;
    $target =~ s/\//_/g;
    $defines =~ s/-D//g;
    $defines =~ s/"/\\\\"/g;
    $includes =~ s/-I//g;
    mkdir "$target" || die "Could not create the directory $target for lib project!\n";
    open F, ">$target/$target.pro" || die "Could not open $target/$target.pro for writing!\n";
    print F << "EOM";
TEMPLATE = lib
TARGET = $target
DESTDIR = $rel_dir

CONFIG -= qt
CONFIG += static

QMAKE_CFLAGS =
QMAKE_CFLAGS_RELEASE = $cflags_release
QMAKE_CFLAGS_DEBUG = $cflags_debug
QMAKE_LIBFLAGS = $lflags

DEFINES += \\
        $defines

INCLUDEPATH += \\
        $includes

SOURCES += \\
        $sources
EOM
    close F;
}

sub createAppProject {
    my ($appname, $git_dir, $out_dir, $rel_dir, %build_structure) = @_;
    print "Generate $appname app project\n";
    $rel_dir = "../$rel_dir";

    my $sources = join(" \\\n\t", sort(map("$rel_dir/$_", @{$build_structure{"APPS_${appname}_SOURCES"}})));
    my $defines = join(" \\\n\t", sort(@{$build_structure{"APPS_${appname}_DEFINES"}}));
    my $includes= join(" \\\n\t", sort(map("$rel_dir/$_", @{$build_structure{"APPS_${appname}_INCLUDES"}})));
    my $cflags  = join(" ", sort(@{$build_structure{"APPS_${appname}_CFLAGS"}}));

    my $cflags_debug = $cflags;
    $cflags_debug =~ s/-MT/-MTd/;
    $cflags_debug =~ s/-O.//;

    my $cflags_release = $cflags;
    $cflags_release =~ s/-MTd/-MT/;

    my $libs;
    foreach (sort(@{$build_structure{"APPS_${appname}_LIBS"}})) {
        $_ =~ s/\//_/g;
        $libs .= " $_";
    }
    my @tmp  = @{$build_structure{"APPS_${appname}_LFLAGS"}};
    my @tmp2 = ();
    foreach (@tmp) {
        # next if ($_ eq "-NODEFAULTLIB:MSVCRT.lib");
        if (/^-LTCG/) {
        } elsif (/^-L/) {
            $_ =~ s/^-L/-LIBPATH:$rel_dir\//;
        }
        push(@tmp2, $_);
    }
    my $lflags = join(" ", sort(@tmp));

    my $target = $appname;
    $target =~ s/\.exe//;
    $target =~ s/\//_/g;
    $defines =~ s/-D//g;
    $defines =~ s/"/\\\\"/g;
    $includes =~ s/-I//g;
    mkdir "$target" || die "Could not create the directory $target for app project!\n";
    open F, ">$target/$target.pro" || die "Could not open $target/$target.pro for writing!\n";
    print F << "EOM";
TEMPLATE = app
TARGET = $target
DESTDIR = $rel_dir

CONFIG -= qt embed_manifest_exe
CONFIG += console

QMAKE_CFLAGS =
QMAKE_CFLAGS_RELEASE = $cflags_release
QMAKE_CFLAGS_DEBUG = $cflags_debug
QMAKE_LFLAGS = $lflags
LIBS   = $libs

DEFINES += \\
        $defines

INCLUDEPATH += \\
        $includes

win32:QMAKE_LFLAGS += -LIBPATH:$rel_dir
else: QMAKE_LFLAGS += -L$rel_dir

SOURCES += \\
        $sources
EOM
    close F;
}

sub createGlueProject {
    my ($git_dir, $out_dir, $rel_dir, %build_structure) = @_;
    my $libs = join(" \\ \n", map("\t$_|$_.pro", @{$build_structure{"LIBS"}}));
    my $apps = join(" \\ \n", map("\t$_|$_.pro", @{$build_structure{"APPS"}}));
    $libs =~ s/\.a//g;
    $libs =~ s/\//_/g;
    $libs =~ s/\|/\//g;
    $apps =~ s/\.exe//g;
    $apps =~ s/\//_/g;
    $apps =~ s/\|/\//g;

    my $filename = $out_dir;
    $filename =~ s/.*\/([^\/]+)$/$1/;
    $filename =~ s/\/$//;
    print "Generate glue project $filename.pro\n";
    open F, ">$filename.pro" || die "Could not open $filename.pro for writing!\n";
    print F << "EOM";
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += \\
$libs \\
$apps
EOM
    close F;
}

1;

Youez - 2016 - github.com/yon3zu
LinuXploit