patch 8.2.1648: Amiga: no common build file for Amiga (-like) systems

Problem:    Amiga: no common build file for Amiga (-like) systems.
Solution:   Turn Make_morph.mak into Make_ami.mak. (Ola Söder, closes #6805)
This commit is contained in:
Bram Moolenaar 2020-09-09 20:41:40 +02:00
parent 4ed124cc6c
commit a62372be1f
5 changed files with 212 additions and 156 deletions

View File

@ -623,7 +623,7 @@ SRC_AMI = \
README_amisrc.txt.info \
src.info \
src/INSTALLami.txt \
src/Make_morph.mak \
src/Make_ami.mak \
src/os_amiga.c \
src/os_amiga.h \
src/proto/os_amiga.pro \

View File

@ -1,4 +1,4 @@
INSTALLami.txt - Installation of Vim from source on Amiga
INSTALLami.txt - Installation of Vim from source on Amiga and MorphOS
This file contains instructions for compiling Vim. If you already have an
executable version of Vim, you don't need this.
@ -7,28 +7,13 @@ The file "feature.h" can be edited to match your preferences. You can skip
this, then you will get the default behavior as is documented, which should
be fine for most people.
Summary:
make -f Make_manx.mak Manx C
make -f Make_sas.mak Lattice/SAS C
make -f Make_dice.mak DICE
make -f Make_ami.mak gcc
make -f Make_ami.mak CC=vc vbcc
The Manx compiler is preferred, it was used to produce the Amiga executable
and has been tested most. You should not get any errors or warnings.
Please note that currently only gcc has been tested. VBCC would need its own
CFLAGS, but should otherwise work out of the box. For cross-compiling, UNM
can be used to override uname and thereby set the target. An example is shown
below:
The SAS compiler can be used. Older versions (6.0 to 6.3) don't work with the
optimizer switched on. This seems to be fixed with 6.5 or 6.56, but this has
not been tested much. Also disable optimizing when the compiler runs out of
memory or crashes the system (yes, that happens; did I say the Manx compiler
is preferred?).
The DICE makefile has been reported to work by one person only.
You will have to set the "VIM" environment variable to the location of the
documentation files.
MorphOS
Use the Make_morph.mak Makefile:
make -f Make_morph.mak
make -f Make_ami.mak CC=ppc-morphos-gcc UNM=MorphOS

201
src/Make_ami.mak Normal file
View File

@ -0,0 +1,201 @@
#
# Makefile for AROS, AmigaOS4 and MorphOS.
#
BIN = vim
CC ?= gcc
LD = $(CC)
UNM ?= $(shell uname)
DEBUG ?= no
BUILD ?= huge
CFLAGS = -c -O3
# Common compiler flags
CFLAGS += \
-DNO_ARP \
-DUSE_TMPNAM \
-DHAVE_STDARG_H \
-DHAVE_TGETENT \
-DHAVE_TERMCAP \
-DNEW_SHELLSIZE \
-I proto \
-Wno-attributes \
-Wextra
# Vim 'huge' build
ifeq ($(BUILD),huge)
CFLAGS += \
-DFEAT_BROWSE \
-DFEAT_MOUSE \
-DFEAT_HUGE
else
# Vim 'big' build
ifeq ($(BUILD),big)
CFLAGS += \
-DFEAT_BROWSE \
-DFEAT_MOUSE \
-DFEAT_BIG
else
# Vim 'normal' build
ifeq ($(BUILD),normal)
CFLAGS +=\
-DFEAT_BROWSE \
-DFEAT_MOUSE \
-DFEAT_NORMAL
else
# Vim 'small' build
ifeq ($(BUILD),small)
CFLAGS += -DFEAT_SMALL
else
# Vim 'tiny' build
ifeq ($(BUILD),tiny)
CFLAGS += -DFEAT_TINY
endif
endif
endif
endif
endif
# OS specific compiler flags
ifeq ($(UNM),AmigaOS)
LDFLAGS = -mcrt=clib2 -lauto -lm -lnet
CFLAGS += -DHAVE_FSYNC -D__USE_INLINE__ -mcrt=clib2
else
ifeq ($(UNM),AROS)
LDFLAGS = -DHAVE_FSYNC -ldebug
else
ifeq ($(UNM),MorphOS)
LDFLAGS = -ldebug -noixemul
endif
endif
endif
# Patch level used for Amiga style version string
ifdef PATCHLEVEL
CFLAGS += -DPATCHLEVEL=\"$(PATCHLEVEL)\"
endif
# Common sources
SRC += \
arabic.c \
arglist.c \
autocmd.c \
beval.c \
blob.c \
blowfish.c \
buffer.c \
bufwrite.c \
change.c \
charset.c \
cindent.c \
clientserver.c \
clipboard.c \
cmdhist.c \
cmdexpand.c \
crypt.c \
crypt_zip.c \
debugger.c \
dict.c \
diff.c \
digraph.c \
drawline.c \
drawscreen.c \
edit.c \
eval.c \
evalbuffer.c \
evalfunc.c \
evalvars.c \
evalwindow.c \
ex_cmds.c \
ex_cmds2.c \
ex_docmd.c \
ex_eval.c \
ex_getln.c \
fileio.c \
filepath.c \
findfile.c \
fold.c \
getchar.c \
hardcopy.c \
hashtab.c \
help.c \
highlight.c \
if_cscope.c \
indent.c \
insexpand.c \
json.c \
list.c \
locale.c \
main.c \
mark.c \
map.c \
match.c \
mbyte.c \
memfile.c \
memline.c \
menu.c \
message.c \
misc1.c \
misc2.c \
mouse.c \
move.c \
normal.c \
ops.c \
option.c \
optionstr.c \
os_amiga.c \
popupmenu.c \
popupwin.c \
quickfix.c \
regexp.c \
register.c \
screen.c \
scriptfile.c \
search.c \
session.c \
sha256.c \
sign.c \
spell.c \
spellfile.c \
spellsuggest.c \
syntax.c \
tag.c \
term.c \
termlib.c \
testing.c \
textformat.c \
textobject.c \
textprop.c \
time.c \
typval.c \
ui.c \
undo.c \
usercmd.c \
userfunc.c \
version.c \
viminfo.c \
vim9compile.c \
vim9execute.c \
vim9script.c \
vim9type.c \
window.c \
xdiff/xdiffi.c \
xdiff/xemit.c \
xdiff/xhistogram.c \
xdiff/xpatience.c \
xdiff/xprepare.c \
xdiff/xutils.c
OBJ = $(SRC:.c=.o)
# Build everything - Ignoring header dependencies.
$(BIN): $(OBJ)
${LD} -o $(BIN) $(OBJ) $(LDFLAGS)
# Clean up
.PHONY: clean
clean:
$(RM) -fv $(OBJ) $(BIN)

View File

@ -1,132 +0,0 @@
#
# Makefile for VIM, using MorphOS SDK (gcc 2.95.3)
#
CFLAGS = -c \
-pipe \
-O2 \
-Wall \
\
-DNO_ARP \
-DUSE_TMPNAM \
\
-I proto \
\
-noixemul
PRG = Vim
LIBS = -noixemul -s
CC = gcc
LD = gcc
OBJDUMP = objdump
RM = rm
.c.o:
${CC} ${CFLAGS} $< -o $@
SRC = arabic.c \
arglist.c \
autocmd.c \
blowfish.c \
buffer.c \
bufwrite.c \
change.c \
charset.c \
cindent.c \
clientserver.c \
clipboard.c \
cmdexpand.c \
cmdhist.c \
crypt.c \
crypt_zip.c \
debugger.c \
dict.c \
diff.c \
digraph.c \
drawline.c \
drawscreen.c \
edit.c \
eval.c \
evalbuffer.c \
evalfunc.c \
evalvars.c \
evalwindow.c \
ex_cmds.c \
ex_cmds2.c \
ex_docmd.c \
ex_eval.c \
ex_getln.c \
fileio.c \
filepath.c \
findfile.c \
fold.c \
getchar.c \
gui_xim.c \
hardcopy.c \
hashtab.c \
help.c \
highlight.c \
indent.c \
insexpand.c \
json.c \
list.c \
locale.c \
main.c \
map.c \
mark.c \
match.c \
mbyte.c \
memfile.c \
memline.c \
menu.c \
message.c \
misc1.c \
misc2.c \
mouse.c \
move.c \
normal.c \
ops.c \
option.c \
optionstr.c \
os_amiga.c \
popupmenu.c \
profiler.c \
quickfix.c \
regexp.c \
register.c \
scriptfile.c \
screen.c \
search.c \
session.c \
sha256.c \
sign.c \
spell.c \
spellfile.c \
spellsuggest.c \
syntax.c \
tag.c \
term.c \
testing.c \
textformat.c \
textobject.c \
textprop.c \
time.c \
typval.c \
ui.c \
undo.c \
usercmd.c \
userfunc.c \
version.c \
viminfo.c \
window.c \
OBJ = $(SRC:.c=.o)
$(PRG): $(OBJ)
${LD} -o $(PRG) $(OBJ) $(LIBS)
dump: $(PRG)
$(OBJDUMP) --reloc --disassemble-all $(PRG) > $(PRG).s
clean:
$(RM) -fv $(OBJ) $(PRG) $(PRG).s

View File

@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1648,
/**/
1647,
/**/