# Default FLAGS, (can be overriden by user such as "make CFLAGS=-O2")
WARN_FLAGS=-Wall -Wextra -Wmissing-declarations -Wwrite-strings -Wswitch-enum
# Default FLAGS, (can be overriden by user such as "make CFLAGS=-O2")
WARN_FLAGS=-Wall -Wextra -Wmissing-declarations -Wwrite-strings -Wswitch-enum
# Additional flags that we will append to whatever the user set.
# These aren't intended for the user to manipulate.
# Additional flags that we will append to whatever the user set.
# These aren't intended for the user to manipulate.
-override CFLAGS := $(CFLAGS) $(WARN_FLAGS) $(extra_cflags)
-override CXXFLAGS := $(CXXFLAGS) $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags)
+override CFLAGS += $(WARN_FLAGS) $(extra_cflags)
+override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags)
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
+ sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
+ sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \