blob: fa4af40d300fdff7d15508a78636a4df6b4d2980 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001#
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
10DEFINES =
11
12#>>>>> name of the compiler and linker, name of lib directory
13CC = gcc
14
15#>>>>> end of choices
16###########################################################################
17
18INCL = vim.h globals.h option.h keymap.h macros.h ascii.h term.h os_msdos.h structs.h
19CFLAGS = -O2 -DMSDOS -Iproto $(DEFINES) -Wall -Dinterrupt= -Dfar= -DMAXMEM=512 -D_NAIVE_DOS_REGS
20
21OBJ = \
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 Moolenaar58d98232005-07-23 22:25:46 +000036 obj/hardcopy.o \
Bram Moolenaarce5e58e2005-01-19 22:24:34 +000037 obj/hashtable.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +000038 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 \
52 obj/quickfix.o \
53 obj/regexp.o \
54 obj/screen.o \
55 obj/search.o \
Bram Moolenaar43b604c2005-03-22 23:06:55 +000056 obj/spell.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +000057 obj/syntax.o \
58 obj/tag.o \
59 obj/term.o \
60 obj/ui.o \
61 obj/undo.o \
62 obj/window.o \
63 $(TERMLIB)
64
65all: vim.exe install.exe uninstal.exe xxd/xxd.exe
66
67# version.c is compiled each time, so that it sets the build time.
68vim.exe: obj $(OBJ) version.c version.h
69 $(CC) $(CFLAGS) -s -o vim.exe version.c $(OBJ) -lpc
70
71install.exe: dosinst.c
72 $(CC) $(CFLAGS) -s -o install.exe dosinst.c -lpc
73
74uninstal.exe: uninstal.c
75 $(CC) $(CFLAGS) -s -o uninstal.exe uninstal.c -lpc
76
77# This requires GNU make.
78xxd/xxd.exe: xxd/xxd.c
79 $(MAKE) --directory=xxd -f Make_djg.mak
80
81obj:
82 mkdir obj
83
84tags:
85 command /c ctags *.c $(INCL) ex_cmds.h
86
87clean:
88 -del obj\*.o
89 -rmdir obj
90 -del vim.exe
91 -del install.exe
92 -del xxd\xxd.exe
93 -del testdir\*.out
94
95# This requires GNU make.
96test:
97 $(MAKE) --directory=testdir -f Make_dos.mak
98
99###########################################################################
100
101obj/%.o: %.c obj $(INCL)
102 $(CC) -c $(CFLAGS) -o $@ $<
103
104# Extra dependency (there are actually many more...)
105obj/ex_docmd.o: ex_cmds.h