• Alon Bar-Lev's avatar
    build: Makefile: cleanup CFLAGS · f7a9f303
    Alon Bar-Lev authored
    
    
    CFLAGS are reserved for external interaction via make variable, the
    following should work:
    
    $ make CFLAGS="-O3"
    $ CFLAGS="-O3" make
    
    1. Move internal flags to LOCAL_CFLAGS
    2. Respect external CFLAGS
    3. CFLAGS should be last compiler flags.
    4. Default CFLAGS is -O optimization, remove OFLAGS.
    5. Add WARNING_CFLAGS to control warning setting and enable to remove
       if compiler does not support flags.
    
    Signed-off-by: default avatarAlon Bar-Lev <alon.barlev@gmail.com>
    f7a9f303