sw_c_common = -w4-zl-zld-zq
sw_a_common = -zq
sw_l_common = option quiet,impfile,caseexact reference __DLLstart_ disable 121
!ifndef on_build_machine
sw_l_common += option map,mangle,artificial,verbose
!endif

# sw_c_(linkage)
sw_c_static  = 
sw_c_dynamic = -d__MAKE_DLL_CLIB

# sw_c_(processor)_(model)
sw_c_register = -5r
sw_c_stack    = -5s
sw_c_bigcode  = -nt=_TEXT
sw_c_bigdata  = -zu

sw_c_intel    = -r-fpr-fpc

sw_c_086 = $(sw_c_intel)-0
sw_c_286 = $(sw_c_intel)-2
sw_c_386 = $(sw_c_intel)-zc
sw_c_axp = 
sw_c_ppc = 

!ifdef profile
sw_c_386 += -d1-hd-etp
!endif

!ifndef on_build_machine
sw_c_common += -d__RUNTIME_HANDLE_CHECKS__
sw_c_axp += -fiaxpnf.h
!endif

sw_c_086_ms = -ms
sw_c_286_ms = -ms
sw_c_086_mm = -mm$(sw_c_bigcode)
sw_c_286_mm = -mm$(sw_c_bigcode)
sw_c_086_mc = -mc$(sw_c_bigdata)
sw_c_286_mc = -mc$(sw_c_bigdata)
sw_c_086_ml = -ml$(sw_c_bigdata)$(sw_c_bigcode)
sw_c_286_ml = -ml$(sw_c_bigdata)$(sw_c_bigcode)
sw_c_086_mh = -mh$(sw_c_bigdata)$(sw_c_bigcode)
sw_c_286_mh = -mh$(sw_c_bigdata)$(sw_c_bigcode)
sw_c_386_ms = -ms$(sw_c_$(convention))
sw_c_386_mf = -mf$(sw_c_$(convention))
sw_c_axp_   =
sw_c_ppc_   =

# sw_a_(linkage)
sw_a_static  =
sw_a_dynamic = -d__MAKE_DLL_CLIB -d_EXPORT

# sw_a_(processor)_(model)
sw_a_register = -5r
sw_a_stack    = -5s

sw_a_086 = -e -fpc-0r
sw_a_286 = -e -fpc-2r
sw_a_386 = -e -fpc
sw_a_axp =
sw_a_ppc =

!ifdef profile
sw_a_386 += -d_PROFILE
!endif

sw_a_086_ms = -ms
sw_a_286_ms = -ms
sw_a_086_mm = -mm
sw_a_286_mm = -mm
sw_a_086_mc = -mc
sw_a_286_mc = -mc
sw_a_086_ml = -ml
sw_a_286_ml = -ml
sw_a_086_mh = -mh
sw_a_286_mh = -mh
sw_a_386_ms = -ms$(sw_a_$(convention))
sw_a_386_mf = -mf$(sw_a_$(convention))
sw_a_386_   =
sw_a_axp_   =
sw_a_ppc_   =

# sw_c_(system)_(processor)
sw_c_generic_086  = -oax
sw_c_generic_286  = -oax
sw_c_generic_386  = -oaxt
sw_c_msdos_086    = -oax
sw_c_msdos_286    = -oax
sw_c_msdos_386    = -oaxt
sw_c_necdos_086   = -oax
sw_c_necwin_086   = -oax
sw_c_necdos_386   = -oaxt
sw_c_necwin_386   = -oaxt-d__CALL21__
sw_c_netware_386  = -oaxt-bm -d__far= -d__near=
sw_c_os2_286	  = -oax
sw_c_os2_386	  = -oaxt-bm
sw_c_os2_ppc	  = -oaxt-bm
sw_c_osi_386	  = -oaxt-d__CALL21__
sw_c_penpoint_386 = -oaxt-of+
sw_c_qnx_286	  = -oax
sw_c_qnx_386	  = -oaxt-bm
sw_c_windows_086  = -oax
sw_c_windows_386  = -oaxt-d__CALL21__
sw_c_winnt_386	  = -oaxt-bm
sw_c_winnt_axp	  = -oaxt-bm-dWIN32
sw_c_winnt_ppc	  = -oaxt-bm-dWIN32

# sw_a_(system)_(processor)
sw_a_generic_086  =
sw_a_generic_086  =
sw_a_generic_386  =
sw_a_msdos_286    =
sw_a_msdos_286    =
sw_a_msdos_386    =
sw_a_necdos_086   =
sw_a_necdos_386   =
sw_a_necwin_086   =
sw_a_necwin_386   =
sw_a_netware_386  =
sw_a_os2_286	  =
sw_a_os2_386	  = -d__MT__
sw_a_os2_ppc	  = -d__MT__
sw_a_osi_386	  = -d__MT__
sw_a_penpoint_386 =
sw_a_qnx_286	  =
sw_a_qnx_386	  = -d__MT__
sw_a_windows_086  =
sw_a_windows_386  =
sw_a_winnt_386	  = -d__MT__
sw_a_winnt_axp	  = -d__MT__ -dWIN32
sw_a_winnt_ppc	  = -oc -d__MT__ -dWIN32

# sw_l_(system)_(processor)
sw_l_generic_086  =
sw_l_generic_086  =
sw_l_generic_386  =
sw_l_msdos_286    =
sw_l_msdos_286    =
sw_l_msdos_386    =
sw_l_necdos_086   =
sw_l_necdos_386   =
sw_l_necwin_086   =
sw_l_necwin_386   =
sw_l_netware_386  =
sw_l_os2_286	  =
sw_l_os2_386	  = sys os2v2 dll initinstance terminstance op manyautodata
sw_l_os2_387	  = sys os2v2 dll initinstance terminstance op manyautodata
sw_l_os2_ppc	  = sys os2ppc dll initinstance terminstance op manyautodata
sw_l_osi_386	  =
sw_l_penpoint_386 =
sw_l_qnx_286	  =
sw_l_qnx_386	  =
sw_l_windows_086  =
sw_l_windows_386  =
sw_l_winnt_386	  = sys nt_dll initinstance terminstance
sw_l_winnt_387	  = sys nt_dll initinstance terminstance
sw_l_winnt_axp	  = sys ntaxp_dll initinstance terminstance
sw_l_winnt_ppc	  = sys ntppc_dll initinstance terminstance

#make bug
!ifndef extra_c_flags
extra_c_flags =
!endif
!ifndef extra_a_flags
extra_a_flags =
!endif

c_flags =$(sw_c_common) $(sw_c_$(linkage)) $(sw_c_$(processor)_$(model)) 
c_flags += $(sw_c_$(processor)) $(sw_c_$(system)_$(processor))
c_flags += $(extra_c_flags)
a_flags =$(sw_a_common) $(sw_a_$(linkage)) $(sw_a_$(processor)_$(model)) 
a_flags += $(sw_a_$(processor)) $(sw_a_$(system)_$(processor))
a_flags += $(extra_a_flags)
l_flags =$(sw_l_common) $(sw_l_$(system)_$(processor))

# special case switches
!ifdef overlay
c_flags += -of
!endif
!ifdef dll16
c_flags += -bd-bm
a_flags += -d__MT__
!endif
!ifdef share
c_flags += -d__SHARE__ -dIN_SLIB -d_NO_SLIB
!endif
!ifdef debug
c_flags += -en
!endif
!ifdef threading16
c_flags += -bm
a_flags += -d__MT__
!endif
!ifdef fpi
c_flags += -fpi
a_flags += -fpi
!endif

!include $(clib_dir)\bt.mif
!include $(clib_dir)\include.mif
!include $(clib_dir)\lib.mif
