On Thu, 2013-08-15 at 04:30 -0700, Puneet Pahuja wrote:
> I just wanted to know how can I modify the default behaviour(without
> using any makefile) of the "make" command? 
> 
> currently if i issue "make filename" it converts into :  
> 
> "cc -o filename filename.c" 
> 
> And I want it to be replaced with "clang -ggdb -std=c99 -Wall -Werror
> filename.c -lcrypt -lcs50 -lm -o filename"

You can control all these things with variables on the command line:

    make filename CC=clang \
        CFLAGS='-ggdb -std=c99 -Wall -Werror' \
        LDLIBS='-lcrypt -lcs50 -lm'

Other than that no, there's no way to do this unless you create a
makefile and add those values to it.

Or, of course, you could get the source code to GNU make and change the
default values, compile it, then use that version of GNU make.

Since you don't say WHY you want to do this it's hard to come up with
acceptable alternatives.


_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make
  • query Puneet Pahuja
    • Re: query Paul Smith

Reply via email to