home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / xfitsvew.zip / XFITSview / Makefile.old < prev    next >
Makefile  |  1998-10-11  |  9KB  |  236 lines

  1. #-----------------------------------------------------------------------
  2. #  Copyright (C) 1996,1997, 1998
  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 = cc
  23.  
  24. # CC is that name of the c compiler to use, some possibilities are suggested:
  25. #CC  = /opt/SUNWspro/bin/cc            # Solaris
  26. #CC  = /usr/lang/acc                   # Sun OS
  27. #CC  = cc                              # Dec Alpha OSF/1 = Digital Unix
  28. #CC  = cc                              # IBM RS/6000
  29. #CC  = gcc                             # Linux
  30. #CC  = gcc                             # FreeBSD
  31. #CC  = cc                              # HP
  32. #CC  = cc                              # Dec
  33. #CC  = cc                              # SGI
  34.  
  35. #   Include directories, need X-Windows and Motif as well as ./fitssubs
  36. #   Some X Window System implementations do not place their include in 
  37. #   the standard Unix directory /usr/include, some of these are listed below.
  38. #   For Sun, make sure OPENWINHOME is set!  (/usr/openwin usually)
  39. #   Motif includes are assumed in directory Xm parallel to the X11 include 
  40. #   directory, if this is not the case then INCDIROS should list the directory
  41. #   above the Motif includes (preceeded by -I).
  42.  
  43. INCDIROS     = -I$(OPENWINHOME)/include/ -I/usr/dt/include  # NRAO Solaris
  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. #DEBUG = -g
  61.  
  62. # set compiler flags.  Add any other options as needed
  63. #CFLAGS = $(DEBUG) $(INCDIR)
  64. # For Solaris try:
  65. CFLAGS = $(DEBUG) $(INCDIR) -v -K PIC -Xc
  66. #for HP:
  67. #CFLAGS = $(DEBUG) -Aa $(INCDIR)
  68.  
  69. # RANLIB points to ranlib if it's necessary and something innocuous otherwise
  70. # use the following for systems needing ranlib (SunOS, Linux, FreeBSD,
  71. # IBM RS/6000
  72. #RANLIB = ranlib
  73. # if ranlib not needed/allowed (Solaris, HP, SGI)
  74. RANLIB = echo no ranlib needed for
  75.  
  76. # set linker flags.  Add other options as needed.
  77. # -s automatically strips (removes debugging information) the executable
  78. # For Solaris try:
  79. LDFLAGS = -s -v -K PIC -Xc -R $(OPENWINHOME)/lib -R /opt/SUNWmotif/lib
  80. $LDFLAGS = -v -K PIC -Xc -R $(OPENWINHOME)/lib -R /opt/SUNWmotif/lib
  81. #LDFLAGS = -s
  82.  
  83. #   LIBDIR points to the X-windows and Motif link library directory(ies)
  84. #   Standard Unix libraries are usually found in /usr/lib; 
  85. #   some X Window System implementations place their libraries elsewhere.  
  86.  
  87. #LIBDIR = -L/local/X11R5/lib          # NRAO SunOS
  88.  
  89. #   Some possibilities are suggested:
  90. #LIBDIR  = -L/usr/lib/X11            # Dec Alpha OSF/1 = Digital Unix
  91. #LIBDIR  = -L/usr/lib/X11            # Dec
  92. #LIBDIR  = -L/usr/lib/X11R5 -L/usr/lib/Motif1.2     # HP
  93. #LIBDIR  =                           # IBM RS/6000
  94. # For AIX 3.2.2 or earlier, use LIBDIR = -L/usr/lpp/X11/Xamples/lib
  95. #  if you have set up the X server to use MIT SHM shared memory.
  96. #LIBDIR   = -L/usr/X386/lib          # Linux
  97. #LIBDIR   = -L/usr/X11R6/lib         # FreeBSD
  98. #LIBDIR   =                          # SGI
  99. # on Solaris If you change LIBDIR, make sure to change LDFLAGS (-R argument)
  100. LIBDIR    = -L$(OPENWINHOME)/lib -L/usr/dt/lib -R /usr/dt/lib  # Solaris
  101. #LIBDIR    = -L$(OPENWINHOME)/lib    # Sun OS
  102.  
  103. # Define libraries
  104. #LIBS =  $(LIBDIR) -lXm -lXt -lXmu -lX11 -lXext -lm
  105. # for Solaris try
  106. LIBS =  $(LIBDIR) -lXm -lXt -lXmu -lX11 -lXext -lm -lgen
  107. # for linux use the following for statically linked motif libraries
  108. #LIBS =  $(LIBDIR) -Wl,-Bstatic -lXm -lXpm  -Wl,-Bdynamic -lXt -lX11 -lXext -lSM -lICE -lX11 -lm
  109. # for HP try
  110. #LIBS =  $(LIBDIR) -lXm -lXt -lX11 -lXext -lm        # HP
  111.  
  112. # BYTEORD is the byte order:
  113. BYTEORD = big    # for big endian machines (Sun, IBM RS/6000, HP, SGI)
  114. #BYTEORD = little # for little endian (PCs, Dec, Dec Alpha)
  115.  
  116. #------------------------------------------------------------------------
  117.  
  118. #  You shouldn't need to change anything below here.
  119. TARGETS= XFITSview
  120.  
  121. # ARCHIVE is the name of the FITS archive
  122. ARCHIVE=XFITSview1.2.tar
  123.  
  124. all:  $(TARGETS)
  125.  
  126. fitslibrary:    fitssubs/myconfig.h
  127.     cd fitssubs; $(MAKE)  CC="$(CC)" CFLAGS="$(CFLAGS)" RANLIB="$(RANLIB)"
  128.  
  129. fitssubs/myconfig.h: 
  130.     cp fitssubs/myconfig.h.$(BYTEORD) fitssubs/myconfig.h; 
  131.  
  132. XFITSview: fitslibrary XFITSview.o library 
  133.     $(CC) $(LDFLAGS) -o $@ XFITSview.o libXFITSview.a fitssubs/libFITS.a $(LIBS)
  134.  
  135. XFITSview.o: XFITSview.c xfitsview.h imagedisp.h FITS2Pix.h color.h infobox.h cursor.h scrolltext.h 
  136.     $(CC) -c $(CFLAGS) XFITSview.c
  137.  
  138. libXFITSview.a: FITS2Pix.o color.o control.o toolbox.o imagedisp.o optionbox.o infobox.o markpos.o lookpos.o cursor.o moviebox.o blinkbox.o textfile.o scrolltext.o menu.o helpbox.o aboutbox.o logger.o messagebox.o
  139.     $(RANLIB) libXFITSview.a;
  140.  
  141. library:    libXFITSview.a
  142.  
  143. FITS2Pix.o: FITS2Pix.c xfitsview.h imagedisp.h 
  144.     $(CC) -c $(CFLAGS) FITS2Pix.c
  145.     ar r libXFITSview.a FITS2Pix.o
  146.  
  147. color.o: color.c xfitsview.h imagedisp.h imagedisp.h color.h
  148.     $(CC) -c $(CFLAGS) color.c
  149.     ar r libXFITSview.a color.o
  150.  
  151. control.o: control.c xfitsview.h imagedisp.h color.h optionbox.h control.h
  152.     $(CC) -c $(CFLAGS) control.c
  153.     ar r libXFITSview.a control.o
  154.  
  155. toolbox.o: toolbox.c xfitsview.h imagedisp.h toolbox.h
  156.     $(CC) -c $(CFLAGS) toolbox.c
  157.     ar r libXFITSview.a toolbox.o
  158.  
  159. imagedisp.o: imagedisp.c xfitsview.h imagedisp.h fitssubs/wpos.h
  160.     $(CC) -c $(CFLAGS) imagedisp.c
  161.     ar r libXFITSview.a imagedisp.o
  162.  
  163. markpos.o: markpos.c markpos.h imagedisp.h fitssubs/wpos.h
  164.     $(CC) -c $(CFLAGS) markpos.c
  165.     ar r libXFITSview.a markpos.o
  166.  
  167. lookpos.o: lookpos.c lookpos.h imagedisp.h fitssubs/wpos.h
  168.     $(CC) -c $(CFLAGS) lookpos.c
  169.     ar r libXFITSview.a lookpos.o
  170.  
  171. optionbox.o: optionbox.c  xfitsview.h imagedisp.h FITS2Pix.h
  172.     $(CC) -c $(CFLAGS) optionbox.c
  173.     ar r libXFITSview.a optionbox.o
  174.  
  175. infobox.o: infobox.c  xfitsview.h imagedisp.h infobox.h
  176.     $(CC) -c $(CFLAGS) infobox.c
  177.     ar r libXFITSview.a infobox.o
  178.  
  179. cursor.o: cursor.c  definecursor.h
  180.     $(CC) -c $(CFLAGS) cursor.c
  181.     ar r libXFITSview.a cursor.o
  182.  
  183. moviebox.o: moviebox.c  xfitsview.h imagedisp.h moviebox.h FITS2Pix.h fitssubs/wpos.h
  184.     $(CC) -c $(CFLAGS) moviebox.c
  185.     ar r libXFITSview.a moviebox.o
  186.  
  187. blinkbox.o: blinkbox.c  xfitsview.h imagedisp.h blinkbox.h
  188.     $(CC) -c $(CFLAGS) blinkbox.c
  189.     ar r libXFITSview.a blinkbox.o
  190.  
  191. textfile.o: textfile.c textfile.h
  192.     $(CC) -c $(CFLAGS) textfile.c
  193.     ar r libXFITSview.a textfile.o
  194.  
  195. scrolltext.o: scrolltext.c  textfile.h scrolltext.h
  196.     $(CC) -c $(CFLAGS) scrolltext.c
  197.     ar r libXFITSview.a scrolltext.o
  198.  
  199. menu.o: menu.c  xfitsview.h imagedisp.h menu.h
  200.     $(CC) -c $(CFLAGS) menu.c
  201.     ar r libXFITSview.a menu.o
  202.  
  203. helpbox.o: helpbox.c  helpbox.h
  204.     $(CC) -c $(CFLAGS) helpbox.c
  205.     ar r libXFITSview.a helpbox.o
  206.  
  207. aboutbox.o: aboutbox.c  aboutbox.h scrolltext.h
  208.     $(CC) -c $(CFLAGS) aboutbox.c
  209.     ar r libXFITSview.a aboutbox.o
  210.  
  211. logger.o: logger.c  textfile.h logger.h
  212.     $(CC) -c $(CFLAGS) logger.c
  213.     ar r libXFITSview.a logger.o
  214.  
  215. messagebox.o: messagebox.c  scrolltext.h messagebox.h
  216.     $(CC) -c $(CFLAGS) messagebox.c
  217.     ar r libXFITSview.a messagebox.o
  218.  
  219. distrib:
  220.     cd ..; rm -f $(ARCHIVE)
  221.     rm -f fitssubs/myconfig.h
  222.     cd ..; tar cvf $(ARCHIVE) XFITSview/Makefile* 
  223.     cd ..; tar uvf $(ARCHIVE) XFITSview/*.c XFITSview/*.h
  224.     cd ..; tar uvf $(ARCHIVE) XFITSview/README XFITSview/LICENSE
  225.     cd ..; tar uvf $(ARCHIVE) XFITSview/*.hlp XFITSview/changes
  226.     cd ..; tar uvf $(ARCHIVE) XFITSview/fitssubs/Makefile* 
  227.     cd ..; tar uvf $(ARCHIVE) XFITSview/fitssubs/*.c XFITSview/fitssubs/*.h
  228.     cd ..; tar uvf $(ARCHIVE) XFITSview/fitssubs/myconfig.* 
  229.     cd ..; tar uvf $(ARCHIVE) XFITSview/fitssubs/*.doc
  230.  
  231. clobber:
  232.     cd fitssubs; $(MAKE) clobber; cd .. 
  233.     rm -f *.o *~* *.a 
  234.     rm -f $(TARGETS)
  235.  
  236.