# (C) Copyright David Abrahams 2001. Permission to copy, use, # modify, sell and distribute this software is granted provided this # copyright notice appears in all copies. This software is provided # "as is" without express or implied warranty, and with no claim as # to its suitability for any purpose. # compute directories for invoking como if ! $(COMO_PATH_SETUP) # do this once { COMO_BIN_DIRECTORY ?= $(COMO_BASE)$(SLASH)bin$(SLASH) ; COMO_BIN_DIRECTORY ?= "" ; # Don't clobber tool names if COMO_ROOT_DIRECTORY not # set COMO_INCLUDE_PATH ?= $(COMO_BASE)$(SLASH)$(DOTDOT)$(SLASH)libcomo ; COMO_INCLUDE_PATH += $(COMO_INCLUDE_PATH)$(SLASH)cnames ; COMO_STDLIB_PATH ?= $(COMO_BASE)$(SLASH)$(DOTDOT)$(SLASH)libcomo ; COMO_BACKEND_SETUP = $(COMO_BACKEND_SETUP) ; if $(NT) { COMO_BACKEND_INCLUDE_SETUP ?= "set \"COMO_MS_INCLUDE="$(MSVCDir)"/include\"" ; COMO_BACKEND_LIB_SETUP ?= "set \"LIB="$(COMO_STDLIB_PATH)";%LIB%\"" ; COMO_PATH_SETUP ?= "set \"PATH="$(COMO_BIN_DIRECTORY)";%PATH%\"" ; COMO_BACKEND_SETUP ?= "call "\"$(MSVCDir)$(SLASH)bin$(SLASH)vcvars32"\"" ; COMO_BACKEND_SETUP ?= REM set MSVCDir or COMO_BACKEND_SETUP to set up the back end ; COMO_BASE_SETUP ?= "set \"COMO_BASE=$(COMO_BASE)\"" ; COMO_PATH_SETUP ?= REM set COMO_BASE to set up the path for Comeau ; } COMO_PATH_SETUP ?= "" ; } flags como C++FLAGS off : --no_exceptions ; flags como C++FLAGS on : --exceptions ; flags como CFLAGS off : --no_inlining ; flags como CFLAGS on full : --inlining ; flags como DEFINES ; flags como UNDEFS ; flags como HDRS ; flags como STDHDRS : $(COMO_INCLUDE_PATH) ; flags como STDLIBPATH : $(COMO_STDLIB_PATH) ; flags como LIBPATH ; flags como NEEDLIBS ; flags como FINDLIBS ; #### Link #### rule Link-action { como-Link-action $(<) : $(>) ; } # for como, we repeat all libraries so that dependencies are always resolved actions como-Link-action bind NEEDLIBS { $(COMO_BACKEND_SETUP) $(COMO_BACKEND_INCLUDE_SETUP) $(COMO_BACKEND_LIB_SETUP) $(COMO_PATH_SETUP) $(COMO_BASE_SETUP) $(COMO_BIN_DIRECTORY)como $(LINKFLAGS) -o "$(<[1])" "$(>)" "$(NEEDLIBS)" $(COMO_STDLIB_PATH)\libcomo.lib } #### Cc ##### rule Cc-action { como-Cc-action $(<) : $(>) ; } actions como-Cc-action { $(COMO_BACKEND_SETUP) $(COMO_BACKEND_INCLUDE_SETUP) $(COMO_BACKEND_LIB_SETUP) $(COMO_PATH_SETUP) $(COMO_BASE_SETUP) $(COMO_BIN_DIRECTORY)como -c -e10 --wchar_t -D__cdecl= --no_microsoft_bugs -D_WCHAR_T_DEFINED -m -c -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<:D=)" "$(>)" $(MV) $(<:D=) $(<) } #### C++ #### rule C++-action { como-C++-action $(<) : $(>) ; } actions como-C++-action { $(COMO_BACKEND_SETUP) $(COMO_BACKEND_INCLUDE_SETUP) $(COMO_BACKEND_LIB_SETUP) $(COMO_PATH_SETUP) $(COMO_BASE_SETUP) $(COMO_BIN_DIRECTORY)como -c -e10 --wchar_t -D__cdecl= --no_microsoft_bugs --no_anachronisms -D__cdecl= --new_for_init -D_WCHAR_T_DEFINED -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<:D=)" "$(>)" $(MV) $(<:D=) $(<) } #### Archive #### rule Archive-action { como-Archive-action $(<) : $(>) ; } actions updated together piecemeal como-Archive-action { $(COMO_BACKEND_SETUP) $(COMO_BACKEND_INCLUDE_SETUP) $(COMO_BACKEND_LIB_SETUP) $(COMO_PATH_SETUP) $(COMO_BASE_SETUP) $(COMO_BIN_DIRECTORY)como -o "$(<:S=)" $(>) REM if exist "$(<)" set _$(<:B)_="$(<)" REM $(MSVC_TOOL_PATH)link /lib /out:"$(<)" %_$(<:B)_% "$(>)" }