# This is an OpenWatcom 1.9 Makefile, that should work # both when hosted on DOS and on Linux. # # NOTE: owsetenv.sh on Linux might not set up # the environment for targetting DOS. # You should have $WATCOM set and the binl/binl64 directory # added to $PATH. CC = wcc LD = wlink !ifdef DEBUG # You can also -dDEBUG or even -dDEBUG1. CFLAGS = -d2 -od #-dDEBUG1 LDFLAGS = debug all !else # For the fastest code (C Guide, p.70): # -onatx -oh CFLAGS = -d0 -onasx -oh !endif # NOTE: Referencing @WCC_DEFS is a workaround for command line length # restrictions when building under DOS. # Perhaps it would be more elegant to have a DOS-specific config.h. # # Large data model: far code and data pointers CFLAGS += -q -wx -ze -zm -j -0 -ml -bt=DOS LDFLAGS += format dos option eliminate option map option stack=16k & libpath $(%WATCOM)/lib286:$(%WATCOM)/lib286/dos # The `search_string` symbol is larger than 32kb. # If it's allocated as far data, it will be needlessly included in the # binary. CFLAGS += -zt=65536 .BEFORE !ifndef %WATCOM set WATCOM=/usr/bin/watcom !endif set include=$(%WATCOM)/h set lib=$(%WATCOM)/lib286;$(%WATCOM)/lib286/dos all : teco.exe .SYMBOLIC teco.exe : tecbuf.obj teccmd.obj tecdebug.obj tecdisp.obj tecexec.obj & tecmem.obj teco.obj tecparse.obj tecstate.obj tecterm.obj tecundo.obj set WLINK_OBJ=$(LDFLAGS) name $@ file { $< } $(LD) @WLINK_OBJ .c.obj: $(CC) $(CFLAGS) -fo=$@ $< release: vteco.zip .SYMBOLIC vteco.zip : teco.exe zip --DOS-names $@ $< zip --DOS-names --to-crlf $@ README.md README.OLD COPYING clean: .SYMBOLIC rm -f teco.exe *.obj vteco.zip