This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
make problem w/ implicit rules
- To: "CygWin" <cygwin at sourceware dot cygnus dot com>
- Subject: make problem w/ implicit rules
- From: "Ed Hourigan" <ehouriga at dreamscape dot com>
- Date: Sat, 13 May 2000 10:16:24 -0400
I am new to the cygwin version of gcc/g++. I have used gcc/g++ under Unix
for several
years. In a typical Unix makefile, you can have implicit rules like this:
.SUFFIXES: .cpp .o
# rule to make a .o from a .cpp file
.cpp.o:
g++ $(FLAGS) -c $<
This allows you to add source files to your project w/out having to add an
explicit rule for each source file. All you have to do is update the list
of object
files (.o) in the makefile.
However, this doesn't seem to be supported or work under the cygwin version
of make. Is there something I need to configure? I took a simple makefile
from a Linux machine and moved it onto a PC w/ cygwin installed (along with
source .cpp files)
and I cannot make/build the project anymore. The error I get is:
make: ** No rule to make target 'main.o' needed by 'testit'. Stop
The makefile doesn't have an explicit rule for main.o. Under Linux, it uses
the
implicit rule to take the source file main.cpp and compile it into main.o
-----------------------------------------------------
BEGIN:VCARD
VERSION:2.1
N:Hourigan;Ed
FN:Ed Hourigan
EMAIL;PREF;INTERNET:ehouriga@dreamscape.com
REV:20000303T112449Z
END:VCARD
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com