home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / atari / st / tech / 6868 < prev    next >
Encoding:
Text File  |  1993-01-27  |  2.5 KB  |  91 lines

  1. Path: sparky!uunet!dtix!darwin.sura.net!newsserver.jvnc.net!yale.edu!ira.uka.de!math.fu-berlin.de!cs.tu-berlin.de!kd
  2. From: kd@cs.tu-berlin.de (Klaus Didrich)
  3. Newsgroups: comp.sys.atari.st.tech
  4. Subject: Trouble with GNU-make 3.62
  5. Message-ID: <1k3jhvINN491@news.cs.tu-berlin.de>
  6. Date: 26 Jan 93 14:58:07 GMT
  7. Organization: Technical University of Berlin, Germany
  8. Lines: 77
  9. NNTP-Posting-Host: polyxena.cs.tu-berlin.de
  10. MIME-Version: 1.0
  11. Content-Type: text/plain
  12. Content-Transfer-Encoding: 8bit
  13.  
  14. Hello,
  15.  
  16. I am having some trouble with GNU-make. I finally persuaded make to do what
  17. it should, but I had to use some weird tricks. So would you please look into
  18. the following makefile and tell me whether I made a mistake or whether I
  19. found a bug in one of the programs involved.
  20.  
  21. The general idea is that I want to build a program 'zoohdl.prg' from a
  22. source 'zoohdl.c'and several libraries using the Pure C Compiler.
  23.  
  24. --------------------makefile starts here--------------------
  25. SHELL = \bin\tcsh.ttp
  26.  
  27. CC = pcc
  28. INCLUDE = \gnu\include
  29. CPPFLAGS =
  30. CFLAGS = -I$(INCLUDE) -C -V
  31.  
  32. LINKER = plink
  33. LINKERFLAGS = -S=0 -V -O=$@ $(START)
  34. LIBDIR = \f\p.c\lib\$(empty)
  35. START = $(LIBDIR)crt0.o
  36. LIBS = acs pcgemlib mintflt mintlib pcstdlib
  37. XLIBS = $(addprefix $(LIBDIR), $(addsuffix .lib,$(LIBS)))
  38.  
  39.  
  40. zoohdl.prg : zoohdl.h zoohdl.o
  41.     cd $(PWD);$(LINKER) $(LINKERFLAGS) $(basename $@).o $(XLIBS)
  42.  
  43. zoohdl.o: %.o : %.c
  44.     cd $(PWD); $(CC)  $(CPPFLAGS) $(CFLAGS) $<
  45.  
  46. .DEFAULT:
  47.     echo $@ -- Default-Rule!
  48.  
  49. %.o : %.c
  50.     cd $(PWD); $(CC)  $(CPPFLAGS) $(CFLAGS) $<
  51.  
  52.  
  53. --------------------makefile ends here--------------------
  54.  
  55. (1) If I call make with no further options I get the message
  56.  
  57.     make: No targets specified and no makefile found.  Stop.
  58.     
  59.     If I call make with -fmakefile  (i.e. 'make -fmakefile') everything
  60.     works.
  61.  
  62.  
  63. (2) As you can see above there is a static pattern rule zoohdl.o: %.o : %.c 
  64.     If I remove this rule (and touch zoohdl.c) and call 'make -fmakefile' I
  65.     get the message
  66.  
  67.     make: 'zoohdl.prg' is up to date.
  68.  
  69.  
  70. (3) In all the rules really doing something I had to add a 'cd
  71.     $(PWD)'command. Without this the Pure C Compiler will complain
  72.  
  73.     Error ZOOHDL.C: Unable to open input file 'zoohdl.c'
  74.  
  75.  
  76. I use the following programs:
  77. TOS 3.05
  78. MiNT 0.95 Pl 13
  79. GNU make version 3.62 atariST
  80. tcsh 6.00.02
  81. Pure C Compiler (Version Nov 24 1992)
  82.  
  83.  
  84.  
  85. Any help appreciated,
  86.     
  87.     Klaus
  88. -- 
  89. ..........................................................................
  90. Klaus Didrich                                            kd@cs.tu-berlin.de
  91.