Rev 7299 | Blame | Last modification | View Log | RSS feed
# -*- mode: mak; -*-################################################################################ File: TOOLSET/wcdos.rul[e]# Contents: WATCOM/DOS rules## Revision History:# xx/08/99 APY Created# 22/03/00 APY NODEPDIRS# 08/06/00 APY TS_TASM_AS# 14/06/00 APY LDDEPEND# 13/11/01 APY ; appended to several directives, forcing use of# 'sh.exe' during execution. Required by WIN32# toolsets,################################################################################ Additional options above those supported by the basic build# environment are...## TS_MASM_AS:# If this variable is defined then the masm assembler will be# used rather than the watcom one.## TS_TASM_AS:# If this variable is defined then the tasm assembler will be# used rather than the watcom one.################################################################################################################################################################.. Remove "undef" warnings#cc_includes +=cc_defines +=cxx_includes +=cxx_defines +=################################################################################.. C Compiler definition#cc = @export INCLUDE; INCLUDE='\$(patsubst %,%;,$(INCDIRS))\$(patsubst %,%;,$(cc_includes))\$(patsubst %,%;,$(wc_includes))';\export WCC; WCC='\$(patsubst %, %,$(CFLAGS))\$(patsubst %, -d%,$(cc_defines))\$(patsubst %, %,$(wc_flags))';\wcccc_init =cc_o_switch = $(subst /,\\,-fo=$@)cc_source = $(subst /,\\,$<) > $(subst /,\\,$(basename $<)).err 2>&1cc_cmdfile =cc_flags =cc_term = ; # ; force use of 'sh.exe'wc_includes += $(watcom)/hwc_flags = -ml -ei -zq -fpi#wc_flags += -sifeq "$(DEBUG)" "1"wc_flags += -dDEBUG -d2elsewc_flags += -oxendififdef ALVLwc_flags += -dALVL=$(ALVL)endififdef DLVLwc_flags += -dDLVL=$(DLVL)endifdefine cc_pre@echo '[$<] compiling..'endefdefine cc_postendef################################################################################.. C/C++ dependencies# depend and depend.err#wc_depend = -D__STDC__ -D__WATCOMC__=1000 -D__LARGE__ -DMSDOSifeq "$(DEBUG)" "1"wc_depend += -DDEBUGendififdef ALVLwc_depend += -DALVL=$(ALVL)endififdef DLVLwc_depend += -DDLVL=$(DLVL)endifccdep = @$(SCM_BIN)/mkdependccdep_init =ccdep_o_switch = -f -ccdep_source = $(filter %.c %.cc %.cpp, $+) > $(subst /,\\,$@) 2> $@.errccdep_flags = -MM \$(patsubst %,%,$(CFLAGS)) \$(patsubst %,-D%,$(cc_defines)) \$(patsubst %,%,$(wc_depend)) \$(patsubst %,-I %,$(INCDIRS)) \$(patsubst %,-Y %,$(cc_includes)) \$(patsubst %,-Y %,$(wc_includes)) \$(patsubst %,-Y %,$(NODEPDIRS))ccdep_pre =ccdep_post =#.. C++ Compiler definition#cxx = @export INCLUDE; INCLUDE='\$(patsubst %,%;,$(INCDIRS))\$(patsubst %,%;,$(cc_includes))\$(patsubst %,%;,$(wc_includes))';\export WCC; WCC='\$(patsubst %, %,$(CXXFLAGS))\$(patsubst %, -d%,$(cc_defines))\$(patsubst %, %,$(wc_flags))';\wcccxx_init =cxx_o_switch = $(subst /,\\,-fo=$@)cxx_source = $(subst /,\\,$<) > $(subst /,\\,$(basename $<)).err 2>&1cxx_cmdfile =cxx_flags =cxx_term = ; # ; force use of 'sh.exe'define cxx_pre@echo '[$<] compiling..'endefdefine cxx_postendef################################################################################.. Assembler definition#ifdef TS_TASM_AS#.. Assembler (TASM)#as = tasmas_init =as_i_switch = -ias_flags =as_o_switch =as_source = $(subst /,\\,$<), $(subst /,\\,$@) @$(as_cmdfile)as_cmdfile = $(subst /,\\,$(basename $@).cmd)as_term = ; # ; force use of 'sh.exe'as_includes +=as_defines +=tasm_flags = -mx -t -w2ifeq "$(DEBUG)" "1"tasm_flags += -zi /dDEBUGendififdef DLVLtasm_flags += -dDLVL=$(DLVL)endififdef ALVLtasm_flags += -dALVL=$(ALVL)endifas_defines := $(addprefix -d,$(as_defines))as_defines += $(tasm_flags)elseifdef TS_MASM_AS#.. Assembler (Microsoft 6.11)#as = mlas_init =as_i_switch = /Ias_flags = @$(as_cmdfile)as_o_switch = /Fo$(subst /,\\,$@)as_source = $(subst /,\\,$<)as_cmdfile = $(subst /,\\,$(basename $@).cmd)as_term = ; # ; force use of 'sh.exe'as_includes += $(masm)/includeas_defines +=ml_flags = /c /Zm /Cp /X /nologoifeq "$(DEBUG)" "1"ml_flags += /W2 /Zd /DDEBUGendififdef DLVLml_flags += /DDLVL=$(DLVL)endififdef ALVLml_flags += /DALVL=$(ALVL)endifas_defines := $(addprefix /D,$(as_defines))as_defines += $(ml_flags)else#... WASM (default)#ifndef TS_WASM_ASTS_WASM_AS = 1endifas = wasmas_init =as_i_switch = -i=as_flags = @$(as_cmdfile)as_o_switch = /fo=$(subst /,\\,$@)as_source = $(subst /,\\,$<)as_cmdfile = $(subst /,\\,$(basename $@).cmd)as_term = ; # ; force use of 'sh.exe'as_includes +=as_defines +=wasm_flags = /we /zqifdef DLVLwasm_flags += -dDLVL=$(DLVL)endififdef ALVLwasm_flags += -dALVL=$(ALVL)endififeq "$(DEBUG)" "1"wasm_flags += /dDEBUG /d2endifas_defines := $(addprefix /d,$(as_defines))as_defines += $(wasm_flags)endif #MASMendif #TASMdefine as_pre@$(cmdfile) -ko$(as_cmdfile) "\$(patsubst %,%\\n,$(ASFLAGS)) \$(patsubst %,%\\n,$(as_defines)) \$(patsubst %,$(as_i_switch)%\\n,$(subst /,\\\\,$(INCDIRS))) \$(patsubst %,$(as_i_switch)%\\n,$(subst /,\\\\,$(as_includes)))"endefifndef LEAVETMPdefine as_post@$(rm) -f $(as_cmdfile)endefelsedefine as_postendefendif #LEAVETMP#.. Archiver#ar = wlibar_init =ar_cmdfile = $(subst /,\\,$(basename $@).ar)ar_flags = -b -c -n -q -p=512ar_o_switch = $(subst /,\\,$@) @$(ar_cmdfile)ar_term = ; # ; force use of 'sh.exe'define ar_pre@$(cmdfile) -ko$(ar_cmdfile) \"$(patsubst %,%\\n,$(subst /,\\\\,$^))"endefifndef LEAVETMPdefine ar_post@$(rm) -f $(ar_cmdfile)endefelsedefine ar_postendefendif#.. Linker#ld = wlinkld_cmdfile = $(subst /,\\,$(basename $@).ld)ld_flags = @$(ld_cmdfile)ld_o_switch =ld_term = ; # ; force use of 'sh.exe'define ld_pre@export WCX86_LIB; \WCX86_LIB="$(subst $(space),;,$(LIBDIRS))"; \$(cmdfile) -ko$(ld_cmdfile) "$($(notdir $(basename $@))_ld)"endefifndef LEAVETMPdefine ld_post@$(rm) -f $(ld_cmdfile)endefelsedefine ld_postendefendifdefine LDDEPEND@export WCX86_LIB; \WCX86_LIB="$(subst $(space),;,$(LIBDIRS))"; \$(cmdfile) -ko$(BINDIR)/$(notdir $(basename $@)).dep "$($(notdir $(basename $@))_dp)"endef#