[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: query
From: |
Paul Smith |
Subject: |
Re: query |
Date: |
Thu, 15 Aug 2013 08:22:23 -0400 |
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.
- query, Puneet Pahuja, 2013/08/15