Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
make file
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Allan Ashton  
View profile  
 More options Apr 22 1999, 3:00 am
Newsgroups: comp.programming
From: allanasht...@mywitsend99.freeserve.co.uk (Allan Ashton)
Date: 1999/04/22
Subject: make file
Does anybody know how to parameterise the make file in C. I want to
compile all programs in a library with or without debug depending on a
switch, parameter or environment variable.

Many Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Allan Ashton  
View profile  
 More options Apr 22 1999, 3:00 am
Newsgroups: comp.programming
From: allanasht...@mywitsend99.freeserve.co.uk (Allan Ashton)
Date: 1999/04/22
Subject: Re: make file
        P.S. I am using Unix.

On Thu, 22 Apr 1999 18:51:23 GMT,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Powe  
View profile  
 More options Apr 22 1999, 3:00 am
Newsgroups: comp.programming
From: Michael Powe <michael+g...@trollope.org>
Date: 1999/04/22
Subject: Re: make file
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Allan" == Allan Ashton <allanasht...@mywitsend99.freeserve.co.uk> writes:

    Allan> Does anybody know how to parameterise the make file in C. I
    Allan> want to compile all programs in a library with or without
    Allan> debug depending on a switch, parameter or environment
    Allan> variable.

- From the GNU Make manual:

Example of a Conditional========================

   The following example of a conditional tells `make' to use one set
of libraries if the `CC' variable is `gcc', and a different set of
libraries otherwise.  It works by controlling which of two command
lines will be used as the command for a rule.  The result is that
`CC=gcc' as an argument to `make' changes not only which compiler is
used but also which libraries are linked.

     libs_for_gcc = -lgnu
     normal_libs =

     foo: $(objects)
     ifeq ($(CC),gcc)
             $(CC) -o foo $(objects) $(libs_for_gcc)
     else
             $(CC) -o foo $(objects) $(normal_libs)
     endif

Another option is to use a phony target, e.g. `debug.'

debug:
        gcc $(DEBUG_OPTIONS) -o test $(OBJ)

mp

- --
                                      powered by GNU/linux since Sept 1997
           mich...@trollope.org    http://www.trollope.org
Michael Powe                                          Portland, Oregon USA
  "Would John the Baptist have lost his head if his name was Steve?"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.0 (GNU/Linux)
Comment: Encrypted with Mailcrypt 3.5.1 and GNU Privacy Guard

iD8DBQE3IBGp755rgEMD+T8RAo0wAJ0Wijyn27VBdRqn/HmHCYMoqtE8SwCdEWPm
YpI1HSVi1aLWUePUvveE1bI=
=d2uK
-----END PGP SIGNATURE-----


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »