blob: 04ec663c53ddd75b80a0eb307edc430218109fce [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001#
2# Borland C++ 5.0[12] makefile for vim, 16-bit windows gui version
3# By Vince Negri
Bram Moolenaar17b609e2016-01-01 17:56:17 +01004#
5# NOTE: THIS IS OLD AND PROBABLY NO LONGER WORKS.
6#
Bram Moolenaar071d4272004-06-13 20:20:40 +00007# *************************************************************
8# * WARNING!
9# * This was originally produced by the IDE, but has since been
Bram Moolenaar84a05ac2013-05-06 04:24:17 +020010# * modified to make it work properly. Adjust with care!
Bram Moolenaar071d4272004-06-13 20:20:40 +000011# * In particular, leave LinkerLocalOptsAtW16_gvim16dexe alone
12# * unless you are a guru.
13# *************************************************************
14#
15# Look for BOR below and either pass a different value or
16# adjust the path as required. For example
17# make -fMake_w16.mak -DBOR=C:\PF\Borland\BC5.01 -B BccW16.cfg
18# make -fMake_w16.mak
19# Note: $(BOR) is effectively ignored unless BccW16.cfg is rebuilt.
20#
21# Does not compile with Borland C++ 4.51 Walter Briscoe 2003-02-24
22# "out of memory" from compiler if gvim16 wildly wrong. WFB 2003-03-04
23#
24# vim16.def must be a DOS-formatted file. (\r\n line endings.)
25# It is a UNIX-formatted file (\n line endings) in vim-*-extra.tar.gz
26
27.AUTODEPEND
28
29#
30# Borland C++ tools
31#
32IMPLIB = Implib
33BCC = Bcc +BccW16.cfg
34TLINK = TLink
35TLIB = TLib
36BRC = Brc
37TASM = Tasm
38#
39# IDE macros
40#
41
42#
43# Options
44#
45!ifndef BOR
46BOR = D:\BC5
47!endif
48
49# !ifndef INTDIR is lethal considering CLEAN below. WFB 2003-03-13
50INTDIR=w16
51
52# /Twe Make the target a Windows .EXE with explicit functions exportable +
53# /x Map file off
54# /l Include source line numbers in object map files`
55# /c case sensitive link
56# /C Case-sensitive exports and imports (16-bit only)
57# /k Produce "No Stack" warning.
58# /Oa Minimise segment alignment
59# /Oc Minimise Chain fixes
60# /Oi Minimise Iterated data
61# /Or Minimise resource alignment
62# /P -P=x Code pack size
63# /V Windows version for application
64# /L Folder to search for library files
65LinkerLocalOptsAtW16_gvim16dexe =/Twe/x/l/c/C/k/Or/Oc/Oa/Oi/P=65535/V3.10
66
67CompInheritOptsAt_gvim16dexe = \
68 -I$(BOR)\INCLUDE;PROTO;. \
69 -DFEAT_GUI;FEAT_GUI_MSWIN;FEAT_GUI_W16;MSWIN;WIN16;MSWIN16_FASTTEXT \
70 -DFEAT_TOOLBAR;WIN16_3DLOOK
71
72#
73# Dependency List
74#
75Dep_Gvim16 = \
76 gvim16.exe
77
78ObjFiles = \
79 $(INTDIR)\buffer.obj\
80 $(INTDIR)\charset.obj\
81 $(INTDIR)\diff.obj\
82 $(INTDIR)\digraph.obj\
83 $(INTDIR)\edit.obj\
84 $(INTDIR)\eval.obj\
85 $(INTDIR)\ex_cmds.obj\
86 $(INTDIR)\ex_cmds2.obj\
87 $(INTDIR)\ex_docmd.obj\
88 $(INTDIR)\ex_eval.obj\
89 $(INTDIR)\ex_getln.obj\
90 $(INTDIR)\fileio.obj\
91 $(INTDIR)\fold.obj\
92 $(INTDIR)\getchar.obj\
Bram Moolenaar58d98232005-07-23 22:25:46 +000093 $(INTDIR)\hardcopy.obj\
Bram Moolenaar76b92b22006-03-24 22:46:53 +000094 $(INTDIR)\hashtab.obj\
Bram Moolenaar071d4272004-06-13 20:20:40 +000095 $(INTDIR)\gui.obj\
96 $(INTDIR)\gui_w16.obj\
97 $(INTDIR)\main.obj\
98 $(INTDIR)\mark.obj\
99 $(INTDIR)\mbyte.obj\
100 $(INTDIR)\memfile.obj\
101 $(INTDIR)\memline.obj\
102 $(INTDIR)\menu.obj\
103 $(INTDIR)\message.obj\
104 $(INTDIR)\misc1.obj\
105 $(INTDIR)\misc2.obj\
106 $(INTDIR)\move.obj\
107 $(INTDIR)\normal.obj\
108 $(INTDIR)\ops.obj\
109 $(INTDIR)\option.obj\
110 $(INTDIR)\os_win16.obj\
111 $(INTDIR)\os_msdos.obj\
112 $(INTDIR)\os_mswin.obj\
Bram Moolenaar693e40c2013-02-26 14:56:42 +0100113 $(INTDIR)\winclip.obj\
Bram Moolenaar76b92b22006-03-24 22:46:53 +0000114 $(INTDIR)\popupmnu.obj\
Bram Moolenaar071d4272004-06-13 20:20:40 +0000115 $(INTDIR)\quickfix.obj\
116 $(INTDIR)\regexp.obj\
117 $(INTDIR)\screen.obj\
118 $(INTDIR)\search.obj\
Bram Moolenaar6bb68362005-03-22 23:03:44 +0000119 $(INTDIR)\spell.obj\
Bram Moolenaar071d4272004-06-13 20:20:40 +0000120 $(INTDIR)\syntax.obj\
121 $(INTDIR)\tag.obj\
122 $(INTDIR)\term.obj\
123 $(INTDIR)\ui.obj\
124 $(INTDIR)\undo.obj\
125 $(INTDIR)\version.obj\
126 $(INTDIR)\window.obj
127
128Dep_gvim16dexe = \
129 vimtbar.lib\
130 vim16.def\
131 $(INTDIR)\vim16.res\
132 $(ObjFiles)
133
134# Without the following, the implicit rule in BUILTINS.MAK is picked up
135# for a rule for .c.obj rather than the local implicit rule
136.SUFFIXES
137.SUFFIXES .c .obj
138.path.c = .
139
140# -P- Force C++ compilation off
141# -c Compilation only
142# -n Place .OBJ files
143{.}.c{$(INTDIR)}.obj:
144 $(BCC) -P- -c -n$(INTDIR)\ {$< }
145
146Gvim16 : BccW16.cfg $(Dep_Gvim16)
147 echo MakeNode
148
149gvim16.exe : $(Dep_gvim16dexe)
150 $(TLINK) $(LinkerLocalOptsAtW16_gvim16dexe) @&&|
151c0wl.obj $(ObjFiles)
152|,$*,,vimtbar ctl3dv2 import cwl, vim16.def,$(INTDIR)\vim16.res
153
154# Force objects to be built if $(BOR) changes
155$(ObjFiles) : Make_w16.mak BccW16.cfg
156
157$(INTDIR)\vim16.res : vim16.rc
158 $(BRC) -R @&&|
159 $(CompInheritOptsAt_gvim16dexe) -fo$*.res $?
160|
161
162
163# Compiler configuration file
164# There is no rule for $(INTDIR) as make always says it does not exist
165BccW16.cfg :
166 -@if not exist $(INTDIR)\$(NULL) mkdir $(INTDIR)
167 Copy &&|
168-3 ; Generate 80386 protected-mode compatible instructions
169-a ; Byte alignment
170-dc ; Move string literals from data segment to code segment
171-ff ; Fast floating point
172-H ; Generate and use precompiled headers
173-H=$(INTDIR)\gvim16.csm ; gvim16.csm is the precompiled header filename
174-k- ; No standard stack frame
175-ml ; Large memory model
176-OW ; Suppress the inc bp/dec bp on windows far functions
177-O1 ; Generate smallest possible code
178-O2 ; Generate fastest possible code (overrides prior -O1 control)
179-pr ; Fastcall calling convention passing parameters in registers
180-R- ; Exclude browser information in generated .OBJ files
181-v- ; Turn off source debugging
182-vi ; Turn inline function expansion on
183-WE ; Only __far _export functions are exported
184-w ; Display warnings
185-w-par ; Suppress: Parameter 'parameter' is never used
186-w-pch ; Cannot create pre-compiled header: initialized data in header
187-w-sig ; identifier' declared but never used
188-w-ucp ; Mixing pointers to different 'char' types
189-wuse ; 'identifier' declared but never used
190 $(CompInheritOptsAt_gvim16dexe)
191| $@
192
193!IF "$(OS)" == "Windows_NT"
194NULL=
195DEL_TREE = rmdir /s /q
196!ELSE
197NULL=nul
198DEL_TREE = deltree /y
199!ENDIF
200
201CLEAN:
202 -@if exist $(INTDIR)\$(NULL) $(DEL_TREE) $(INTDIR)
203 -@if exist BccW16.cfg erase BccW16.cfg
204 -@if exist gvim16.exe erase gvim16.exe