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