First in your editor
i am using
vim filename.make
this will open a make file
now
exec:
./file
compile: /
fileName.cpp
g++ fileName.cpp -o file
echo "compilation "
touch compile
and press esc key and :wq and
for execution make file use
make -f filename.make
if in the last no comment after the file name then it will by default called the binary file
make -f filename.make compile
or if we pass "compile" then first its check that if filename.cpp timespan is less then the touch command compile timespan then it will again compile else it will not compile.
and some another things we need to care that after compile: and / there should be a space
and filename.cpp also in the same starting point as the compile:
i am using
vim filename.make
this will open a make file
now
exec:
./file
compile: /
fileName.cpp
g++ fileName.cpp -o file
echo "compilation "
touch compile
and press esc key and :wq and
for execution make file use
make -f filename.make
if in the last no comment after the file name then it will by default called the binary file
make -f filename.make compile
or if we pass "compile" then first its check that if filename.cpp timespan is less then the touch command compile timespan then it will again compile else it will not compile.
and some another things we need to care that after compile: and / there should be a space
and filename.cpp also in the same starting point as the compile:
Comments
Post a Comment