delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/14/15:59:32

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Wed, 14 Jan 2004 15:59:31 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Diane Patzer <dianec AT ccmr DOT cornell DOT edu>
cc: cygwin AT cygwin DOT com
Subject: Re: Make is ignoring "-lperl -lm" flags
In-Reply-To: <20040114130612.B8225@ccmr.cornell.edu>
Message-ID: <Pine.GSO.4.56.0401141556140.8674@slinky.cs.nyu.edu>
References: <20040114130612 DOT B8225 AT ccmr DOT cornell DOT edu>
MIME-Version: 1.0

On Wed, 14 Jan 2004, Diane Patzer wrote:

> Hello!
>
> I have been having a problem with "make". I have a test program that calls a
> Perl function from a C program. With this typed-in compiler invocation, it
> works nicely:
>
> gcc -O2 -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -I/usr/local/include \
>         -I/usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE \
>         -L/usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE \
>         -o power2 power2.c -lperl -lm
>
> My Makefile has the following definition
>
> power2  : power2.o
>         $(CLINK) $(PERLLIB) -o $@ power2.c -lperl -lm
>
> where
>
> CLINK = gcc
> PERLLIB = -O2 -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -I/usr/local/include\
>         -I/usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE \
>         -L/usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE
>
> "make" expands this to:
>
> gcc -O2 -DPERL_USE_SAFE_PUTENV -fno-strict-sliasing -I/usr/local/include \
>         -I/usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE \
>         -L/usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE \
>         power2.c
>
> Make loses the '-o power2' and the '-lperl -lm'. Is there something I'm
> missing here? I've used makefiles on Unix systems before and have never
> seen this behavior.
>
>
> I've attached the output of "cygcheck -s -v -r > cygcheck.out" for system
> information.
>
> Thanks,
> Diane Patzer

Diane,

This looks like a more generic problem.  If make were using your rule, it
would have generated *two* commands: one to make power2.o from power2.c,
and another to make power2 from power2.o.  Since it goes directly from
power2.c to power2, it might not be recognizing your rule.  Do you perhaps
have a DOS line ending after power2.o in your rule?  Do you use spaces?
Make is very particular about tabs in just the right places.  Does your
makefile work on Unix?
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019