home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / xfitsvew.zip / XFITSview / Makefile.SunOS < prev    next >
Makefile  |  1997-10-02  |  9KB  |  226 lines

  1. #-----------------------------------------------------------------------
  2. #  Copyright (C) 1996
  3. #  Associated Universities, Inc. Washington DC, USA.
  4. #  This program is free software; you can redistribute it and/or
  5. #  modify it under the terms of the GNU General Public License as
  6. #  published by the Free Software Foundation; either version 2 of
  7. #  the License, or (at your option) any later version.
  8. #
  9. #  This program is distributed in the hope that it will be useful,
  10. #  but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. #  GNU General Public License for more details.
  13. #
  14. #  You should have received a copy of the GNU General Public
  15. #  License along with this program; if not, write to the Free
  16. #  Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
  17. #  MA 02139, USA.
  18. #-----------------------------------------------------------------------
  19. # The following values may need to be changed to reflect your configuration.
  20.  
  21. # Note an ansi c compatible compiler is required.
  22. CC = acc                               # Sun OS NRAO
  23.  
  24. # CC is that name of the c compiler to use, some possibilities are suggested:
  25. #CC  = /opt/TESTspro/SUNWspro/bin/cc   # Solaris NRAO
  26. #CC  = /opt/SUNWspro/bin/cc            # Solaris
  27. #CC  = /usr/lang/acc                   # Sun OS
  28. #CC  = cc                              # Dec Alpha OSF/1 = Digital Unix
  29. #CC  = cc                              # IBM RS/6000
  30. #CC  = gcc                             # Linux
  31. #CC  = gcc                             # FreeBSD
  32. #CC  = cc                              # HP
  33. #CC  = cc                              # Dec
  34. #CC  = cc                              # SGI
  35.  
  36. #   Include directories, need X-Windows and Motif as well as ./fitssubs
  37. #   Some X Window System implementations do not place their include in 
  38. #   the standard Unix directory /usr/include, some of these are listed below.
  39. #   For Sun, make sure OPENWINHOME is set!  (/usr/openwin usually)
  40. #   Motif includes are assumed in directory Xm parallel to the X11 include 
  41. #   directory, if this is not the case then INCDIROS should list the directory
  42. #   above the Motif includes (preceeded by -I).
  43.  
  44. INCDIROS     = -I/local/X11R5/include/    # NRAO SunOS
  45. #INCDIROS     =                           # Dec Alpha OSF/1 = Digital Unix
  46. #INCDIROS     =                           # Dec
  47. #INCDIROS     =                           # IBM RS/6000
  48. #INCDIROS     =                           # Linux
  49. #INCDIROS     =                           # FreeBSD
  50. #INCDIROS     =                           # SGI
  51. #INCDIROS     = -I/usr/include/X11R5/ -I/usr/include/Motif1.2   # HP
  52. #INCDIROS     = -I$(OPENWINHOME)/include/ -I/opt/SUNWmotif/include # Solaris
  53. #INCDIROS     = -I$(OPENWINHOME)/include/ # Sun OS
  54.  
  55. INCDIR = -I./fitssubs/ $(INCDIROS)
  56.  
  57. # DEBUG is the debugger/optimizer flag, 
  58. # O is some general level of optimization
  59. DEBUG = -O
  60.  
  61. # set compiler flags.  Add any other options as needed
  62. CFLAGS = $(DEBUG) $(INCDIR)
  63. # For Solaris try:
  64. #CFLAGS = $(DEBUG) $(INCDIR) -v -K PIC -Xc
  65. #for HP:
  66. #CFLAGS = $(DEBUG) -Aa $(INCDIR)
  67.  
  68. # RANLIB points to ranlib if it's necessary and something innocuous otherwise
  69. # use the following for systems needing ranlib (SunOS, Linux, FreeBSD,
  70. # IBM RS/6000
  71. RANLIB = ranlib
  72. # if ranlib not needed/allowed (Solaris, HP, SGI)
  73. #RANLIB = echo no ranlib needed for
  74.  
  75. # set linker flags.  Add other options as needed.
  76. # -s automatically strips (removes debugging information) the executable
  77. # For Solaris try:
  78. #LDFLAGS = -s -v -K PIC -Xc -R $(OPENWINHOME)/lib -R /opt/SUNWmotif/lib
  79. LDFLAGS = -s
  80.  
  81. #   LIBDIR points to the X-windows and Motif link library directory(ies)
  82. #   Standard Unix libraries are usually found in /usr/lib; 
  83. #   some X Window System implementations place their libraries elsewhere.  
  84.  
  85. LIBDIR = -L/local/X11R5/lib          # NRAO SunOS
  86.  
  87. #   Some possibilities are suggested:
  88. #LIBDIR  = -L/usr/lib/X11            # Dec Alpha OSF/1 = Digital Unix
  89. #LIBDIR  = -L/usr/lib/X11            # Dec
  90. #LIBDIR  = -L/usr/lib/X11R5 -L/usr/lib/Motif1.2     # HP
  91. #LIBDIR  =                           # IBM RS/6000
  92. # For AIX 3.2.2 or earlier, use LIBDIR = -L/usr/lpp/X11/Xamples/lib
  93. #  if you have set up the X server to use MIT SHM shared memory.
  94. #LIBDIR   = -L/usr/X386/lib          # Linux
  95. #LIBDIR   = -L/usr/X11R6/lib         # FreeBSD
  96. #LIBDIR   =                          # SGI
  97. # on Solaris If you change LIBDIR, make sure to change LDFLAGS (-R argument)
  98. #LIBDIR    = -L$(OPENWINHOME)/lib -L/opt/SUNWmotif/lib   # Solaris
  99. #LIBDIR    = -L$(OPENWINHOME)/lib    # Sun OS
  100.  
  101. # Define libraries
  102. LIBS =  $(LIBDIR) -lXm -lXt -lXmu -lX11 -lXext -lm
  103. # for Solaris try
  104. #LIBS =  $(LIBDIR) -lXm -lXt -lXmu -lX11 -lXext -lm -lgen
  105. # for linux use the following for statically linked motif libraries
  106. #LIBS =  $(LIBDIR) -Wl,-Bstatic -lXm -lXpm  -Wl,-Bdynamic -lXt -lX11 -lXext -lSM -lICE -lX11 -lm
  107. # for HP try
  108. #LIBS =  $(LIBDIR) -lXm -lXt -lX11 -lXext -lm        # HP
  109.  
  110. # BYTEORD is the byte order:
  111. BYTEORD = big    # for big endian machines (Sun, IBM RS/6000, HP, SGI)
  112. #BYTEORD = little # for little endian (PCs, Dec, Dec Alpha)
  113.  
  114. #------------------------------------------------------------------------
  115.  
  116. #  You shouldn't need to change anything below here.
  117. TARGETS= XFITSview
  118.  
  119. # ARCHIVE is the name of the FITS archive
  120. ARCHIVE=XFITSview1.11.tar
  121.  
  122. all:  $(TARGETS)
  123.  
  124. fitslibrary:    fitssubs/myconfig.h
  125.     cd fitssubs; $(MAKE)  CC="$(CC)" CFLAGS="$(CFLAGS)" RANLIB="$(RANLIB)"
  126.  
  127. fitssubs/myconfig.h: 
  128.     cp fitssubs/myconfig.h.$(BYTEORD) fitssubs/myconfig.h; 
  129.  
  130. XFITSview: fitslibrary XFITSview.o library 
  131.     $(CC) $(LDFLAGS) -o $@ XFITSview.o libXFITSview.a fitssubs/libFITS.a $(LIBS)
  132.  
  133. XFITSview.o: XFITSview.c xfitsview.h imagedisp.h FITS2Pix.h color.h infobox.h cursor.h scrolltext.h 
  134.     $(CC) -c $(CFLAGS) XFITSview.c
  135.  
  136. libXFITSview.a: FITS2Pix.o color.o control.o imagedisp.o optionbox.o infobox.o markpos.o lookpos.o cursor.o moviebox.o blinkbox.o textfile.o scrolltext.o menu.o help.o logger.o messagebox.o
  137.     $(RANLIB) libXFITSview.a;
  138.  
  139. library:    libXFITSview.a
  140.  
  141. FITS2Pix.o: FITS2Pix.c xfitsview.h imagedisp.h 
  142.     $(CC) -c $(CFLAGS) FITS2Pix.c
  143.     ar r libXFITSview.a FITS2Pix.o
  144.  
  145. color.o: color.c xfitsview.h imagedisp.h imagedisp.h color.h
  146.     $(CC) -c $(CFLAGS) color.c
  147.     ar r libXFITSview.a color.o
  148.  
  149. control.o: control.c xfitsview.h imagedisp.h color.h optionbox.h control.h
  150.     $(CC) -c $(CFLAGS) control.c
  151.     ar r libXFITSview.a control.o
  152.  
  153. imagedisp.o: imagedisp.c xfitsview.h imagedisp.h fitssubs/wpos.h
  154.     $(CC) -c $(CFLAGS) imagedisp.c
  155.     ar r libXFITSview.a imagedisp.o
  156.  
  157. markpos.o: markpos.c markpos.h imagedisp.h fitssubs/wpos.h
  158.     $(CC) -c $(CFLAGS) markpos.c
  159.     ar r libXFITSview.a markpos.o
  160.  
  161. lookpos.o: lookpos.c lookpos.h imagedisp.h fitssubs/wpos.h
  162.     $(CC) -c $(CFLAGS) lookpos.c
  163.     ar r libXFITSview.a lookpos.o
  164.  
  165. optionbox.o: optionbox.c  xfitsview.h imagedisp.h FITS2Pix.h
  166.     $(CC) -c $(CFLAGS) optionbox.c
  167.     ar r libXFITSview.a optionbox.o
  168.  
  169. infobox.o: infobox.c  xfitsview.h imagedisp.h infobox.h
  170.     $(CC) -c $(CFLAGS) infobox.c
  171.     ar r libXFITSview.a infobox.o
  172.  
  173. cursor.o: cursor.c  definecursor.h
  174.     $(CC) -c $(CFLAGS) cursor.c
  175.     ar r libXFITSview.a cursor.o
  176.  
  177. moviebox.o: moviebox.c  xfitsview.h imagedisp.h moviebox.h FITS2Pix.h fitssubs/wpos.h
  178.     $(CC) -c $(CFLAGS) moviebox.c
  179.     ar r libXFITSview.a moviebox.o
  180.  
  181. blinkbox.o: blinkbox.c  xfitsview.h imagedisp.h blinkbox.h
  182.     $(CC) -c $(CFLAGS) blinkbox.c
  183.     ar r libXFITSview.a blinkbox.o
  184.  
  185. textfile.o: textfile.c textfile.h
  186.     $(CC) -c $(CFLAGS) textfile.c
  187.     ar r libXFITSview.a textfile.o
  188.  
  189. scrolltext.o: scrolltext.c  textfile.h scrolltext.h
  190.     $(CC) -c $(CFLAGS) scrolltext.c
  191.     ar r libXFITSview.a scrolltext.o
  192.  
  193. menu.o: menu.c  xfitsview.h imagedisp.h menu.h
  194.     $(CC) -c $(CFLAGS) menu.c
  195.     ar r libXFITSview.a menu.o
  196.  
  197. help.o: help.c  scrolltext.h help.h
  198.     $(CC) -c $(CFLAGS) help.c
  199.     ar r libXFITSview.a help.o
  200.  
  201. logger.o: logger.c  textfile.h logger.h
  202.     $(CC) -c $(CFLAGS) logger.c
  203.     ar r libXFITSview.a logger.o
  204.  
  205. messagebox.o: messagebox.c  scrolltext.h messagebox.h
  206.     $(CC) -c $(CFLAGS) messagebox.c
  207.     ar r libXFITSview.a messagebox.o
  208.  
  209. distrib:
  210.     cd ..; rm -f $(ARCHIVE)
  211.     rm -f fitssubs/myconfig.h
  212.     cd ..; tar cvf $(ARCHIVE) XFITSview/Makefile* 
  213.     cd ..; tar uvf $(ARCHIVE) XFITSview/*.c XFITSview/*.h
  214.     cd ..; tar uvf $(ARCHIVE) XFITSview/README XFITSview/LICENSE
  215.     cd ..; tar uvf $(ARCHIVE) XFITSview/*.hlp XFITSview/changes
  216.     cd ..; tar uvf $(ARCHIVE) XFITSview/fitssubs/Makefile* 
  217.     cd ..; tar uvf $(ARCHIVE) XFITSview/fitssubs/*.c XFITSview/fitssubs/*.h
  218.     cd ..; tar uvf $(ARCHIVE) XFITSview/fitssubs/myconfig.* 
  219.     cd ..; tar uvf $(ARCHIVE) XFITSview/fitssubs/*.doc
  220.  
  221. clobber:
  222.     cd fitssubs; $(MAKE) clobber; cd .. 
  223.     rm -f *.o *~* *.a 
  224.     rm -f $(TARGETS)
  225.  
  226.