home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume34 / starhp / part01 / Makefile next >
Makefile  |  1992-12-08  |  10KB  |  315 lines

  1. #    Makefile for starchart programs
  2. #
  3. #    $Header: Makefile,v 2.19 90/04/03 01:54:15 ccount Exp $
  4. #
  5. # Read the makefile before making.  There are many things you may wish
  6. # to customize.
  7. #
  8. #
  9. # StarChart Version 3.2.1 copyright (c) March 1990 by Craig Counterman 
  10. # original StarChart Software Suite copyright (c) 1987 by Alan Paeth
  11. #
  12. # All rights reserved. Redistribution granted for non-commercial
  13. # non-profit use only. Disclaimer: users of this work understand that
  14. # (a) the authors' cannot undertake to support this software (b) users
  15. # agree to acknowledge the use of the software in any published work
  16. # arising from its application and (c) any subsequent redistribution of
  17. # this work retains this warranty placard. 
  18. #
  19. #
  20. # No representation is made about the suitability of this
  21. # software for any purpose.  It is provided "as is" without express or
  22. # implied warranty, to the extent permitted by applicable law.
  23. #
  24. # DISCLAIMER OF WARRANTY
  25. # ----------------------
  26. # The authors  disclaim all warranties  with regard to  this software to
  27. # the   extent  permitted  by applicable   law,  including all   implied
  28. # warranties  of merchantability  and  fitness. In  no event shall   the
  29. # author be liable for any special, indirect or consequential damages or
  30. # any  damages whatsoever resulting from  loss of use, data or  profits,
  31. # whether in an action of contract, negligence or other tortious action,
  32. # arising  out of  or in connection with the  use or performance of this
  33. # software.
  34. #
  35. #
  36. #list ONLY the programs you want to use at your site
  37. TARGS= \
  38.         starX11 \
  39.         starhp
  40.  
  41. #    starX11 \
  42. #    starpost
  43. #       starXaw \
  44. #    stardsp \
  45. #    startek \
  46. #    staruplot \
  47. #    starsunv \
  48. #    starlaser 
  49. #    starX10 
  50.  
  51. # startool must be made specially, see below.
  52. # Also consider "postconv.awk"
  53.  
  54. #SITE DEPENDENCIES
  55. #
  56. # Uncomment out the version appropriate for your site.
  57. # At present dependencies for sysV UNIX
  58. #
  59. LOCAL=-DSYSV -Dindex=strchr
  60.  
  61.  
  62. # FOR ALL
  63. # define OLD_GREEK if you have the v2.1 yale.star file, with a
  64. #                slightly different greek encoding
  65. # To produce programs which allow keyboard user interaction with the -u flag, 
  66. #    see COBJ and starmain.o below.
  67. # If you don't want to use the Guide Star Catalog, you can produce
  68. #    slightly smaller executable by defining NO_GSC
  69. # Define NO_BUF_READSTAR to avoid the buffering file read function,
  70. #    to reduce runtime memory usage.
  71. # Define USE_ENV_RC to use a STARRC environment variable for the file name
  72. #    if the STARRC file named below is not found.
  73. # FOR X11
  74. # define USE_X_DASHES if your server can draw dashed lines
  75. # define RELEASE3_FONTS if you want to use the X11R3 font names
  76. # define X11R4 if you are using Release 4  (for the athena widgets).
  77. #
  78. # FOR POSTSCRIPT
  79. # define USE_FINE_MACROS if you want to use finer macros than usual:
  80. #     star size varies with 1/10th magnitude increments
  81. #        Needs printer with lots of available memory, but produces
  82. #        smaller postscript files than using the "-a m" option to
  83. #        postscript.
  84. #
  85. #DEFINES= -DRELEASE3_FONTS -DUSE_X_DASHES -DUSE_FINE_MACROS
  86. DEFINES= -DRELEASE3_FONTS -DUSE_X_DASHES -DUSE_ENV_RC -DX11R4
  87.  
  88. #destination for 'make install', otherwise not important
  89. BINDIR = "/usr/local"
  90.  
  91. #XINCLUDES is for DECwindows UWS 2.0
  92. XINCLUDES = -I/usr/include/mit -I/usr/include/X11R4
  93. #XINCLUDES =
  94.  
  95. #list ALL header files
  96. HDRS=icon.h parse_input.h star3.h starXaw.h starXawDlog.h patchlevel.h
  97. #list ALL source files, whether or not you use them
  98. SRCS= interact.c parse_input.c readfile.c starX10.c starX11.c starXaw.c \
  99.     starXawDlog.c starXawHelp.c starXawMwin.c starcust.c \
  100.     stardsp.c starimages.c starhp.c starlaser.c starm2.c starmain.c \
  101.     starpost.c starsample.c starsunv.c starsupp.c startek.c staruplot.c
  102.  
  103. #list ALL object files which could be produced
  104. OBJS= interact.o parse_input.o readfile.o starX10.o \
  105.     starX11.o starX11_aw.o starXaw.o starXawDlog.o \
  106.     starXawHelp.o starXawMwin.o starcust.o stardsp.o \
  107.     starimages.o starimages_a.o starlaser.o starm2.o starm2_i.o \
  108.     starmain.o starmain_i.o starpost.o starsunv.o starsupp.o \
  109.     startek.o staruplot.o starhp.o
  110.  
  111. STARTOOL=startool.tt startool.icon startool.sh
  112. SUPP=postconv.awk
  113. VMSFILES=decwxtk.opt descrip.mms starchart_init.com vaxcrtl.opt
  114. IBMFILES=pcstar.h Starchar.MSC staribm.c staribmv.c svgagraf.asm
  115. ATARIFILES=README.st makefile.st starst.c vqgdos.txt vqgdos.s
  116. MACFILES=README.mac
  117. FILES=Makefile README ${SRCS} ${HDRS} ${STARTOOL} ${SUPP} ${VMSFILES} \
  118.     ${IBMFILES} ${ATARIFILES} ${MACFILES}
  119.  
  120. DISTDIR=../../dist/starchart
  121.  
  122. #The following may be defined here to set default data file locations
  123. # filename    filetype    description
  124. # STARFILE    STARFTYPE    bright star data (yale)
  125. # INDEXFILE    INDEXFTYPE    index to fainter stars (SAO)
  126. # NEBFILE    NEBFTYPE    nebulae
  127. # BOUNDFILE    BOUNDFTYPE    constellation boundaries
  128. # PATTERNFILE    PATTFTYPE    constellation patterns
  129. # CNAMEFILE    CNAMEFTYPE    constellation names
  130. # PLANETFILE    PLANETFTYPE    planet positions
  131.  
  132. # other files
  133. # CONSTFILE    constellation locations
  134. # RCFILE    resource file
  135.  
  136. # Define as needed only
  137. # Remember, there are defaults in the code
  138.  
  139. # Example
  140. FILEROOT=/local/astro/starchart3.2.1/data
  141. STAR="${FILEROOT}/yale.star"
  142. START=LINEREAD
  143. INDEX="${FILEROOT}/index.indx"
  144. INDEXT=INDEXTYPE
  145. # only currently valid index file type
  146. NEB="${FILEROOT}/neb.star"
  147. NEBT=LINEREAD
  148. BOUND="${FILEROOT}/boundaries.star"
  149. BOUNDT=LINEREAD
  150. PATT="${FILEROOT}/pattern.star"
  151. PATTTY=LINEREAD
  152. CNAME="${FILEROOT}/cnames.star"
  153. CNAMET=LINEREAD
  154. PLANET="./planet.star"
  155. # Planets move, so make it local
  156. PLANETTY=LINEREAD
  157. CONS="${FILEROOT}/con.locs"
  158. RC="./.starrc"
  159.  
  160. FILEFLAGS= \
  161.         -DSTARFILE='$(STAR)' \
  162.         -DSTARFTYPE='$(START)' \
  163.         -DINDEXFILE='$(INDEX)' \
  164.         -DINDEXFTYPE='$(INDEXT)' \
  165.         -DNEBFILE='$(NEB)' \
  166.         -DNEBFTYPE='$(NEBT)' \
  167.         -DBOUNDFILE='$(BOUND)' \
  168.         -DBOUNDFTYPE='$(BOUNDT)' \
  169.         -DPATTERNFILE='$(PATT)' \
  170.         -DPATTFTYPE='$(PATTTY)' \
  171.         -DCNAMEFILE='$(CNAME)' \
  172.         -DCNAMEFTYPE='$(CNAMET)' \
  173.         -DPLANETFILE='$(PLANET)' \
  174.         -DPLANETFTYPE='$(PLANETTY)' \
  175.         -DCONSTFILE='$(CONS)' \
  176.         -DRCFILE='$(RC)'
  177.  
  178.  
  179. all: ${TARGS}
  180.  
  181. CFLAGS= ${FILEFLAGS} ${LOCAL} ${DEFINES} -g
  182. LDFLAGS = -g
  183.  
  184.  
  185. #Include interact.o in COBJ to support keyboard user interaction
  186. #COBJ=starmain.o starm2.o starsupp.o readfile.o parse_input.o
  187. COBJ=starmain.o starm2.o starsupp.o readfile.o parse_input.o interact.o 
  188. COBJIM=${COBJ} starimages.o
  189. COBJIMA=${COBJ} starimages_a.o
  190.  
  191. stardsp: ${COBJ} stardsp.o starcust.o
  192.     $(CC) $(LDFLAGS) ${COBJ} stardsp.o starcust.o -lm -o $@
  193.  
  194. starlaser: ${COBJIMA} starlaser.o starcust.o
  195.     $(CC) $(LDFLAGS) ${COBJIMA} starlaser.o starcust.o -lm -o $@
  196.  
  197. starpost: $(COBJ) starpost.o starcust.o
  198.     $(CC) $(LDFLAGS) $(COBJ) starpost.o starcust.o -lm -o $@
  199.  
  200. starhp: $(COBJ) starhp.o starcust.o
  201.     $(CC) $(LDFLAGS) $(COBJ) starhp.o starcust.o -lm -o $@
  202.  
  203. startek:  ${COBJIMA} startek.o starcust.o
  204.     $(CC) $(LDFLAGS) ${COBJIMA} startek.o starcust.o -lm -o $@
  205.  
  206. staruplot: ${COBJIMA} staruplot.o starcust.o
  207.     $(CC) $(LDFLAGS) ${COBJIMA} staruplot.o starcust.o -lm -lplot -o $@
  208.  
  209. starX10: ${COBJIMA} starX10.o starcust.o
  210.     $(CC) $(LDFLAGS) ${COBJIMA} starX10.o starcust.o -lm -lX -o $@
  211.  
  212. starX11: ${COBJIM} starX11.o starcust.o
  213.     $(CC) $(LDFLAGS) ${COBJIM} starX11.o starcust.o -lm -lX11 -L/usr/lib/X11R4 -o $@
  214.  
  215. starXaw: starmain_i.o starm2_i.o starsupp.o readfile.o starX11_aw.o \
  216.         starXaw.o starXawDlog.o starXawHelp.o starXawMwin.o\
  217.         starcust.o starimages.o parse_input.o
  218.     $(CC) $(LDFLAGS) starmain_i.o starm2_i.o starsupp.o readfile.o \
  219.         starXaw.o starXawDlog.o starXawHelp.o starXawMwin.o \
  220.          starX11_aw.o starcust.o starimages.o parse_input.o\
  221.         -lm -lXaw -lXmu -lXt -lX11 -L/usr/lib/X11R4 -o $@
  222.  
  223. starsunv: starmain_i.o starm2_i.o starsupp.o readfile.o starsunv.o \
  224.         starcust.o starimages.o parse_input.o interact.o
  225.     $(CC) $(LDFLAGS) starmain_i.o starm2_i.o starsupp.o readfile.o \
  226.         starsunv.o starcust.o starimages.o parse_input.o interact.o \
  227.             -lm -lsuntool -lsunwindow -lpixrect -o $@
  228.  
  229. startool: starsunv
  230.     echo "You must edit startool, startool.tt and startool.sh,"
  231.     echo "    and install them"
  232.     echo "You must have the program tooltool,"
  233.     echo "    which is available from sun PD archives"
  234.     echo "tooltool -f startool.tt" > startool
  235.  
  236. # use -DINTERACTIVE_CONTROL in starmain.o and starm2.o
  237. #     to allow keyboard user interaction
  238. starmain.o: starmain.c Makefile star3.h parse_input.h
  239.     $(CC) $(CFLAGS) -DINTERACTIVE_CONTROL -c starmain.c
  240.  
  241. starm2.o: starm2.c Makefile star3.h
  242.     $(CC) $(CFLAGS) -DINTERACTIVE_CONTROL -c starm2.c
  243.  
  244.  
  245.  
  246. starmain_i.o: starmain.c Makefile star3.h parse_input.h
  247.     -mv starmain.o starmain_n.o
  248.     $(CC) $(CFLAGS) -DINTERACTIVE_CONTROL -c starmain.c
  249.     mv starmain.o starmain_i.o
  250.     -mv starmain_n.o starmain.o
  251.  
  252. starm2_i.o: starm2.c Makefile star3.h
  253.     -mv starm2.o starm2_n.o
  254.     $(CC) $(CFLAGS) -DINTERACTIVE_CONTROL -c starm2.c
  255.     mv starm2.o starm2_i.o
  256.     -mv starm2_n.o starm2.o
  257.  
  258. readfile.o: readfile.c star3.h
  259.  
  260. starimages.o: starimages.c star3.h
  261.     $(CC) $(CFLAGS) -c starimages.c
  262.  
  263. #starimages_a.o defines area operations for drivers which otherwise don't
  264. #  support them
  265. starimages_a.o: Makefile starimages.c star3.h
  266.     -mv starimages.o starimages_n.o
  267.     $(CC) $(CFLAGS) -DAREAS -c starimages.c
  268.     mv starimages.o starimages_a.o
  269.     -mv starimages_n.o starimages.o
  270.  
  271. starX11.o: starX11.c Makefile icon.h star3.h
  272.     $(CC) $(CFLAGS) $(XINCLUDES) -DSTARX11 -c starX11.c
  273.  
  274. starX11_aw.o: starX11.c Makefile icon.h star3.h
  275.     -mv starX11.o starX11_n.o
  276.     $(CC) $(CFLAGS) $(XINCLUDES) -DSTARXAW -c starX11.c
  277.     mv starX11.o starX11_aw.o
  278.     -mv starX11_n.o starX11.o
  279.  
  280. starXaw.o: starXaw.c star3.h starXaw.h icon.h
  281.     $(CC) $(CFLAGS) $(XINCLUDES) -c starXaw.c
  282.  
  283. starXawDlog.o: starXawDlog.c star3.h starXaw.h starXawDlog.h
  284.     $(CC) $(CFLAGS) $(XINCLUDES) -c starXawDlog.c
  285.  
  286. starXawHelp.o: starXawHelp.c star3.h starXaw.h
  287.     $(CC) $(CFLAGS) $(XINCLUDES) -c starXawHelp.c
  288.  
  289. starXawMwin.o: starXawMwin.c star3.h starXaw.h
  290.     $(CC) $(CFLAGS) $(XINCLUDES) -c starXawMwin.c
  291.  
  292. starsunv.o: star3.h
  293. interact.o: star3.h parse_input.h patchlevel.h
  294. parse_input.o: star3.h parse_input.h
  295. starcust.o: star3.h 
  296. stardsp.o: star3.h 
  297. starlaser.o: star3.h 
  298. starpost.o: star3.h 
  299. starhp.o : star3.h
  300. starsample.o: star3.h 
  301. starsupp.o: star3.h 
  302. startek.o: star3.h 
  303. staruplot.o: star3.h 
  304.  
  305. install: all
  306.     strip $(TARGS)
  307.     mv $(TARGS) $(BINDIR)
  308.  
  309. dist:
  310.     cp ${FILES} ${DISTDIR}
  311.  
  312. clean:
  313.     rm -f ${OBJS} ${TARGS} a.out core
  314.