home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.wizards
- Path: sparky!uunet!ukma!darwin.sura.net!mlb.semi.harris.com!dw3f.ess.harris.com!eriseman
- From: eriseman@dw3f.ess.harris.com (Eric Riseman)
- Subject: Makefile Parameter Passing
- Date: Fri, 6 Nov 1992 16:38:56 GMT
- Nntp-Posting-Host: dw3k.ess.harris.com
- Reply-To: eriseman@dw3f.ess.harris.com (Eric Riseman)
- Organization: Harris GISD
- Sender: news@mlb.semi.harris.com
- Message-ID: <1992Nov6.163856.29548@mlb.semi.harris.com>
- Lines: 24
-
- This may or may not belong here, but I figured that you "wizzards" out
- there could
- help me the fastest.
- How does one pass a file name into a Makefile as a parameter and how is
- this file
- name used within the Makefile?
-
- Here is the "guts" of my Makefile :
- (kind of hard coded for file name...e1.c)
-
- SYSCC = -D_NO_PROTO -U_POSIX_SOURCE
- LIBS = -lXm -lXt -lX11
- INCPATH = -I/usr/include/X11
- e1 : e1.c
-
- cc $(SYSCC) $(INCPATH) e1.c $(LIBS) -o e1
-
- The OBJECTIVE : to have a Makefile that is generic.
- ie : can be used by files..... e1.c e2.c e3.c etc.
- make e1 make e2 make e3 etc.
-
-
- Thanks in advance for this trivial pursuit
- ESR
-