All of lore.kernel.org
 help / color / mirror / Atom feed
From: wwp <subscript@free.fr>
To: linux-c-programming@vger.kernel.org
Subject: Re: Making "make" auto-strip and auto-clean
Date: Sun, 26 Feb 2006 09:56:22 +0100	[thread overview]
Message-ID: <20060226095622.3c65df9b@localhost.localdomain> (raw)
In-Reply-To: <200602260935.27292.samjnaa@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 692 bytes --]

Hello Shriramana Sharma,


On Sun, 26 Feb 2006 09:35:27 +0530 Shriramana Sharma <samjnaa@gmail.com> wrote:

> I would like make to always 
> 
> 1. strip the executable it created
> 2. remove the *.o files it created
> 
> after it has compiled the target executable. How do I do this? What do I
> add to the makefile? The current default command I am using is: 
> 
> pan: pan.o libswe.a
> 	gcc -g -O2 -o pan pan.o -L. -lswe -lm

First, if you always want to strip, no need to add -g.
Then:

all: pan strip clean

pan: pan.o libswe.a
	gcc -O2 -o $@ pan.o -L. -lswe -lm

strip: pan
	strip $<

clean:
	-rm -f pan.o

Or something similar..


Regards,

-- 
wwp

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-02-26  8:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-26  4:05 Making "make" auto-strip and auto-clean Shriramana Sharma
2006-02-26  8:56 ` wwp [this message]
2006-02-26 12:21   ` Shriramana Sharma
2006-02-26 14:10 ` leslie.polzer
2006-02-26 15:54 ` Glynn Clements

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060226095622.3c65df9b@localhost.localdomain \
    --to=subscript@free.fr \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.