Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | # Makefile for Borland C++ 3.1 or 4.0 to compile a 16 bit version of Vim. |
| 2 | # |
| 3 | # There are compilation options at the end of this file. |
| 4 | # |
| 5 | # Command line variables: |
| 6 | # BOR path to root of Borland C (E:\BORLANDC) |
| 7 | # DEBUG set to "yes" for debugging (no) |
| 8 | # SPAWNO path to the spawno library directory, empty if you do not have |
| 9 | # it; use 8.3 filenames! (C:\CC\SPAWN) |
| 10 | |
| 11 | .AUTODEPEND |
| 12 | |
| 13 | !ifndef BOR |
| 14 | BOR = E:\BORLANDC |
| 15 | !endif |
| 16 | |
| 17 | !if ("$(DEBUG)" == "yes") |
| 18 | DEBUG_FLAG = -v |
| 19 | !else |
| 20 | DEBUG_FLAG = |
| 21 | !endif |
| 22 | |
| 23 | CC = $(BOR)\bin\bcc.exe +VIM.CFG |
| 24 | TLINK = $(BOR)\bin\tlink.exe |
| 25 | |
| 26 | !ifndef SPAWNO |
| 27 | SPAWNO = C:\CC\SPAWN |
| 28 | !endif |
| 29 | |
| 30 | !if ("$(SPAWNO)" == "") |
| 31 | LIBPATH = $(BOR)\LIB |
| 32 | INCLUDEPATH = $(BOR)\INCLUDE |
| 33 | SPAWND = |
| 34 | SPAWNL = |
| 35 | !else |
| 36 | LIBPATH = $(BOR)\LIB;$(SPAWNO) |
| 37 | INCLUDEPATH = $(BOR)\INCLUDE;$(SPAWNO) |
| 38 | SPAWND = ;SPAWNO |
| 39 | SPAWNL = spawnl.lib |
| 40 | !endif |
| 41 | |
| 42 | |
| 43 | # *Implicit Rules* |
| 44 | # |
| 45 | # use -v for debugging |
| 46 | # |
| 47 | .c.obj: |
| 48 | $(CC) -c $(DEBUG_FLAG) {$< } |
| 49 | |
| 50 | # *List Macros* |
| 51 | |
| 52 | |
| 53 | EXE_dependencies = \ |
| 54 | buffer.obj \ |
| 55 | charset.obj \ |
| 56 | diff.obj \ |
| 57 | digraph.obj \ |
| 58 | edit.obj \ |
| 59 | eval.obj \ |
| 60 | ex_cmds.obj \ |
| 61 | ex_cmds2.obj \ |
| 62 | ex_docmd.obj \ |
| 63 | ex_eval.obj \ |
| 64 | ex_getln.obj \ |
| 65 | fileio.obj \ |
| 66 | fold.obj \ |
| 67 | getchar.obj \ |
Bram Moolenaar | 58d9823 | 2005-07-23 22:25:46 +0000 | [diff] [blame] | 68 | hardcopy.obj \ |
Bram Moolenaar | 383f9bc | 2005-01-19 22:18:32 +0000 | [diff] [blame] | 69 | hashtable.obj \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 70 | main.obj \ |
| 71 | mark.obj \ |
| 72 | memfile.obj \ |
| 73 | memline.obj \ |
| 74 | menu.obj \ |
| 75 | message.obj \ |
| 76 | misc1.obj \ |
| 77 | misc2.obj \ |
| 78 | move.obj \ |
| 79 | os_msdos.obj \ |
| 80 | normal.obj \ |
| 81 | ops.obj \ |
| 82 | option.obj \ |
Bram Moolenaar | 1c7715d | 2005-10-03 22:02:18 +0000 | [diff] [blame] | 83 | popupmenu.obj \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 84 | quickfix.obj \ |
| 85 | regexp.obj \ |
| 86 | screen.obj \ |
| 87 | search.obj \ |
Bram Moolenaar | 6bb6836 | 2005-03-22 23:03:44 +0000 | [diff] [blame] | 88 | spell.obj \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 89 | syntax.obj \ |
| 90 | tag.obj \ |
| 91 | term.obj \ |
| 92 | ui.obj \ |
| 93 | undo.obj \ |
| 94 | window.obj |
| 95 | |
| 96 | all: vim.exe install.exe uninstal.exe xxd/xxd.exe |
| 97 | |
| 98 | # *Explicit Rules* |
| 99 | |
| 100 | vim.exe: vim.cfg $(EXE_dependencies) version.c |
| 101 | $(CC) $(DEBUG_FLAG) -c version.c |
| 102 | $(TLINK) /x/c/L$(LIBPATH) $(DEBUG_FLAG) @&&| |
| 103 | c0l.obj $(EXE_dependencies) version.obj |
| 104 | vim |
| 105 | # no map file |
| 106 | $(SPAWNL) cl.lib |
| 107 | | |
| 108 | |
| 109 | install.exe: dosinst.c |
| 110 | $(CC) -einstall $(DEBUG_FLAG) dosinst.c |
| 111 | |
| 112 | uninstal.exe: uninstal.c |
| 113 | $(CC) $(DEBUG_FLAG) uninstal.c |
| 114 | |
| 115 | # This may fail for older make versions, building xxd will fail anyway then. |
| 116 | xxd/xxd.exe: xxd/xxd.c |
| 117 | cd xxd |
| 118 | $(MAKE) -f Make_bc3.mak BOR=$(BOR) DEBUG=$(DEBUG) |
| 119 | cd .. |
| 120 | |
| 121 | # cleaning up: Delete all generated files |
| 122 | clean: |
| 123 | -del *.obj |
| 124 | -del vim.exe |
| 125 | -del vim.sym |
| 126 | -del install.exe |
| 127 | -del uninstal.exe |
| 128 | -del xxd\*.obj |
| 129 | -del xxd\xxd.exe |
| 130 | -del vim.cfg |
| 131 | -del testdir\*.out |
| 132 | |
| 133 | # Individual File Dependencies (incomplete) |
| 134 | ex_docmd.obj: ex_docmd.c ex_cmds.h |
| 135 | |
| 136 | ex_eval.obj: ex_eval.c ex_cmds.h |
| 137 | |
| 138 | main.obj: main.c globals.h option.h |
| 139 | |
| 140 | term.obj: term.c term.h |
| 141 | |
| 142 | version.obj: version.c version.h |
| 143 | |
| 144 | |
| 145 | # Compiler Configuration File |
| 146 | # |
| 147 | # The following compile options can be changed for better machines. |
| 148 | # replace -1- with -2 to produce code for a 80286 or higher |
| 149 | # replace -1- with -3 to produce code for a 80386 or higher |
| 150 | # add -v for source debugging |
| 151 | vim.cfg: Make_bc3.mak |
| 152 | copy &&| |
| 153 | -ml |
| 154 | -1- |
| 155 | -f- |
| 156 | -C |
| 157 | -N |
| 158 | -O |
| 159 | -Z |
| 160 | -k- |
| 161 | -d |
| 162 | -h |
| 163 | -vi- |
| 164 | -H=VIM.SYM |
| 165 | -w-par |
| 166 | -weas |
| 167 | -wpre |
| 168 | -Iproto |
| 169 | -I$(INCLUDEPATH) |
| 170 | -L$(LIBPATH) |
| 171 | -DMSDOS$(SPAWND) |
| 172 | | vim.cfg |
| 173 | |
| 174 | test: |
| 175 | cd testdir |
| 176 | $(MAKE) -f Make_dos.mak small |
| 177 | cd .. |