Wednesday, November 30, 2016

How to pass Arguments to make

This is in order to remember me how to pass arguments to make in a Makefile so i dont have to dig a "little" on google to find out how so here is an image of a simple Makefile that im using to compile c programs so i can later debug using gdb and with no protection since im learning the linux xploits techniques.

Simple we create the Makefile like this one and the only thing that this Makefile does its to compile a .c program from the command line and put the compiled on the output file given by the user.

toor# joe Makefile
 TARGET=default
 OUTPUT=default

 all:
  gcc -ggdb -fno-stack-protector -z execstack -m32 ${TARGET} -o ${OUTPUT}
 clean:
  rm ${TARGET}

the compile options can be checked online and as we can see its like normal variables on shell scripts.

No comments:

Post a Comment