home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / question / 15463 < prev    next >
Encoding:
Text File  |  1993-01-12  |  1.7 KB  |  43 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!psinntp!cadkey!eric
  3. From: eric@cadkey.com (Eric Holtman)
  4. Subject: Re: Using Make on different Architectures
  5. Message-ID: <1993Jan12.183430.15351@cadkey.com>
  6. Organization: cadkey
  7. References: <1is1g3INN8o4@dsun6.hmi.de>
  8. Date: Tue, 12 Jan 1993 18:34:30 GMT
  9. Lines: 32
  10.  
  11. In article <1is1g3INN8o4@dsun6.hmi.de> djc@dsun6.hmi.de (Markus Dahm) writes:
  12. >Hello,
  13. >
  14. >this may be a FAQ, but I need quick help.
  15. >I work with aimk (architecture independent make) which is distributed
  16. >with the PVM-Package. It is a sh-Script that executes some heuristic test
  17. >in order to determine on which machine it is running.
  18. >My Problem is that I have to use different compilers on several different
  19. >computers( cc, gcc, acc, f77 vs. fc ), but I would like to have just one
  20. >Makefile for all of them. The Makefile should determine by $(HOST) which
  21. >compiler to use, something like :
  22. >
  23.  
  24. What we do here at Cadkey is this...... we have an environment variable
  25. MACHINE which we set to whatever architecture we want, i.e. "387" or
  26. "sun4X", or "SunOS5", you could set that with your little script.
  27.  
  28. then, at the top of every makefile, we have a line that says
  29. include $(MAKE_DIR)/machine/$(MACHINE).mk.
  30.  
  31. You can see where this is going....... in $MAKE_DIR/machine, we have 
  32. a file 387.mk, sun4X.mk, etc, etc that defines all the cool things you
  33. might want.  Doing compiles on not only different UN*X boxes, but dos loand
  34. as wellm we define not only CC, but AR, MV, CP, etc, etc.
  35.  
  36.  
  37. Seems to work for us...........
  38. -- 
  39. Eric J. Holtman       |
  40. Product Development   | "You fat, bloated, Eeediot!!!"
  41. Cadkey, Inc.          |                      
  42.                       |    - Ren Hoek ("that's Ho-ak, not HOKE!!")
  43.