Execute Shell
Execute Shell
Store the stdout from command into variable
NAME = $(shell echo "mark")
print:
echo "This is $(NAME)"
Reading compile flags stored in a file
Note: I usually have my compile flags in a file so I can do
cc $(< ~/flags)
, reading this file in make as well makes sure that I donβt have to repeat myself writing flags
CXXFLAGS=$(shell cat ~/flags)