Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: soren AT wonderstorm DOT com To: cygwin AT sources DOT redhat DOT com Date: Mon, 5 Feb 2001 17:22:56 -0500 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: [ANNOUNCEMENT] Updated: libpng-1.0.9-3 Message-ID: <3A7EE170.28933.16BE7650@localhost> In-reply-to: <3A7E1D98.59466F66@ece.gatech.edu> X-mailer: Pegasus Mail for Win32 (v3.12c) Hello, On the topic of libpng built with Cygwin tools, I have the following question. It concerns the breakage of `make' when I try to use a conditional switch to choose what kind of linking to do, when building the application pngcrush (a problematical but important libpng-using application that *does not* build OOB as a dynamically-linked exe with libpng.dll). In particular I am hoping Chuck Wilson can help (and THANK YOU so MUCH for your persistent efforts on such ports as libpng to Cygwin, Chuck!) because Chuck seems to know his way around `make' very well indeed. ----- pasted USENET message, watch for wrapping ------- Newsgroups: gnu.utils.help, gnu.gcc.help Hello, hope someone can help: I have the following Makefile (copied here in full because I have exhausted every idea that has occurred to me about why this makefile fails the way it does). When this is run it fails immediately with a message: ------- console dump, watch for wrapping ------- make: *** No rule to make target `adler32.c', needed by `adler32.o'. Stop. ------- cut here ------------------------------- The MAKEFILE: ------- Makefile text, watch for wrapping ------ # Sample makefile for pngcrush using gcc and make. # Glenn Randers-Pehrson # Last modified: [in-progress] - soren andersen # # Invoke this makefile from a shell prompt in the usual way; for example: # # make -f makefile.gcc # macros -------------------------------------------------------------------- VPATH =../libpng-1.0.8 /mingw/include . /usr/include CC = gcc LD = gcc RM = rm -vf CFLAGS = -I../libpng-1.0.8 -I. -ID:/mingw/include -O -Wall # [note that -Wall is a gcc-specific compilation flag ("all warnings on")] LDFLAGS = O = .o E = .exe PNGCRUSH = pngcrush LIBS = -lm LIBPATH = ../libpng-1.0.8 ifeq (DLL,$(LINKTYPE)) OBJS = $(PNGCRUSH)$(O) LIBS += -lpng.dll # .c$(O): png.h pngconf.h zlib.h pngcrush.h cexcept.h # $(CC) -c $(CFLAGS) $< else PNGCRUSH = pngcrush_static OBJS = adler32$(O) crc32$(O) deflate$(O) gzio$(O) \ infblock$(O) infcodes$(O) inffast$(O) inflate$(O) inftrees$(O) \ infutil$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \ pngpread$(O) pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) \ pngset$(O) pngtrans$(O) pngwio$(O) pngwrite$(O) pnggccrd$(O) \ pngwtran$(O) pngwutil$(O) trees$(O) zutil$(O) vpath %.c ../libpng-1.0.8 $(OBJS): %.o: %.c $(CC) -c $(CFLAGS) -DPNG_STATIC -DZLIB_STATIC -o $@ $< LIBS += -lpng endif EXES = $(PNGCRUSH)$(E) # dependencies -------------------------------------------------------------- all: $(EXES) $(PNGCRUSH)$(E): $(OBJS) $(PNGCRUSH)$(O) $(LD) $(LDFLAGS) -o $@ $(OBJS) -L$(LIBPATH) $(LIBS) $(PNGCRUSH)$(O): pngcrush.c png.h pngconf.h zlib.h pngcrush.h cexcept.h # maintenance --------------------------------------------------------------- clean: $(RM) $(EXES) $(OBJS) # Useful for debugging the values of variables during a make. To use # it just call: make DEBUGVARS="var1 var2". No targets will get # executed # ifdef DEBUGVARS eval=$(1) $(warning Debugging value of variables:) $(foreach var,$(DEBUGVARS),$(warning $(var) = "$(call eval,$$($(var)))")) $(error End of debugging) endif ------- cut here ------------------------------- My objective is to be able to build either a static-linked version of this exe or a Win32-dynamic link lib (DLL) -linked version, from one Makefile. The LINKTYPE env var is the switch for that -if defined and eq "DLL" is will tell make to link to a dll interface lib, else it will build all the needed static objects (if not found up-to-date) and link them in to the exe. The code I have already worked for building the dynamically linked version, and supposedly worked as it came in the standard distro, to build the static executable. I *only* need help with the specified issue (rephrased below), thanks. Thanks for any help someone can give in explaining why the implicit rule that make is suppose to use, that tells it that a dependency ".c" file is NOT a *target* needing to be rebuilt, but the starting point for creating ".o" files, is being "turned off" somehow when this Makefile is run. regards, Soren Andersen -------- end USENET paste job ------------------------- -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple