view src/Make_ami.mak @ 33404:9b35b4c6df4c v9.0.1960

patch 9.0.1960: Make CI checks more strict Commit: https://github.com/vim/vim/commit/f7f746b1672909ae57d2eec97253d6627f6c0887 Author: Yee Cheng Chin <ychin.git@gmail.com> Date: Sat Sep 30 12:28:50 2023 +0200 patch 9.0.1960: Make CI checks more strict Problem: Make CI checks more strict Solution: Add -Wstrict-prototypes -Wmissing-prototypes to CI, fix uncovered problems Add -Wstrict-prototypes -Wmissing-prototypes warnings check to CI Add two new warnings to CI, silence some Perl related build-warnings: - `strict-prototypes` helps prevent declaring a function with an empty argument list, e.g. `int func()`. In C++, that's equivalent to `int func(void)`, but in C, that means a function that can take any number of arguments which is rarely what we want. - `missing-prototypes` makes sure we use `static` for file-only internal functions. Non-static functions should have been declared on a prototype file. - Add `no-compound-token-split-by-macro` to the perl cflags, since it throws out a bunch of perl-related warnings that make the CI log unnecessary verbose and hard to read. This seems to happen only with clang 12 and above. When applying those changes, it already uncovered a few warnings, so fix up the code as well (fix prototypes, make the code static, remove shadowed var declaration) GTK header needs to have #pragma warning suppressiong because GTK2 headers will warn on `-Wstrict-prototypes`, and it's included by gui.h and so we can't just turn off the warning in a couple files. closes: #13223 closes: #13226 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
author Christian Brabandt <cb@256bit.org>
date Sat, 30 Sep 2023 12:45:05 +0200
parents 5acc0d2cf4f7
children 500731fe8161
line wrap: on
line source

#
# 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 'normal' build
ifeq ($(BUILD),normal)
CFLAGS +=\
	-DFEAT_BROWSE \
	-DFEAT_MOUSE \
	-DFEAT_NORMAL
else

# Vim 'small' build - now an alias for 'tiny'
ifeq ($(BUILD),small)
CFLAGS += -DFEAT_TINY
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)
CFLAGS += -noixemul
LDFLAGS = -ldebug -lm -noixemul
endif
endif
endif

# Patch level used for Amiga style version string
ifdef PATCHLEVEL
CFLAGS += -DPATCHLEVEL=\"$(PATCHLEVEL)\"
endif

# Common sources
SRC += \
	alloc.c \
	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 \
	float.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 \
	logfile.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 \
	strings.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 \
	vim9class.c \
	vim9cmds.c \
	vim9compile.c \
	vim9execute.c \
	vim9expr.c \
	vim9instr.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)