contiki - Unable to understand this piece of code in a makefile -


i unable understand following piece of code 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 not variable assignments not understand, questions 'werror' , how related 'cflags' , nm refer to? cc refers compiler, ld linker.

it great if me.

if werror defined, make file add options compilation, warnings treated errors. presumably, @ point define werror=1 triggering stricter build. cflags used in rule compiles source code object code.

from: http://www.chemie.fu-berlin.de/chemnet/use/info/make/make_7.html

compiling c programs:

n.o made automatically n.c recipe of form ‘$(cc) $(cppflags) $(cflags) -c’.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -