Add the appropriate preprocessor option for gcc
to your Makefile
-s and have a common_feature_header.h
header file defining these.
# in Makefile
CPPFLAGS+= -include common_feature_header.h
If you just want to define some preprocessor flags, you don't need a common_feature_header.h
file, but simply add into your Makefile
the following definition
CPPFLAGS+= -DSOME_FEATURE_FLAG=1 -DSOME_OTHERFEATURE_FLAG=0 \
-DYET_ANOTHER_THING=2
See also this answer.
P.S. You may want to use remake (notably with its -x
option) to debug your Makefile
.