ADDLIB+=ipx_ntop.o ipx_pton.o
CC = gcc
+GCCVERSION = $(shell gcc -dumpversion | cut -f1 -d.)
HOSTCC = gcc
DEFINES += -D_GNU_SOURCE
CCOPTS = -O2
WFLAGS := -g -Wall -Wstrict-prototypes -Werror -Wmissing-prototypes
WFLAGS += -Wmissing-declarations -Wold-style-definition
+# Add exception option for gcc-9
+WFLAGS += -Wno-stringop-truncation -Wno-stringop-overflow -Wno-format-truncation
+ifeq "$(GCCVERSION)" "9"
+WFLAGS += -Wno-error=memset-elt-size
+endif
CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)
YACCFLAGS = -d -t -v
CFLAGS += -fstack-protector-strong -Wl,-z,relro -D_FORTIFY_SOURCE=2 -fPIE -pie
-# Add exception option for gcc-9
-CFLAGS += -Wno-stringop-truncation -Wno-stringop-overflow -Wno-format-truncation
LDFLAGS += -pie -Wl,-z,relro,-z,now
SUBDIRS=lib ip tc bridge misc netem genl man