environ.mif

来自「开放源码的编译器open watcom 1.6.0版的源代码」· MIF 代码 · 共 479 行

MIF
479
字号
#
# F77 compiler test environment
#

#
# configuration flags (default: flag symbol not defined)
#
# no_continue = yes     -- continue in the face of errors
# dev = yes             -- use development tools
# use_dll = yes         -- use !loaddll

#
# configuration values:
#
# targ_env_386 = wnt386/d4g386/os2386/linux386 (depends on current OS)
# targ_env_i86 = os2i86/dosi86 (depends on current OS)
# targ_env_axp = os2axp/ntaxp (depends on current OS)
#
# nb: above directories can have extensions:
#   .    - Intel 386 hosted compiler
#   .axp - Digital AXP hosted compiler
#   ( more to be defined )
#
# wfc_386 = wfc386
# wfc_i86 = wfc
# wfc_axp = wfcaxp
# dll_i86 = wfcdi86.dll
# dll_386 = wfcd386.dll
# dll_axp = wfcdaxp.dll
# arch = 386/axp (depends on current hardware)
# linker = wlink
# log_file = $(ftest_dir)/$(ftest_name).log
# uncomment below if you want to see more 
# !define noisy 1
#
# use ftest_* environment vars to set make variables
#
!ifndef dev
!  ifdef %ftest_dev
!    define dev $+$(%ftest_dev)$-
!  endif
!endif

!ifndef use_dll
!  ifdef %ftest_use_dll
!    define use_dll $+$(%ftest_use_dll)$-
!  endif
!endif

!ifndef wfc_386
!  ifdef %ftest_wfc_386
!    define wfc_386 $(%ftest_wfc_386)
!  endif
!endif

!ifndef wfc_i86
!  ifdef %ftest_wfc_i86
!    define wfc_i86 $(%ftest_wfc_i86)
!  endif
!endif

!ifndef wfc_axp
!  ifdef %ftest_wfc_axp
!    define wfc_axp $(%ftest_wfc_axp)
!  endif
!endif

!ifndef dll_386
!  ifdef %ftest_dll_386
!    define dll_386 $(%ftest_dll_386)
!  endif
!endif

!ifndef dll_i86
!  ifdef %ftest_dll_i86
!    define dll_i86 $(%ftest_dll_i86)
!  endif
!endif

!ifndef dll_axp
!  ifdef %ftest_dll_axp
!    define dll_axp $(%ftest_dll_axp)
!  endif
!endif

!ifndef targ_env_386
!  ifdef %ftest_targ_env_386
!    define targ_env_386 $(%ftest_targ_env_386)
!  endif
!endif

!ifndef targ_env_i86
!  ifdef %ftest_targ_env_i86
!    define targ_env_i86 $(%ftest_targ_env_i86)
!  endif
!endif

!ifndef targ_env_axp
!  ifdef %ftest_targ_env_axp
!    define targ_env_axp $(%ftest_targ_env_axp)
!  endif
!endif

!ifndef ftest_name
!error macro 'ftest_name' has not been set
!endif

.extensions:
.extensions: .exp .exe .obj .sbj .2bj .3bj .ser .err .c .cc .cpp .for .mif
.mif: ..;$(mif_path)

!ifndef no_continue
.continue
!else
!  ifneq no_continue yes
.continue
!  endif
!endif

.erase

#
# architectures -- 386, i86, axp
#
!ifndef arch
!   ifdef __NTAXP__
!       define arch axp
!   else
!       define arch 386
!   endif
!endif

#
# 386 environments
#
# pls386 -- PharLap .EXP
# d4g386 -- DOS/4G .EXE
# tnt386 -- PharLap TNT .EXE
# os2386 -- OS/2 2.x .EXE
# lnx386 -- Linux x86 executable
# wnt386 -- Windows NT x86 .EXE
# wntaxp -- Windows NT Alpha AXP .EXE
#

#
# i86 environments
#
# dosi86 -- DOS .EXE
# os2i86 -- OS/2 1.x .EXE
#
!ifndef targ_env_386
!  ifdef __DOS__
!    define targ_env_386 d4g386
!  else ifdef __OS2__
!    define targ_env_386 os2386
!  else ifdef __LINUX__
!    define targ_env_386 lnx386
!  else ifdef __NT386__
!    define targ_env_386 wnt386
!  endif
!endif

!ifndef targ_env_i86
!  ifdef __DOS__
!    define targ_env_i86 dosi86
!  else ifdef __OS2__
!    define targ_env_i86 os2i86
!  else ifdef __NT__
!    define targ_env_i86 wnti86
!  endif
!endif

!ifndef targ_env_axp
!  ifdef __DOS__
!    define targ_env_axp dosaxp
!  else ifdef __OS2__
!    define targ_env_axp os2axp
!  else ifdef __NT__
!    define targ_env_axp wntaxp
!  endif
!endif

#
# targ_run      name of executable loader (e.g., run386)
targ_run_pls386 = run386
targ_run_d4g386 = dos4gw
targ_run_tnt386 = tntrun
targ_run_os2386 =
targ_run_wnt386 =
targ_run_lnx386 =
targ_run_wnti86 =
targ_run_dosi86 =
targ_run_os2i86 =
targ_run_wntaxp =
targ_run_dosaxp =
targ_run_os2axp =

run_386 = $(targ_run_$(targ_env_386))
run_i86 = $(targ_run_$(targ_env_i86))
run_axp = $(targ_run_$(targ_env_axp))

run = $(run_$(arch))

#
# targ_ext      extension (e.g., exp ) - must have one for default rules to work
targ_ext_pls386 = exp
targ_ext_d4g386 = exe
targ_ext_tnt386 = exe
targ_ext_os2386 = exe
targ_ext_wnt386 = exe
targ_ext_lnx386 = exe
targ_ext_wnti86 = exe
targ_ext_dosi86 = exe
targ_ext_os2i86 = exe
targ_ext_wntaxp = exe
targ_ext_dosaxp = exe
targ_ext_os2axp = exe

ext_386 = $(targ_ext_$(targ_env_386))
ext_i86 = $(targ_ext_$(targ_env_i86))
ext_axp = $(targ_ext_$(targ_env_axp))

exe = $(ext_$(arch))

#
# targ_lnk      linker directives (e.g., system pharlap option offset=64k)
targ_lnk_pls386 = system pharlap option offset=64k
targ_lnk_d4g386 = system dos4g
targ_lnk_tnt386 = system nt option offset=64k
targ_lnk_os2386 = system os2v2 option offset=64k
targ_lnk_wnt386 = system nt option offset=64k
targ_lnk_lnx386 = system bld_linux
!ifdef __NT386__
targ_lnk_wnti86 = system dos
!else
targ_lnk_wnti86 = system os2 pmc
!endif
targ_lnk_dosi86 = system dos
targ_lnk_os2i86 = system os2 pmc
targ_lnk_wntaxp = system ntaxp
targ_lnk_dosaxp = system ntaxp
targ_lnk_os2axp = system ntaxp

lnk_any = option noundefsok

lnk_386 = $(targ_lnk_$(targ_env_386)) $(lnk_any)
lnk_i86 = $(targ_lnk_$(targ_env_i86)) $(lnk_any)
lnk_axp = $(targ_lnk_$(targ_env_axp)) $(lnk_any)

#
# targ_ldb      linker debug directive (e.g., DEBUG all)
targ_ldebug_pls386 = debug all
targ_ldebug_d4g386 = debug all
targ_ldebug_tnt386 = debug all
targ_ldebug_os2386 = debug all
targ_ldebug_wnt386 = debug all
targ_ldebug_lnx386 = debug all
targ_ldebug_wnti86 = debug all
targ_ldebug_dosi86 = debug all
targ_ldebug_os2i86 = debug all
targ_ldebug_wntaxp = debug codeview
targ_ldebug_dosaxp = debug codeview
targ_ldebug_os2axp = debug codeview

ldebug_386 = $(targ_ldebug_$(targ_env_386))
ldebug_i86 = $(targ_ldebug_$(targ_env_i86))
ldebug_axp = $(targ_ldebug_$(targ_env_axp))

#
# targ_bld      build options (e.g., something like -bt=dos)
targ_bld_pls386 = #-bt=dos
targ_bld_d4g386 = #-bt=dos
targ_bld_tnt386 = #-bt=nt
targ_bld_os2386 = #-bt=os2
targ_bld_wnt386 = #-bt=nt
targ_bld_lnx386 = #-bt=linux
targ_bld_wnti86 = #-bt=nt
targ_bld_dosi86 = #-bt=dos
targ_bld_os2i86 = #-bt=os2
#
# these will be empty
#
targ_bld_wntaxp = -si
targ_bld_dosaxp =
targ_bld_os2axp =

#
# build environment
#
!ifndef wfc_386
wfc_386 = wfc386 $(targ_bld_$(targ_env_386))
!endif
!ifndef wfc_i86
wfc_i86 = wfc $(targ_bld_$(targ_env_i86))
!endif
!ifndef wfc_axp
wfc_axp = wfcaxp $(targ_bld_$(targ_env_axp))
!endif

!ifndef wfc_386
!  ifdef dev
!    ifdef __DOS__
!      define wfc_386 run386 $(f77_dir)\dos386\wfc386d
!    else ifdef __OS2__
!      define wfc_386 $(f77_dir)\os2386\wfc386d
!    else ifdef __LINUX__
!      define wfc_386 $(f77_dir)/linux386/wfc386d
!    else ifdef __NT386__
!      define wfc_386 $(f77_dir)\nt386\wfc386d
!    else ifdef __NTAXP__
!      define wfc_386 $(f77_dir)\nt386.axp\wfc386d
!    endif
!  else
!    define wfc_386 wfc386
!  endif
!endif
!ifndef wfc_i86
!  ifdef dev
!    ifdef __DOS__
!      define wfc_i86 run386 $(f77_dir)\dosi86\wfci86d
!    else ifdef __OS2__
!      define wfc_i86 $(f77_dir)\os2i86\wfci86d
!    else ifdef __LINUX__
!      define wfc_i86 $(f77_dir)/linuxi86/wfci86d
!    else ifdef __NT386__
!      define wfc_i86 $(f77_dir)\nti86\wfci86d
!    else ifdef __NTAXP__
!      define wfc_i86 $(f77_dir)\nti86.axp\wfci86d
!    endif
!  else
!    define wfc_i86 wpp
!  endif
!endif
!ifndef wfc_axp
!  ifdef dev
!    ifdef __DOS__
!      define wfc_axp run386 $(f77_dir)\dosaxp\wfcaxpd
!    else ifdef __OS2__
!      define wfc_axp $(f77_dir)\os2axp\wfcaxpd
!    else ifdef __NT386__
!      define wfc_axp $(f77_dir)\ntaxp\wfcaxpd
!    else ifdef __NTAXP__
!      define wfc_axp $(f77_dir)\ntaxp.axp\wfcaxpd
!    endif
!  else
!    define wfc_axp wppaxp
!  endif
!endif

!ifndef dll_386
!  ifdef dev
!    ifdef __OS2__
!      define dll_386 $(f77_dir)\os2386\wfcd386d.dll
!    else ifdef __NT386__
!      define dll_386 $(f77_dir)\nt386\wfcd386d.dll
!    else ifdef __NTAXP__
!      define dll_386 $(f77_dir)\nt386.axp\wfcd386d.dll
!    endif
!  else
!    define dll_386 wfcd386.dll
!  endif
!endif
!ifndef dll_i86
!  ifdef dev
!    ifdef __OS2__
!      define dll_i86 $(f77_dir)\os2i86\wfcdi86d.dll
!    else ifdef __NT386__
!      define dll_i86 $(f77_dir)\nti86\wfcdi86d.dll
!    else ifdef __NTAXP__
!      define dll_i86 $(f77_dir)\nti86.axp\wfcdi86d.dll
!    endif
!  else
!    define dll_i86 wfcdi86.dll
!  endif
!endif
!ifndef dll_axp
!  ifdef dev
!    ifdef __OS2__
!      define dll_axp $(f77_dir)\os2axp\wfcdaxpd.dll
!    else ifdef __NT386__
!      define dll_axp $(f77_dir)\ntaxp\wfcdaxpd.dll
!    else ifdef __NTAXP__
!      define dll_axp $(f77_dir)\ntaxp.axp\wfcdaxpd.dll
!    endif
!  else
!    define dll_axp wfcdaxp.dll
!  endif
!endif

!ifdef dll_loaded
!  undef dll_loaded
!endif

!ifdef use_dll
!  define dll_loaded
!  loaddll $(wfc_$(arch)) $(dll_$(arch))
!endif

# add architecture common options
wfc_386 += $(targ_bld_$(targ_env_386))
wfc_i86 += $(targ_bld_$(targ_env_i86))
wfc_axp += $(targ_bld_$(targ_env_axp))

#
# MAKEINIT vars
#
proj_name = ftest
host_cpu = $(arch)
!ifdef __MSDOS__
!  define host_os dos
!else ifdef __OS2__
!  define host_os os2
!else ifdef __NT__
!  define host_os
!else ifdef __LINUX__
!  define host_os linux
!else
!  error unknown OS
!endif
!include cproj.mif

#
# linker
#
!ifdef %ftest_linker
!  define linker $+$(%ftest_linker)$-
!else
!  ifndef linker
!    define linker wlink
!  endif
!  ifdef use_dll
!    loaddll wlink wlink.dll
!  endif
!endif

#
# output log file location
#
!ifndef log_file
!  ifdef %ftest_log_file
!    define log_file $+$(%ftest_log_file)$-
!  else ifdef %ftest_name
!    define log_file $(ftest_dir)/$+$(%ftest_name)$-.log
!  else
!    define log_file $(ftest_dir)/$(ftest_name).log
!  endif
!endif

first_target : .symbolic start test
    @%null

start : .symbolic
!ifdef dll_loaded
    @echo using !loaddll $(dll_$(arch))
!endif
    @cdsay
    @cdsay >> $(log_file)

clean : .symbolic global
    @%null

common_clean : .symbolic
    @if exist *.?bj rm *.?bj
    @if exist *.err rm *.err
    @if exist *.lnk rm *.lnk
    @if exist *.lbc rm *.lbc
    @if exist *.$(exe) rm *.$(exe)
    @if exist *.dll rm *.dll
    @if exist *.out rm *.out
    @if exist *.sym rm *.sym
    @if exist *.dmp rm *.dmp
    @if exist *.map rm *.map
    @if exist *.lst rm *.lst
    @if exist *.log rm *.log
    @if exist *.pdb rm *.pdb
    @if exist *.pch rm *.pch
    @if exist *.lib rm *.lib
    @if exist *.res rm *.res

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?