#############################################################################
# mined text editor compilation options (make include file for gcc options)


#############################################################################
# compilation source options

# Define if pedantic analysis wanted:
#GFLAGS	= -ansi -pedantic -Wall -Wtraditional -Wpointer-arith -Wconversion -Waggregate-return -Winline
# For regular compilation:
# Leave in extra flags that produce no warnings (covered by -Wall):
#	-Wimplicit-int -Wreturn-type -Wunused -Wswitch -Wchar-subscripts -Wparentheses
# Leave out extra flags that produce some warnings:
#	-Wtraditional
#	-W -Wuninitialized (covered by -Wall)
# Perhaps also leave out flag that produces extra warnings (Linux, ...?):
#	-Wconversion
# (rotten C crap: value does match prototype, so why this silly 
#  warning "passing arg ... with different width due to prototype" ???
# Perhaps also leave out flag that produces extra warnings (Linux, ...?):
#	-pedantic
# (rotten C crap: prototype matches exactly, so why this silly 
#  warning "promoted argument `c' doesn't match prototype" ???
GFLAGS	= -ansi -Waggregate-return -Winline \
	-Wimplicit-int -Wunused -Wswitch -Wchar-subscripts \
	-Wparentheses -Wmissing-braces \
#	-Wreturn-type	# causes obscure "error 1" on my Linux
#	-Wall \
#	-pedantic	# causes junk messages about "braced groups"
#	-Wpointer-arith	# causes junk messages from library include files
#	-Wconversion	# causes junk messages from library include files

# code checking
# checking for function signatures:
PROTOFLAGS=	-Wmissing-prototypes -Wreturn-type # -Wstrict-prototypes
#		or looser: -Wmissing-declarations


#############################################################################
# compilation mode options (optimisation and debug)

# Optimization flag/level:
OPT	= -O2

# Debugging option
DEBUG	= # -ggdb -gstabs


#############################################################################
# compilation setup

# Collection of compilation parameters:
CFLAGS	= $(SYSFLAGS) $(GFLAGS) $(OPT) $(DEBUG)


#############################################################################
# link options

LINKOPTS=$(GLDOPTS) # --warn-common?


#############################################################################
# dynamic make targets
# this version for GNU make
# (if gcc is used, GNU make is also assumed)

# derive list of character set mappings from source files:
CHARMAPS=$(shell echo charmaps/*.map | sed -e "s,\.map,.o,g" )

# extract list of configured keyboard mappings from keymaps.cfg:
KEYMAPS=$(shell ./mkkmlist )

# disable the explicit make targets for dynamically 
# generating and invoking makefiles
MAKEMAPS=


#############################################################################
# end
