qpc/ports/80x86/dos/watcom/l/make.bat

208 lines
8.3 KiB
Batchfile
Raw Normal View History

2012-08-14 18:07:04 -04:00
@echo off
:: ===========================================================================
:: Product: QP/C buld script for 80x86, Vanilla port, Open Watcom compiler
2013-09-30 12:54:30 -04:00
:: Last Updated for Version: 5.1.0
:: Date of the Last Update: Sep 30, 2013
2012-08-14 18:07:04 -04:00
::
:: Q u a n t u m L e a P s
:: ---------------------------
:: innovating embedded systems
::
2013-09-23 14:34:35 -04:00
:: Copyright (C) 2002-2013 Quantum Leaps, LLC. All rights reserved.
2012-08-14 18:07:04 -04:00
::
2013-09-23 14:34:35 -04:00
:: This program is open source software: you can redistribute it and/or
:: modify it under the terms of the GNU General Public License as published
:: by the Free Software Foundation, either version 3 of the License, or
2013-09-23 14:34:35 -04:00
:: (at your option) any later version.
2012-08-14 18:07:04 -04:00
::
2013-09-23 14:34:35 -04:00
:: Alternatively, this program may be distributed and modified under the
2012-08-14 18:07:04 -04:00
:: terms of Quantum Leaps commercial licenses, which expressly supersede
2013-09-23 14:34:35 -04:00
:: the GNU General Public License and are specifically designed for
:: licensees interested in retaining the proprietary status of their code.
::
:: This program is distributed in the hope that it will be useful,
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
:: GNU General Public License for more details.
::
:: You should have received a copy of the GNU General Public License
:: along with this program. If not, see <http://www.gnu.org/licenses/>.
2012-08-14 18:07:04 -04:00
::
:: Contact information:
2013-09-23 14:34:35 -04:00
:: Quantum Leaps Web sites: http://www.quantum-leaps.com
:: http://www.state-machine.com
2012-08-14 18:07:04 -04:00
:: e-mail: info@quantum-leaps.com
:: ===========================================================================
:: If you have defined the WATCOM environment variable, the following line has
:: no effect and your definition is used. However, if the varible WATCOM is
:: not defined, the following default is assuemed:
if "%WATCOM%"=="" set WATCOM=c:\tools\WATCOM
path %WATCOM%\binw
set INCLUDE=%WATCOM%\H
set CC=wcc.exe
set AS=wasm.exe
set LIB=wlib.exe
if not "%1"=="rel" goto spy
echo rel selected
set BINDIR=rel
set CCFLAGS=-d0 -ot @cc_opt.rsp
set ASFLAGS=-fpi87
goto compile
:spy
if not "%1"=="spy" goto dbg
echo spy selected
set BINDIR=spy
set CCFLAGS=-d2 -dQ_SPY @cc_opt.rsp
set ASFLAGS=-fpi87
goto compile
:dbg
echo default selected
set BINDIR=dbg
set CCFLAGS=-d2 @cc_opt.rsp
set ASFLAGS=-fpi87
::===========================================================================
:compile
2013-09-30 12:54:30 -04:00
mkdir %BINDIR%
2012-08-14 18:07:04 -04:00
set LIBDIR=%BINDIR%
:: QEP ----------------------------------------------------------------------
set SRCDIR=..\..\..\..\..\qep\source
set CCINC=@inc_qep.rsp
@echo on
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qep.obj %SRCDIR%\qep.c
2013-09-23 14:34:35 -04:00
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qmsm_ini.obj %SRCDIR%\qmsm_ini.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qmsm_dis.obj %SRCDIR%\qmsm_dis.c
2012-08-14 18:07:04 -04:00
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qfsm_ini.obj %SRCDIR%\qfsm_ini.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qfsm_dis.obj %SRCDIR%\qfsm_dis.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qhsm_ini.obj %SRCDIR%\qhsm_ini.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qhsm_dis.obj %SRCDIR%\qhsm_dis.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qhsm_top.obj %SRCDIR%\qhsm_top.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qhsm_in.obj %SRCDIR%\qhsm_in.c
erase %LIBDIR%\qep.lib
%LIB% -n %LIBDIR%\qep
%LIB% %LIBDIR%\qep +%BINDIR%\qep
2013-09-23 14:34:35 -04:00
%LIB% %LIBDIR%\qep +%BINDIR%\qmsm_ini
%LIB% %LIBDIR%\qep +%BINDIR%\qmsm_dis
2012-08-14 18:07:04 -04:00
%LIB% %LIBDIR%\qep +%BINDIR%\qfsm_ini
%LIB% %LIBDIR%\qep +%BINDIR%\qfsm_dis
%LIB% %LIBDIR%\qep +%BINDIR%\qhsm_ini
%LIB% %LIBDIR%\qep +%BINDIR%\qhsm_dis
%LIB% %LIBDIR%\qep +%BINDIR%\qhsm_top
%LIB% %LIBDIR%\qep +%BINDIR%\qhsm_in
@echo off
:: QF -----------------------------------------------------------------------
set SRCDIR=..\..\..\..\..\qf\source
set CCINC=@inc_qf.rsp
@echo on
2013-09-23 14:34:35 -04:00
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qa_ctor.obj %SRCDIR%\qa_ctor.c
2012-08-14 18:07:04 -04:00
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qa_defer.obj %SRCDIR%\qa_defer.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qa_fifo.obj %SRCDIR%\qa_fifo.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qa_lifo.obj %SRCDIR%\qa_lifo.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qa_get_.obj %SRCDIR%\qa_get_.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qa_sub.obj %SRCDIR%\qa_sub.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qa_usub.obj %SRCDIR%\qa_usub.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qa_usuba.obj %SRCDIR%\qa_usuba.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qeq_fifo.obj %SRCDIR%\qeq_fifo.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qeq_get.obj %SRCDIR%\qeq_get.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qeq_init.obj %SRCDIR%\qeq_init.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qeq_lifo.obj %SRCDIR%\qeq_lifo.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qf_act.obj %SRCDIR%\qf_act.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qf_gc.obj %SRCDIR%\qf_gc.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qf_log2.obj %SRCDIR%\qf_log2.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qf_new.obj %SRCDIR%\qf_new.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qf_pool.obj %SRCDIR%\qf_pool.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qf_psini.obj %SRCDIR%\qf_psini.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qf_pspub.obj %SRCDIR%\qf_pspub.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qf_pwr2.obj %SRCDIR%\qf_pwr2.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qf_tick.obj %SRCDIR%\qf_tick.c
2013-09-23 14:34:35 -04:00
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qma_ctor.obj %SRCDIR%\qma_ctor.c
2012-08-14 18:07:04 -04:00
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qmp_get.obj %SRCDIR%\qmp_get.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qmp_init.obj %SRCDIR%\qmp_init.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qmp_put.obj %SRCDIR%\qmp_put.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qte_ctor.obj %SRCDIR%\qte_ctor.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qte_arm.obj %SRCDIR%\qte_arm.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qte_darm.obj %SRCDIR%\qte_darm.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qte_rarm.obj %SRCDIR%\qte_rarm.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qte_ctr.obj %SRCDIR%\qte_ctr.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qvanilla.obj %SRCDIR%\qvanilla.c
erase %LIBDIR%\qf.lib
%LIB% -n %LIBDIR%\qf
2013-09-23 14:34:35 -04:00
%LIB% %LIBDIR%\qf +%BINDIR%\qa_ctor
2012-08-14 18:07:04 -04:00
%LIB% %LIBDIR%\qf +%BINDIR%\qa_defer
%LIB% %LIBDIR%\qf +%BINDIR%\qa_fifo
%LIB% %LIBDIR%\qf +%BINDIR%\qa_lifo
%LIB% %LIBDIR%\qf +%BINDIR%\qa_get_
%LIB% %LIBDIR%\qf +%BINDIR%\qa_sub
%LIB% %LIBDIR%\qf +%BINDIR%\qa_usub
%LIB% %LIBDIR%\qf +%BINDIR%\qa_usuba
%LIB% %LIBDIR%\qf +%BINDIR%\qeq_fifo
%LIB% %LIBDIR%\qf +%BINDIR%\qeq_get
%LIB% %LIBDIR%\qf +%BINDIR%\qeq_init
%LIB% %LIBDIR%\qf +%BINDIR%\qeq_lifo
%LIB% %LIBDIR%\qf +%BINDIR%\qf_act
%LIB% %LIBDIR%\qf +%BINDIR%\qf_gc
%LIB% %LIBDIR%\qf +%BINDIR%\qf_log2
%LIB% %LIBDIR%\qf +%BINDIR%\qf_new
%LIB% %LIBDIR%\qf +%BINDIR%\qf_pool
%LIB% %LIBDIR%\qf +%BINDIR%\qf_psini
%LIB% %LIBDIR%\qf +%BINDIR%\qf_pspub
%LIB% %LIBDIR%\qf +%BINDIR%\qf_pwr2
%LIB% %LIBDIR%\qf +%BINDIR%\qf_tick
2013-09-23 14:34:35 -04:00
%LIB% %LIBDIR%\qf +%BINDIR%\qma_ctor
2012-08-14 18:07:04 -04:00
%LIB% %LIBDIR%\qf +%BINDIR%\qmp_get
%LIB% %LIBDIR%\qf +%BINDIR%\qmp_init
%LIB% %LIBDIR%\qf +%BINDIR%\qmp_put
%LIB% %LIBDIR%\qf +%BINDIR%\qte_ctor
%LIB% %LIBDIR%\qf +%BINDIR%\qte_arm
%LIB% %LIBDIR%\qf +%BINDIR%\qte_darm
%LIB% %LIBDIR%\qf +%BINDIR%\qte_rarm
%LIB% %LIBDIR%\qf +%BINDIR%\qte_ctr
%LIB% %LIBDIR%\qf +%BINDIR%\qvanilla
@echo off
if not "%1"=="spy" goto clean
:: QS -----------------------------------------------------------------------
set SRCDIR=..\..\..\..\..\qs\source
set CCINC=@inc_qs.rsp
@echo on
%LIB% -n %LIBDIR%\qs
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qs.obj %SRCDIR%\qs.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qs_.obj %SRCDIR%\qs_.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qs_blk.obj %SRCDIR%\qs_blk.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qs_byte.obj %SRCDIR%\qs_byte.c
2013-09-23 14:34:35 -04:00
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qs_dict.obj %SRCDIR%\qs_dict.c
2012-08-14 18:07:04 -04:00
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qs_f32.obj %SRCDIR%\qs_f32.c
2013-09-30 12:54:30 -04:00
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qs_f64.obj %SRCDIR%\qs_f64.c
2012-08-14 18:07:04 -04:00
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qs_mem.obj %SRCDIR%\qs_mem.c
%CC% %CCFLAGS% %CCINC% -fo=%BINDIR%\qs_str.obj %SRCDIR%\qs_str.c
erase %LIBDIR%\qs.lib
%LIB% -n %LIBDIR%\qs
2013-09-23 14:34:35 -04:00
%LIB% %LIBDIR%\qs +%BINDIR%\qs
%LIB% %LIBDIR%\qs +%BINDIR%\qs_
%LIB% %LIBDIR%\qs +%BINDIR%\qs_blk
%LIB% %LIBDIR%\qs +%BINDIR%\qs_byte
%LIB% %LIBDIR%\qs +%BINDIR%\qs_dict
%LIB% %LIBDIR%\qs +%BINDIR%\qs_f32
2013-09-30 12:54:30 -04:00
%LIB% %LIBDIR%\qs +%BINDIR%\qs_f64
2013-09-23 14:34:35 -04:00
%LIB% %LIBDIR%\qs +%BINDIR%\qs_mem
%LIB% %LIBDIR%\qs +%BINDIR%\qs_str
2012-08-14 18:07:04 -04:00
@echo off
:clean
@echo off
erase %BINDIR%\*.obj
erase %LIBDIR%\*.bak