Mail Archives: cygwin/2004/01/14/15:59:32
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 -