Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | # |
| 2 | # Makefile for VIM on MSDOS, using DJGPP 2.0 |
| 3 | # |
| 4 | |
| 5 | #>>>>> choose options: |
| 6 | |
| 7 | ### See feature.h for a list of optionals. |
| 8 | ### Any other defines can be included here. |
| 9 | |
| 10 | DEFINES = |
| 11 | |
| 12 | #>>>>> name of the compiler and linker, name of lib directory |
| 13 | CC = gcc |
| 14 | |
| 15 | #>>>>> end of choices |
| 16 | ########################################################################### |
| 17 | |
| 18 | INCL = vim.h globals.h option.h keymap.h macros.h ascii.h term.h os_msdos.h structs.h |
| 19 | CFLAGS = -O2 -DMSDOS -Iproto $(DEFINES) -Wall -Dinterrupt= -Dfar= -DMAXMEM=512 -D_NAIVE_DOS_REGS |
| 20 | |
| 21 | OBJ = \ |
| 22 | obj/buffer.o \ |
| 23 | obj/charset.o \ |
| 24 | obj/diff.o \ |
| 25 | obj/digraph.o \ |
| 26 | obj/edit.o \ |
| 27 | obj/eval.o \ |
| 28 | obj/ex_cmds.o \ |
| 29 | obj/ex_cmds2.o \ |
| 30 | obj/ex_docmd.o \ |
| 31 | obj/ex_eval.o \ |
| 32 | obj/ex_getln.o \ |
| 33 | obj/fileio.o \ |
| 34 | obj/fold.o \ |
| 35 | obj/getchar.o \ |
Bram Moolenaar | 58d9823 | 2005-07-23 22:25:46 +0000 | [diff] [blame] | 36 | obj/hardcopy.o \ |
Bram Moolenaar | 76b92b2 | 2006-03-24 22:46:53 +0000 | [diff] [blame] | 37 | obj/hashtab.o \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 38 | obj/main.o \ |
| 39 | obj/mark.o \ |
| 40 | obj/memfile.o \ |
| 41 | obj/memline.o \ |
| 42 | obj/menu.o \ |
| 43 | obj/message.o \ |
| 44 | obj/misc1.o \ |
| 45 | obj/misc2.o \ |
| 46 | obj/move.o \ |
| 47 | obj/mbyte.o \ |
| 48 | obj/normal.o \ |
| 49 | obj/ops.o \ |
| 50 | obj/option.o \ |
| 51 | obj/os_msdos.o \ |
Bram Moolenaar | 76b92b2 | 2006-03-24 22:46:53 +0000 | [diff] [blame] | 52 | obj/popupmnu.o \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 53 | obj/quickfix.o \ |
| 54 | obj/regexp.o \ |
| 55 | obj/screen.o \ |
| 56 | obj/search.o \ |
Bram Moolenaar | 43b604c | 2005-03-22 23:06:55 +0000 | [diff] [blame] | 57 | obj/spell.o \ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 58 | obj/syntax.o \ |
| 59 | obj/tag.o \ |
| 60 | obj/term.o \ |
| 61 | obj/ui.o \ |
| 62 | obj/undo.o \ |
| 63 | obj/window.o \ |
| 64 | $(TERMLIB) |
| 65 | |
| 66 | all: vim.exe install.exe uninstal.exe xxd/xxd.exe |
| 67 | |
| 68 | # version.c is compiled each time, so that it sets the build time. |
| 69 | vim.exe: obj $(OBJ) version.c version.h |
| 70 | $(CC) $(CFLAGS) -s -o vim.exe version.c $(OBJ) -lpc |
| 71 | |
| 72 | install.exe: dosinst.c |
| 73 | $(CC) $(CFLAGS) -s -o install.exe dosinst.c -lpc |
| 74 | |
| 75 | uninstal.exe: uninstal.c |
| 76 | $(CC) $(CFLAGS) -s -o uninstal.exe uninstal.c -lpc |
| 77 | |
| 78 | # This requires GNU make. |
| 79 | xxd/xxd.exe: xxd/xxd.c |
| 80 | $(MAKE) --directory=xxd -f Make_djg.mak |
| 81 | |
| 82 | obj: |
| 83 | mkdir obj |
| 84 | |
| 85 | tags: |
| 86 | command /c ctags *.c $(INCL) ex_cmds.h |
| 87 | |
| 88 | clean: |
| 89 | -del obj\*.o |
| 90 | -rmdir obj |
| 91 | -del vim.exe |
| 92 | -del install.exe |
| 93 | -del xxd\xxd.exe |
| 94 | -del testdir\*.out |
| 95 | |
| 96 | # This requires GNU make. |
| 97 | test: |
| 98 | $(MAKE) --directory=testdir -f Make_dos.mak |
| 99 | |
| 100 | ########################################################################### |
| 101 | |
| 102 | obj/%.o: %.c obj $(INCL) |
| 103 | $(CC) -c $(CFLAGS) -o $@ $< |
| 104 | |
| 105 | # Extra dependency (there are actually many more...) |
| 106 | obj/ex_docmd.o: ex_cmds.h |