home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!newsserver.jvnc.net!yale.edu!ira.uka.de!math.fu-berlin.de!cs.tu-berlin.de!kd
- From: kd@cs.tu-berlin.de (Klaus Didrich)
- Newsgroups: comp.sys.atari.st.tech
- Subject: Trouble with GNU-make 3.62
- Message-ID: <1k3jhvINN491@news.cs.tu-berlin.de>
- Date: 26 Jan 93 14:58:07 GMT
- Organization: Technical University of Berlin, Germany
- Lines: 77
- NNTP-Posting-Host: polyxena.cs.tu-berlin.de
- MIME-Version: 1.0
- Content-Type: text/plain
- Content-Transfer-Encoding: 8bit
-
- Hello,
-
- I am having some trouble with GNU-make. I finally persuaded make to do what
- it should, but I had to use some weird tricks. So would you please look into
- the following makefile and tell me whether I made a mistake or whether I
- found a bug in one of the programs involved.
-
- The general idea is that I want to build a program 'zoohdl.prg' from a
- source 'zoohdl.c'and several libraries using the Pure C Compiler.
-
- --------------------makefile starts here--------------------
- SHELL = \bin\tcsh.ttp
-
- CC = pcc
- INCLUDE = \gnu\include
- CPPFLAGS =
- CFLAGS = -I$(INCLUDE) -C -V
-
- LINKER = plink
- LINKERFLAGS = -S=0 -V -O=$@ $(START)
- LIBDIR = \f\p.c\lib\$(empty)
- START = $(LIBDIR)crt0.o
- LIBS = acs pcgemlib mintflt mintlib pcstdlib
- XLIBS = $(addprefix $(LIBDIR), $(addsuffix .lib,$(LIBS)))
-
-
- zoohdl.prg : zoohdl.h zoohdl.o
- cd $(PWD);$(LINKER) $(LINKERFLAGS) $(basename $@).o $(XLIBS)
-
- zoohdl.o: %.o : %.c
- cd $(PWD); $(CC) $(CPPFLAGS) $(CFLAGS) $<
-
- .DEFAULT:
- echo $@ -- Default-Rule!
-
- %.o : %.c
- cd $(PWD); $(CC) $(CPPFLAGS) $(CFLAGS) $<
-
-
- --------------------makefile ends here--------------------
-
- (1) If I call make with no further options I get the message
-
- make: No targets specified and no makefile found. Stop.
-
- If I call make with -fmakefile (i.e. 'make -fmakefile') everything
- works.
-
-
- (2) As you can see above there is a static pattern rule zoohdl.o: %.o : %.c
- If I remove this rule (and touch zoohdl.c) and call 'make -fmakefile' I
- get the message
-
- make: 'zoohdl.prg' is up to date.
-
-
- (3) In all the rules really doing something I had to add a 'cd
- $(PWD)'command. Without this the Pure C Compiler will complain
-
- Error ZOOHDL.C: Unable to open input file 'zoohdl.c'
-
-
- I use the following programs:
- TOS 3.05
- MiNT 0.95 Pl 13
- GNU make version 3.62 atariST
- tcsh 6.00.02
- Pure C Compiler (Version Nov 24 1992)
-
-
-
- Any help appreciated,
-
- Klaus
- --
- ..........................................................................
- Klaus Didrich kd@cs.tu-berlin.de
-