home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / wizards / 4556 < prev    next >
Encoding:
Text File  |  1992-11-07  |  1.1 KB  |  37 lines

  1. Newsgroups: comp.unix.wizards
  2. Path: sparky!uunet!ukma!darwin.sura.net!mlb.semi.harris.com!dw3f.ess.harris.com!eriseman
  3. From: eriseman@dw3f.ess.harris.com (Eric Riseman)
  4. Subject: Makefile Parameter Passing
  5. Date: Fri, 6 Nov 1992 16:38:56 GMT
  6. Nntp-Posting-Host: dw3k.ess.harris.com
  7. Reply-To: eriseman@dw3f.ess.harris.com (Eric Riseman)
  8. Organization: Harris GISD
  9. Sender: news@mlb.semi.harris.com
  10. Message-ID: <1992Nov6.163856.29548@mlb.semi.harris.com>
  11. Lines: 24
  12.  
  13. This may or may not belong here, but I figured that you "wizzards" out
  14. there could
  15. help me the fastest.
  16. How does one pass a file name into a Makefile as a parameter and how is
  17. this file
  18. name used within the Makefile? 
  19.  
  20. Here is the "guts" of my Makefile :
  21. (kind of hard coded for file name...e1.c)
  22.  
  23.       SYSCC = -D_NO_PROTO -U_POSIX_SOURCE
  24.        LIBS  =  -lXm -lXt -lX11
  25.        INCPATH = -I/usr/include/X11
  26.        e1 :  e1.c
  27.   
  28.              cc $(SYSCC) $(INCPATH) e1.c $(LIBS) -o e1
  29.  
  30. The OBJECTIVE : to have a Makefile that is generic.
  31.  ie : can be used by files..... e1.c  e2.c  e3.c  etc.
  32.        make e1        make e2        make e3        etc.
  33.  
  34.  
  35. Thanks in advance for this trivial pursuit
  36. ESR
  37.