go_otg.bat 7.27 KB
@echo off
rem HEADER******************************************************************
rem ************************************************************************
rem *** 
rem *** Copyright (c) 1989-2002 ARC International.
rem *** All rights reserved                                          
rem ***                                                              
rem *** This software embodies materials and concepts which are      
rem *** confidential to ARC International and is made
rem *** available solely pursuant to the terms of a written license   
rem *** agreement with ARC International             
rem ***
rem *** $Workfile: go_otg.bat$
rem *** $Revision: 1.1 $
rem *** $Date: 2003/02/17 20:49:00 $
rem ***
rem *** Description:      
rem ***  This file contains the command lines required to build the
rem ***  USB 1.1 OTG library.
rem ************************************************************************
rem *END********************************************************************

if not exist ..\lib\otg\aa3.met mkdir ..\lib\otg\aa3.met
cd ..\lib\otg\aa3.met

echo -arc8 -g -O -c -D__USB_OTG__ -D__VUSB32__ -D__VUSB32_BDT_HACK__> otg_lib.cmd

echo -I ..\..\..\source\include >> otg_lib.cmd
echo -I ..\..\..\source\host\include >> otg_lib.cmd
echo -I ..\..\..\source\host\vusbh32 >> otg_lib.cmd
echo -I %usb_compiler_root%\inc >> otg_lib.cmd

echo -I ..\..\..\source\include >> otg_lib.cmd
echo -I ..\..\..\source\device\include >> otg_lib.cmd
echo -I ..\..\..\source\device\vusbd32 >> otg_lib.cmd
echo -I %usb_compiler_root%\inc >> otg_lib.cmd

echo -I ..\..\..\source\include >> otg_lib.cmd
echo -I ..\..\..\source\otg\include >> otg_lib.cmd
echo -I ..\..\..\source\otg\vusbo32 >> otg_lib.cmd
echo -I %usb_compiler_root%\inc >> otg_lib.cmd

echo hcarc ..\..\..\source\otg\otgapi.c > errors
if exist otgapi.o del otgapi.o
@echo on
hcarc ..\..\..\source\otg\otgapi.c @otg_lib.cmd >> errors
@echo off
REM redirect with one > to erase and write file.
echo otgapi.o > otg_lib.cfn

echo hcarc ..\..\..\source\otg\vusbo32\vusbo11.c >> errors
if exist vusbo11.o del vusbo11.o
@echo on
hcarc ..\..\..\source\otg\vusbo32\vusbo11.c @otg_lib.cmd >> errors
@echo off
echo vusbo11.o >> otg_lib.cfn


echo hcarc ..\..\..\source\arc.c > errors
if exist arc.o del arc.o
@echo on
hcarc ..\..\..\source\arc.c @otg_lib.cmd >> errors
@echo off
echo arc.o >> otg_lib.cfn

REM copy include files

copy ..\..\..\source\otg\include\otgapi.h
copy ..\..\..\source\include\types.h
copy ..\..\..\source\include\arc.h
copy ..\..\..\source\include\usb.h

REM Build Host files

echo hcarc ..\..\..\source\host\host_mnd.c >> errors
if exist host_mnd.o del host_mnd.o
@echo on
hcarc ..\..\..\source\host\host_mnd.c @otg_lib.cmd >> errors
@echo off
echo host_mnd.o >> otg_lib.cfn

echo hcarc ..\..\..\source\host\host_shu.c >> errors
if exist host_shu.o del host_shu.o
@echo on
hcarc ..\..\..\source\host\host_shu.c @otg_lib.cmd >> errors
@echo off
echo host_shu.o >> otg_lib.cfn

echo hcarc ..\..\..\source\host\host_cnl.c >> errors
if exist host_cnl.o del host_cnl.o
@echo on
hcarc ..\..\..\source\host\host_cnl.c @otg_lib.cmd >> errors
@echo off
echo host_cnl.o >> otg_lib.cfn

echo hcarc ..\..\..\source\host\host_snd.c >> errors
if exist host_snd.o del host_snd.o
@echo on
hcarc ..\..\..\source\host\host_snd.c @otg_lib.cmd >> errors
@echo off
echo host_snd.o >> otg_lib.cfn

echo hcarc ..\..\..\source\host\host_rcv.c >> errors
if exist host_rcv.o del host_rcv.o
@echo on
hcarc ..\..\..\source\host\host_rcv.c @otg_lib.cmd >> errors
@echo off
echo host_rcv.o >> otg_lib.cfn

echo hcarc ..\..\..\source\host\host_din.c >> errors
if exist host_din.o del host_din.o
@echo on
hcarc ..\..\..\source\host\host_din.c @otg_lib.cmd >> errors
@echo off
echo host_din.o >> otg_lib.cfn

echo hcarc ..\..\..\source\host\host_unr.c >> errors
if exist host_unr.o del host_unr.o
@echo on
hcarc ..\..\..\source\host\host_unr.c @otg_lib.cmd >> errors
@echo off
echo host_unr.o >> otg_lib.cfn

echo hcarc ..\..\..\source\host\vusbh32\vusbh11ma.c >> errors
if exist vusbd11ma.o del vusbd11ma.o
@echo on
hcarc ..\..\..\source\host\vusbh32\vusbh11ma.c @otg_lib.cmd >> errors
@echo off
echo vusbh11ma.o >> otg_lib.cfn

echo hcarc ..\..\..\source\host\vusbh32\vusbh11sh.c >> errors
if exist vusbd11sh.o del vusbd11sh.o
@echo on
hcarc ..\..\..\source\host\vusbh32\vusbh11sh.c @otg_lib.cmd >> errors
@echo off
echo vusbh11sh.o >> otg_lib.cfn

copy ..\..\..\source\host\include\hostapi.h

REM Build Device files

echo hcarc ..\..\..\source\device\dev_mand.c >> errors
if exist dev_mand.o del dev_mand.o
@echo on
hcarc ..\..\..\source\device\dev_mand.c @otg_lib.cmd >> errors
@echo off
echo dev_mand.o >> otg_lib.cfn

echo hcarc ..\..\..\source\device\dev_shut.c >> errors
if exist dev_shut.o del dev_shut.o
@echo on
hcarc ..\..\..\source\device\dev_shut.c @otg_lib.cmd >> errors
@echo off
echo dev_shut.o >> otg_lib.cfn

echo hcarc ..\..\..\source\device\dev_unrg.c >> errors
if exist dev_unrg.o del dev_unrg.o
@echo on
hcarc ..\..\..\source\device\dev_unrg.c @otg_lib.cmd >> errors
@echo off
echo dev_unrg.o >> otg_lib.cfn

echo hcarc ..\..\..\source\device\dev_snd.c >> errors
if exist dev_snd.o del dev_snd.o
@echo on
hcarc ..\..\..\source\device\dev_snd.c @otg_lib.cmd >> errors
@echo off
echo dev_snd.o >> otg_lib.cfn

echo hcarc ..\..\..\source\device\dev_sts.c >> errors
if exist dev_sts.o del dev_sts.o
@echo on
hcarc ..\..\..\source\device\dev_sts.c @otg_lib.cmd >> errors
@echo off
echo dev_sts.o >> otg_lib.cfn

echo hcarc ..\..\..\source\device\dev_dini.c >> errors
if exist dev_dini.o del dev_dini.o
@echo on
hcarc ..\..\..\source\device\dev_dini.c @otg_lib.cmd >> errors
@echo off
echo dev_dini.o >> otg_lib.cfn

echo hcarc ..\..\..\source\device\dev_cncl.c >> errors
if exist dev_cncl.o del dev_cncl.o
@echo on
hcarc ..\..\..\source\device\dev_cncl.c @otg_lib.cmd >> errors
@echo off
echo dev_cncl.o >> otg_lib.cfn

echo hcarc ..\..\..\source\device\vusbd32\vusbd11ma.c >> errors
if exist vusbd11ma.o del vusbd11ma.o
@echo on
hcarc ..\..\..\source\device\vusbd32\vusbd11ma.c @otg_lib.cmd >> errors
@echo off
echo vusbd11ma.o >> otg_lib.cfn

echo hcarc ..\..\..\source\device\vusbd32\vusbd11sh.c >> errors
if exist vusbd11sh.o del vusbd11sh.o
@echo on
hcarc ..\..\..\source\device\vusbd32\vusbd11sh.c @otg_lib.cmd >> errors
@echo off
echo vusbd11sh.o >> otg_lib.cfn

echo hcarc ..\..\..\source\device\vusbd32\vusbd11un.c >> errors
if exist vusbd11un.o del vusbd11un.o
@echo on
hcarc ..\..\..\source\device\vusbd32\vusbd11un.c @otg_lib.cmd >> errors
@echo off
echo vusbd11un.o >> otg_lib.cfn

echo hcarc ..\..\..\source\device\vusbd32\vusbd11st.c >> errors
if exist vusbd11st.o del vusbd11st.o
@echo on
hcarc ..\..\..\source\device\vusbd32\vusbd11st.c @otg_lib.cmd >> errors
@echo off
echo vusbd11st.o >> otg_lib.cfn

echo hcarc ..\..\..\source\device\vusbd32\vusbd11di.c >> errors
if exist vusbd11di.o del vusbd11di.o
@echo on
hcarc ..\..\..\source\device\vusbd32\vusbd11di.c @otg_lib.cmd >> errors
@echo off
echo vusbd11di.o >> otg_lib.cfn

copy ..\..\..\source\device\include\devapi.h

@echo on
ararc -rvs usbotg.a @otg_lib.cfn
ararc -t usbotg.a > usbotg.lst
@echo off

del otg_lib.cmd
del otg_lib.cfn

cd ..\..\..\build