blob: a642d91285fe5597a866b0dc99f591448a469bf4 [file] [log] [blame]
Bram Moolenaara62372b2020-09-09 20:41:40 +02001#
2# Makefile for AROS, AmigaOS4 and MorphOS.
3#
4BIN = vim
5CC ?= gcc
6LD = $(CC)
7UNM ?= $(shell uname)
8DEBUG ?= no
9BUILD ?= huge
10CFLAGS = -c -O3
11
12# Common compiler flags
13CFLAGS += \
14 -DNO_ARP \
15 -DUSE_TMPNAM \
16 -DHAVE_STDARG_H \
17 -DHAVE_TGETENT \
18 -DHAVE_TERMCAP \
19 -DNEW_SHELLSIZE \
20 -I proto \
21 -Wno-attributes \
22 -Wextra
23
24# Vim 'huge' build
25ifeq ($(BUILD),huge)
26CFLAGS += \
27 -DFEAT_BROWSE \
28 -DFEAT_MOUSE \
29 -DFEAT_HUGE
30else
31
Bram Moolenaara62372b2020-09-09 20:41:40 +020032# Vim 'normal' build
33ifeq ($(BUILD),normal)
34CFLAGS +=\
35 -DFEAT_BROWSE \
36 -DFEAT_MOUSE \
37 -DFEAT_NORMAL
38else
39
Martin Tournoij7904fa42022-10-04 16:28:45 +010040# Vim 'small' build - now an alias for 'tiny'
Bram Moolenaara62372b2020-09-09 20:41:40 +020041ifeq ($(BUILD),small)
Martin Tournoij7904fa42022-10-04 16:28:45 +010042CFLAGS += -DFEAT_TINY
Bram Moolenaara62372b2020-09-09 20:41:40 +020043else
44
45# Vim 'tiny' build
46ifeq ($(BUILD),tiny)
47CFLAGS += -DFEAT_TINY
48endif
49endif
50endif
51endif
52endif
53
54# OS specific compiler flags
55ifeq ($(UNM),AmigaOS)
56LDFLAGS = -mcrt=clib2 -lauto -lm -lnet
57CFLAGS += -DHAVE_FSYNC -D__USE_INLINE__ -mcrt=clib2
58else
59ifeq ($(UNM),AROS)
60LDFLAGS = -DHAVE_FSYNC -ldebug
61else
62ifeq ($(UNM),MorphOS)
=?UTF-8?q?Ola=20S=C3=B6der?=4d2073b2022-09-25 19:36:38 +010063CFLAGS += -noixemul
64LDFLAGS = -ldebug -lm -noixemul
Bram Moolenaara62372b2020-09-09 20:41:40 +020065endif
66endif
67endif
68
69# Patch level used for Amiga style version string
70ifdef PATCHLEVEL
71CFLAGS += -DPATCHLEVEL=\"$(PATCHLEVEL)\"
72endif
73
74# Common sources
75SRC += \
Yegappan Lakshmanancbae5802021-08-06 21:51:55 +020076 alloc.c \
Bram Moolenaara62372b2020-09-09 20:41:40 +020077 arabic.c \
78 arglist.c \
79 autocmd.c \
80 beval.c \
81 blob.c \
82 blowfish.c \
83 buffer.c \
84 bufwrite.c \
85 change.c \
86 charset.c \
87 cindent.c \
88 clientserver.c \
89 clipboard.c \
90 cmdhist.c \
91 cmdexpand.c \
92 crypt.c \
93 crypt_zip.c \
94 debugger.c \
95 dict.c \
96 diff.c \
97 digraph.c \
98 drawline.c \
99 drawscreen.c \
100 edit.c \
101 eval.c \
102 evalbuffer.c \
103 evalfunc.c \
104 evalvars.c \
105 evalwindow.c \
106 ex_cmds.c \
107 ex_cmds2.c \
108 ex_docmd.c \
109 ex_eval.c \
110 ex_getln.c \
111 fileio.c \
112 filepath.c \
113 findfile.c \
Yegappan Lakshmanan01c798c2021-06-02 17:07:18 +0200114 float.c \
Bram Moolenaara62372b2020-09-09 20:41:40 +0200115 fold.c \
116 getchar.c \
117 hardcopy.c \
118 hashtab.c \
119 help.c \
120 highlight.c \
121 if_cscope.c \
122 indent.c \
123 insexpand.c \
124 json.c \
125 list.c \
126 locale.c \
Bram Moolenaar4c5678f2022-11-30 18:12:19 +0000127 logfile.c \
Bram Moolenaara62372b2020-09-09 20:41:40 +0200128 main.c \
129 mark.c \
130 map.c \
131 match.c \
132 mbyte.c \
133 memfile.c \
134 memline.c \
135 menu.c \
136 message.c \
137 misc1.c \
138 misc2.c \
139 mouse.c \
140 move.c \
141 normal.c \
142 ops.c \
143 option.c \
144 optionstr.c \
145 os_amiga.c \
146 popupmenu.c \
147 popupwin.c \
148 quickfix.c \
149 regexp.c \
150 register.c \
151 screen.c \
152 scriptfile.c \
153 search.c \
154 session.c \
155 sha256.c \
156 sign.c \
157 spell.c \
158 spellfile.c \
159 spellsuggest.c \
Yegappan Lakshmanana2438132021-07-10 21:29:18 +0200160 strings.c \
Bram Moolenaara62372b2020-09-09 20:41:40 +0200161 syntax.c \
162 tag.c \
163 term.c \
164 termlib.c \
165 testing.c \
166 textformat.c \
167 textobject.c \
168 textprop.c \
169 time.c \
170 typval.c \
171 ui.c \
172 undo.c \
173 usercmd.c \
174 userfunc.c \
175 version.c \
176 viminfo.c \
Bram Moolenaardc7c3662021-12-20 15:04:29 +0000177 vim9cmds.c \
Bram Moolenaara62372b2020-09-09 20:41:40 +0200178 vim9compile.c \
179 vim9execute.c \
Bram Moolenaardc7c3662021-12-20 15:04:29 +0000180 vim9expr.c \
181 vim9instr.c \
Bram Moolenaara62372b2020-09-09 20:41:40 +0200182 vim9script.c \
183 vim9type.c \
184 window.c \
185 xdiff/xdiffi.c \
186 xdiff/xemit.c \
187 xdiff/xhistogram.c \
188 xdiff/xpatience.c \
189 xdiff/xprepare.c \
190 xdiff/xutils.c
191
192OBJ = $(SRC:.c=.o)
193
194# Build everything - Ignoring header dependencies.
195$(BIN): $(OBJ)
196 ${LD} -o $(BIN) $(OBJ) $(LDFLAGS)
197
198# Clean up
199.PHONY: clean
200clean:
201 $(RM) -fv $(OBJ) $(BIN)