]> granicus.if.org Git - vim/commitdiff
patch 8.2.1648: Amiga: no common build file for Amiga (-like) systems v8.2.1648
authorBram Moolenaar <Bram@vim.org>
Wed, 9 Sep 2020 18:41:40 +0000 (20:41 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 9 Sep 2020 18:41:40 +0000 (20:41 +0200)
Problem:    Amiga: no common build file for Amiga (-like) systems.
Solution:   Turn Make_morph.mak into Make_ami.mak. (Ola Söder, closes #6805)

Filelist
src/INSTALLami.txt
src/Make_ami.mak [new file with mode: 0644]
src/Make_morph.mak [deleted file]
src/version.c

index 12b973fc402270548b1637237b427899fd875b7f..a094634628003c8cdbc4cb4079a802cee22a2111 100644 (file)
--- a/Filelist
+++ b/Filelist
@@ -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 \
index 0acd6fdffea7b3aed06bcf6ad5ed23affe97dd0f..a2c9faf2470fa7633bf1343d5f4fd093d6b579f9 100644 (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
-
-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.
-
-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.
-
+make -f Make_ami.mak        gcc
+make -f Make_ami.mak CC=vc  vbcc
 
-MorphOS
+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:
 
-Use the Make_morph.mak Makefile:
-       make -f Make_morph.mak
+make -f Make_ami.mak CC=ppc-morphos-gcc UNM=MorphOS
diff --git a/src/Make_ami.mak b/src/Make_ami.mak
new file mode 100644 (file)
index 0000000..88b3986
--- /dev/null
@@ -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)
diff --git a/src/Make_morph.mak b/src/Make_morph.mak
deleted file mode 100644 (file)
index d293829..0000000
+++ /dev/null
@@ -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
index 5cb8df08e9bbfd58bdc98442ca2b57ef806b3d3d..5632a9f3ce1386712c4165b4b9fccc57d93ebd4a 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1648,
 /**/
     1647,
 /**/