[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
C[XX]FLAGS convention
From: |
Jeffrey Walton |
Subject: |
C[XX]FLAGS convention |
Date: |
Fri, 16 Sep 2011 05:43:50 -0400 |
Hi All,
I have a makefile which sets up CXXFLAGS (and does not use CFLAGS).
The recipe for *.cpp looks similar to:
.cpp.o:
$(CXX) $(CXXFLAGS) -c $< -o $@
(1) Should the recipe include $(CFLAGS) by convention?
If a user wants a specific warning or setting, he/she can invoke make
similar to `make CXXFLAGS=-Winline`. This overrides our stock
settings.
(2) Should one normally honor the user's setting, or is it OK to use
override and merge flags? Ie,
# GNUMakefile
override CXXFLAGS += -Wall -Wextra -Wformat=2 -Wformat-security
Jeff
- C[XX]FLAGS convention,
Jeffrey Walton <=