I am unable to understand the following piece of code from Contiki-os' native platform's makefile.
NM ?= nm
OBJCOPY ?= objcopy
STRIP ?= strip
ifdef WERROR
CFLAGSWERROR=-Werror -pedantic -std=c99 -Werror
endif
CFLAGSNO = -Wall -g -I/usr/local/include $(CFLAGSWERROR)
CFLAGS += $(CFLAGSNO) -O
Source: https://github.com/contiki-os/contiki/blob/master/cpu/native/Makefile.native#L13-20
It is not the variable assignments that i do not understand, my questions is what is 'WERROR' and how is it related to 'CFLAGS' and what is NM refer to? CC refers to compiler, LD to linker.
It would be great if someone could help me.