Make_w16.mak   [plain text]

# Borland C++ 5.0[12] makefile for vim, 16-bit windows gui version
# By Vince Negri
# *************************************************************
# * This was originally produced by the IDE, but has since been
# * modifed to make it work properly. Adjust with care!
# * In particular, leave LinkerLocalOptsAtW16_gvim16dexe alone
# * unless you are a guru.
# *************************************************************
# Look for BOR below and either pass a different value or
# adjust the path as required. For example
#   make -fMake_w16.mak -DBOR=C:\PF\Borland\BC5.01 -B BccW16.cfg
#   make -fMake_w16.mak
# Note: $(BOR) is effectively ignored unless BccW16.cfg is rebuilt.
# Does not compile with Borland C++ 4.51 Walter Briscoe 2003-02-24
# "out of memory" from compiler if gvim16 wildly wrong. WFB 2003-03-04
# vim16.def must be a DOS-formatted file. (\r\n line endings.)
# It is a UNIX-formatted file (\n line endings) in vim-*-extra.tar.gz


# Borland C++ tools
IMPLIB  = Implib
BCC     = Bcc +BccW16.cfg
TLINK   = TLink
TLIB    = TLib
BRC     = Brc
TASM    = Tasm
# IDE macros

# Options
!ifndef BOR
BOR = D:\BC5

# !ifndef INTDIR is lethal considering CLEAN below. WFB 2003-03-13

#  /Twe Make the target a Windows .EXE with explicit functions exportable +
#  /x   Map file off
#  /l   Include source line numbers in object map files`
#  /c   case sensitive link
#  /C   Case-sensitive exports and imports (16-bit only)
#  /k   Produce "No Stack" warning.
#  /Oa  Minimise segment alignment
#  /Oc  Minimise Chain fixes
#  /Oi  Minimise Iterated data
#  /Or  Minimise resource alignment
#  /P   -P=x  Code pack size
#  /V   Windows version for application
#  /L   Folder to search for library files
LinkerLocalOptsAtW16_gvim16dexe =/Twe/x/l/c/C/k/Or/Oc/Oa/Oi/P=65535/V3.10

CompInheritOptsAt_gvim16dexe = \

# Dependency List
Dep_Gvim16 = \

ObjFiles = \

Dep_gvim16dexe = \

# Without the following, the implicit rule in BUILTINS.MAK is picked up
# for a rule for .c.obj rather than the local implicit rule
.SUFFIXES .c .obj
.path.c = .

# -P-	Force C++ compilation off
# -c	Compilation only
# -n    Place .OBJ files
  $(BCC) -P- -c -n$(INTDIR)\ {$< }

Gvim16 : BccW16.cfg $(Dep_Gvim16)
  echo MakeNode

gvim16.exe : $(Dep_gvim16dexe)
  $(TLINK)   $(LinkerLocalOptsAtW16_gvim16dexe) @&&|
c0wl.obj $(ObjFiles)
|,$*,,vimtbar ctl3dv2 import cwl, vim16.def,$(INTDIR)\vim16.res

# Force objects to be built if $(BOR) changes
$(ObjFiles) : Make_w16.mak BccW16.cfg

$(INTDIR)\vim16.res : vim16.rc
  $(BRC) -R @&&|
  $(CompInheritOptsAt_gvim16dexe) -fo$*.res $?

# Compiler configuration file
# There is no rule for $(INTDIR) as make always says it does not exist
BccW16.cfg :
	-@if not exist $(INTDIR)\$(NULL) mkdir $(INTDIR)
	Copy &&|
-3		; Generate 80386 protected-mode compatible instructions
-a		; Byte alignment
-dc		; Move string literals from data segment to code segment
-ff		; Fast floating point
-H		; Generate and use precompiled headers
-H=$(INTDIR)\gvim16.csm	; gvim16.csm is the precompiled header filename
-k-		; No standard stack frame
-ml		; Large memory model
-OW		; Suppress the inc bp/dec bp on windows far functions
-O1		; Generate smallest possible code
-O2		; Generate fastest possible code (overrides prior -O1 control)
-pr		; Fastcall calling convention passing parameters in registers
-R-		; Exclude browser information in generated .OBJ files
-v-		; Turn off source debugging
-vi		; Turn inline function expansion on
-WE		; Only __far _export functions are exported
-w		; Display warnings
-w-par		; Suppress: Parameter 'parameter' is never used
-w-pch		; Cannot create pre-compiled header: initialized data in header
-w-sig		; identifier' declared but never used
-w-ucp		; Mixing pointers to different 'char' types
-wuse		; 'identifier' declared but never used
| $@

!IF "$(OS)" == "Windows_NT"
DEL_TREE = rmdir /s /q
DEL_TREE = deltree /y

	-@if exist $(INTDIR)\$(NULL) $(DEL_TREE) $(INTDIR)
	-@if exist BccW16.cfg erase BccW16.cfg
	-@if exist gvim16.exe erase gvim16.exe