source: svn/trunk/newcon3bcm2_21bu/BSEAV/api/build/proxy/bapi_build.pl

Last change on this file was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 2.3 KB
Line 
1#!/usr/bin/perl
2#############################################################################
3#
4#               Copyright (c) 2003-2007, Broadcom Corporation.
5#               All rights reserved.
6#               Confidential Property of Broadcom Corporation.
7#
8#  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
9#  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
10#  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
11#
12# $brcm_Workfile: bapi_build.pl $
13# $brcm_Revision: 3 $
14# $brcm_Date: 7/9/07 1:30p $
15#
16# File Description:
17#
18# Revision History:
19#
20# $brcm_Log: /BSEAV/api/build/proxy/bapi_build.pl $
21#
22# 3   7/9/07 1:30p erickson
23# PR32377: autogen the thunk layer
24#
25# 2   3/10/06 10:49a erickson
26# PR17108: added warning to capture incorrect execution
27#
28# 1   2/7/05 6:55p dlwin
29# Merge down for release 2005_REFSW_MERGETOMAIN:
30#
31# Irvine_BSEAVSW_Devel/2   8/12/04 9:28a erickson
32# PR11135: reworked bhandle_mgr autogen code to be data driven and close
33# down in correct order
34#
35# Irvine_BSEAVSW_Devel/1   5/17/04 11:14a erickson
36# PR11135: added initial linux proxy impl
37#
38#############################################################################
39use strict;
40
41use bapi_parse_c;
42use bapi_ioctl_def;
43use bapi_usercall;
44use bapi_driver_ioctl;
45use bapi_thunks;
46
47my $file;
48my @funcs;
49
50if ($#ARGV == -1) {
51        print "You must run autogen to build proxy layer\n";
52        return 1;
53}
54
55# Process all files on the command line
56for $file (@ARGV) {
57        push @funcs, bapi_parse_c::get_func_prototypes $file;
58}
59
60# Build the perl datastructure
61my @funcrefs = bapi_parse_c::parse_funcs @funcs;
62
63# Print out the perl datastructure
64#bapi_parse_c::print_api @funcrefs;
65
66print "Autogenerating code...\n";
67
68# Build kernelmode proxy layer for Settop API
69bapi_ioctl_def::parse "bsettop_autogen_ioctl.h", @funcrefs;
70bapi_usercall::parse "bsettop_autogen_usercall.c", @funcrefs;
71bapi_driver_ioctl::parse "bsettop_autogen_driver.c", @funcrefs;
72bapi_driver_ioctl::build_closelist "bsettop_autogen_closelist.c", @funcrefs;
73
74# Build thunk layer for Settop API
75bapi_thunks::build_thunks "bsettop_autogen_thunks.c", @funcrefs;
76bapi_thunks::build_remapping "bsettop_autogen_thunks.h", @funcrefs;
77
78# Build Linux kernel driver export list
79bapi_thunks::build_kernel_export "bsettop_autogen_kernel_export.c", @funcrefs;
80
81print "Done\n";
Note: See TracBrowser for help on using the repository browser.