473,322 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Multiple Makefiles

JS
I have two Makefiles in two different directories. How do I know which of
these Makefiles make will use and is there some way to specify which
Makefile that should be run.
Nov 14 '05 #1
10 2477
JS wrote:
I have two Makefiles in two different directories. How do I know which of
these Makefiles make will use and is there some way to specify which
Makefile that should be run.


Please note that neither man pages nor gcc nor make ar topical
to comp.lang.c. You may be better off in an appropriate newsgroup.
In addition, reading the documentation will help, too.

man make, for example, will tell you about the -C and -f options
as well as about the -I option.
Having a look at the manual, will tell you more about where make
is looking for makefiles.
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Nov 14 '05 #2
JS
Michael Mair wrote:
JS wrote:
I have two Makefiles in two different directories. How do I know which of
these Makefiles make will use and is there some way to specify which
Makefile that should be run.


Please note that neither man pages nor gcc nor make ar topical
to comp.lang.c. You may be better off in an appropriate newsgroup.
In addition, reading the documentation will help, too.

Do you know of any groups? I have searched for make but cannot find any
groups about this program.
Nov 14 '05 #3
JS wrote:
Michael Mair wrote:
JS wrote:
I have two Makefiles in two different directories. How do I know which
of these Makefiles make will use and is there some way to specify which
Makefile that should be run.


Please note that neither man pages nor gcc nor make ar topical
to comp.lang.c. You may be better off in an appropriate newsgroup.
In addition, reading the documentation will help, too.

Do you know of any groups? I have searched for make but cannot find any
groups about this program.


Like Michael said look at the man page. If you cant figure this out then you
have no hope at programming.

gtoomey
Nov 14 '05 #4
JS
Gregory Toomey wrote:
JS wrote:
Michael Mair wrote:
JS wrote:
I have two Makefiles in two different directories. How do I know which
of these Makefiles make will use and is there some way to specify which
Makefile that should be run.

Please note that neither man pages nor gcc nor make ar topical
to comp.lang.c. You may be better off in an appropriate newsgroup.
In addition, reading the documentation will help, too.

Do you know of any groups? I have searched for make but cannot find any
groups about this program.


Like Michael said look at the man page. If you cant figure this out then
you have no hope at programming.

Well in the man page I could not find anything about -g or -Wall so I think
it would make sense to find some help elsewhere.
Nov 14 '05 #5
JS <d4***@44ada.com> wrote:
Michael Mair wrote:
JS wrote:
I have two Makefiles in two different directories. How do I know which of
these Makefiles make will use and is there some way to specify which
Makefile that should be run.


Please note that neither man pages nor gcc nor make ar topical
to comp.lang.c. You may be better off in an appropriate newsgroup.
In addition, reading the documentation will help, too.

Do you know of any groups? I have searched for make but cannot find any
groups about this program.


comp.unix.programmer is probably quite a good choice. Make isn't
specifically mentioned as a topic there but questions about it
are regularly posted and answered.
Regards, Jens
--
\ Jens Thoms Toerring ___ Je***********@physik.fu-berlin.de
\__________________________ http://www.toerring.de
Nov 14 '05 #6
JS wrote:
Michael Mair wrote:

JS wrote:
I have two Makefiles in two different directories. How do I know which of
these Makefiles make will use and is there some way to specify which
Makefile that should be run.


Please note that neither man pages nor gcc nor make ar topical
to comp.lang.c. You may be better off in an appropriate newsgroup.
In addition, reading the documentation will help, too.


Do you know of any groups? I have searched for make but cannot find any
groups about this program.


gcc: gnu.gcc.help (OT, but good to know: g++ has its own group):
If your make is gnu make, you perhaps can look for help in
gnu.utils.help (I don't know for sure the scope -- but that is
what charters, FAQs and the like are for).

Apart from that and _after_ reading the documentation, google and
google groups are often helpful.

Did make -C <directory> help?
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Nov 14 '05 #7
JS wrote:
Gregory Toomey wrote:
JS wrote:
Michael Mair wrote:

JS wrote:

>I have two Makefiles in two different directories. How do I know which
>of these Makefiles make will use and is there some way to specify which
>Makefile that should be run.

Please note that neither man pages nor gcc nor make ar topical
to comp.lang.c. You may be better off in an appropriate newsgroup.
In addition, reading the documentation will help, too.

Do you know of any groups? I have searched for make but cannot find any
groups about this program.


Like Michael said look at the man page. If you cant figure this out then
you have no hope at programming.


Well in the man page I could not find anything about -g or -Wall so I think
it would make sense to find some help elsewhere.


Your request in this thread is about "multiple makefiles".
Your request about -g and -Wall was in gnu.gcc.help!
Please try to answer in context.
-Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Nov 14 '05 #8
do*@dot.dot scribbled the following:
On Mon, 28 Mar 2005 17:00:54 +0200, JS <d4***@44ada.com> wrote:
Well in the man page I could not find anything about -g or -Wall so I think
it would make sense to find some help elsewhere.

Try the following: make (with no parameters)
make -?
make -h
make -help usually these things will display their own help screens...


<OT>"make" by itself will attempt to run the make program, searching
for a file called "makefile" or "Makefile". If it doesn't find one, it
will simply print a very spartan error message and quit. I suggest you
try "make -h" or "make --help" (with two dashes) instead. Or simply
"man make".</OT>

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"Roses are red, violets are blue, I'm a schitzophrenic and so am I."
- Bob Wiley
Nov 14 '05 #9
JS wrote:
I have two Makefiles in two different directories. How do I know which of
these Makefiles make will use and is there some way to specify which
Makefile that should be run.


You can give an argument to make like
make -f /usr/project1/subsystem1/Makefile

Most make utilities use that "-f" switch.
Nov 14 '05 #10
jacob navia wrote:
JS wrote:
I have two Makefiles in two different directories. How do I know
which of these Makefiles make will use and is there some way to
specify which Makefile that should be run.


You can give an argument to make like
make -f /usr/project1/subsystem1/Makefile

Most make utilities use that "-f" switch.


Besides which you can simply switch to the directory containing the
makefile you want. Make will normally use the makefile present in
the default directory.

At any rate this is OT in c.l.c because the action of make is
system specific, and has nothing to do with the language itself.
The OP should move to a newsgroup that deals with his actual
system.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
Nov 14 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Max | last post by:
I know this isn't directly related to C++, but thought I'd ask anyway. I've already read about 10 tutorials on makefiles, still have this problem and hoping someone here could help me out. I'm...
5
by: djake | last post by:
Someone can explain me what are makefiles useful for? Couldn't i write shell script instead of makefiles? (*.sh in unix; *.cmd in win32) Moreover i really doesn't understand what dependencies are...
2
by: A. Gupta | last post by:
I'm compiling a project that I want to have multiple targets (basically debug and optimized). I would like to just be able to type 'make debug' or 'make optimized' and have the makefile compile...
7
by: rinn | last post by:
Hello, I have written a main() program in sap.c and created one external function in another file fun.c my doubt is how to link these two files sap.c, fun.c and run a program inorder to get a...
3
by: mmashaie | last post by:
Hi, I'm trying to compile a makefile. On my command line, I type make and I get the below message; I don't understand why I get that. I am using Borland C++ version 2: C:\Maryam\clarke> make...
19
by: milkyway | last post by:
Hello, I am running under Suse Linux and am putting together some code written in C. I am not clear on how to create makefiles and was wondering if there were any "makefile tools" out there. If...
22
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
I already understand how program compilation works (i.e. the preprocessor produces individual translation units which get compiled separately, and then the linker links the object files together),...
1
by: broli | last post by:
How can this be done in windows based C compilers like PellesC ?? Is it possible to write a makefile or use the cc- o option as available in unix/linux ?? does anyone know of good makefile...
3
by: tvnaidu | last post by:
porting windows static libs and dll into linux static lib abd shared lib, any tool to convert vcproj files to Linux makefiles? porting windows static libs and dll into linux static lib abd shared...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.