def compile_arm(file_name, task_id):
    make_path = getmakepath(file_name)

    # clear make_component
    build_path = os.path.join(make_path, 'make_component')
    SysUtils.rm_filepath(build_path)

    ret = os.chdir(make_path)

    # cmd = 'CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ AR=arm-linux-gnueabihf-ar RANLIB=arm-linux-gnueabihf-ranlib ./Configure no-asm shared    --prefix=/usr/local/arm/openssl    linux-armv4'
    CC = 'CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ AR=arm-linux-gnueabihf-ar RANLIB=arm-linux-gnueabihf-ranlib ./Configure no-asm shared    --prefix='
    cmd = CC + build_path + ' linux-armv4'
    os.system(cmd)
    print(cmd)

    # 先清数据,防止再次编译时ERROR
    cmd = 'make clean'
    process, exit_code = runcmd(cmd, make_path, task_id)
    if exit_code != 0:
        return build_path, exit_code
    cmd = 'make'
    process, exit_code = runcmd(cmd, make_path, task_id)
    if exit_code != 0:
        return build_path, exit_code

    cmd = 'make install'
    process, exit_code = runcmd(cmd, make_path, task_id)

    return build_path, exit_code
def compile_x86(file_name, task_id):
    make_path = getmakepath(file_name)

    # cmd = './config && make'
    # cmd = './config'
    # clear make_component
    build_path = os.path.join(make_path, 'make_component')
    SysUtils.rm_filepath(build_path)

    if 'httpd' in file_name:
        cmd = './configure --prefix=' + build_path + ' --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/'
    else:
        # 指定生成的目录,方便将新生成文件进行入库操作
        cmd = './config --prefix=' + build_path

    process, exit_code = runcmd(cmd, make_path, task_id)
    if exit_code != 0:
        return build_path, exit_code

    # 先清数据,防止再次编译时ERROR
    cmd = 'make clean'
    process, exit_code = runcmd(cmd, make_path, task_id)
    if exit_code != 0:
        return build_path, exit_code

    cmd = 'make'
    process, exit_code = runcmd(cmd, make_path, task_id)
    if exit_code != 0:
        return build_path, exit_code

    cmd = 'make install'
    process, exit_code = runcmd(cmd, make_path, task_id)

    return build_path, exit_code