Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 Reply-To: cygwin AT cygwin DOT com To: Diane Patzer cc: cygwin AT cygwin DOT com Subject: Re: Make is ignoring "-lperl -lm" flags In-Reply-To: <20040114130612.B8225@ccmr.cornell.edu> Message-ID: References: <20040114130612 DOT B8225 AT ccmr DOT cornell DOT edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: Content-Disposition: INLINE 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/