home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / jove-4.16-src.tgz / tar.out / bsd / jove / xjove / Makefile < prev    next >
Makefile  |  1996-09-28  |  4KB  |  110 lines

  1. ###########################################################################
  2. # This program is Copyright (C) 1991-1996 by C.H.Lindsey, University of   #
  3. # Manchester.  (X)JOVETOOL is provided to you without charge, and with no #
  4. # warranty.  You may give away copies of (X)JOVETOOL, including sources,  #
  5. # provided that this notice is included in all the files, except insofar  #
  6. # as a more specific copyright notices attaches to the file (x)jovetool.c #
  7. ###########################################################################
  8.  
  9. # Makefile for xjove (XView) and jovetool (SunView)
  10. #
  11. # This makefile may be invoked directly, or by the main JOVE Makefile.
  12. # A number of macros may need to be adjusted for any particular environment.
  13. # If the Makefile is invoked by the main JOVE Makefile, most
  14. # customization will be inherited from that Makefile automatically:
  15. # DEFINES, CC, OPTFLAGS, SYSDEFS, XINSTALL, BINDIR, and INSTALLFLAGS.
  16. # The remaining macros that may need attention are XJLDFLAGS and XJCFLAGS.
  17. # Under Solaris 2, make sure that your OPENWINHOME environment variable
  18. # is set.
  19.  
  20. # Select optimization level (flags passed to compiling and linking steps).
  21. # On most systems, -g for debugging, -O for optimization.
  22. # On the official Sun ANSI C compiler and the standard System V Release 4
  23. # compiler, adding -Xa -v will increase compiler checking.
  24. OPTFLAGS = -O
  25.  
  26. # For SunView:
  27. # DEFINES=-DSUNVIEW
  28. DEFINES=
  29.  
  30. # for Solaris 2.x:
  31. SYSDEFS=-DSYSVR4
  32. # -i: ignore any LD_LIBRARY_PATH setting
  33. # -L<dir>: add <dir> to library search path
  34. # -R<dir[:dir]>: specify library search directories to dynamic linker
  35. XJLDFLAGS= -i -L$$OPENWINHOME/lib -R$$OPENWINHOME/lib
  36.  
  37. # for Sun0s4.x:
  38. # XJLDFLAGS=-L$$OPENWINHOME/lib
  39. # SYSDEFS=-DSUNOS41
  40.  
  41. CFLAGS = $(OPTFLAGS) -I.. $(SYSDEFS) $(DEFINES)
  42. XJCFLAGS = -I$$OPENWINHOME/include
  43.  
  44. BINDIR = /usr/local/bin
  45.  
  46. # The install commands of BSD and System V differ in unpleasant ways:
  47. # -c: copy (BSD); -c dir: destination directory (SysV)
  48. # -s: strip (BSD); -s: suppress messages (SysV)
  49. # Also, the destination specification is very different.
  50. # The result is that the System V install command must not be used.
  51. # If you know that /bin/install is the BSD program, you can use it.
  52. # "cp" will work reasonably well, but be aware that any links continue
  53. # referencing the old file with new contents.
  54.  
  55. INSTALLFLAGS = # -g bin -o root
  56.  
  57. # to install executable files
  58. XINSTALL=cp
  59. #XINSTALL=/usr/ucb/install $(INSTALLFLAGS) -c -m 755 # -s
  60.  
  61. C_SRC = jovetool.c xjove.c jovewindows.c xjovewindows.c jovemenu.c \
  62.     exts.h jovewindows.h mousemsg.h xjovewindows.h
  63. ICONS = jove.icon jove.cursor copy.cursor cut.cursor paste.cursor
  64. MISC = Makefile README
  65. BACKUPS = $(C_SRC) $(ICONS) $(MISC)
  66.  
  67. default:        xjove
  68.  
  69. install:    installxjove
  70.  
  71. .filelist: $(BACKUPS)
  72.     @ls $(BACKUPS) >.filelist
  73.  
  74. installxjove:    xjove
  75.         $(XINSTALL) xjove $(BINDIR)/xjove
  76.  
  77. installjovetool:    jovetool
  78.         $(XINSTALL) jovetool $(BINDIR)/jovetool
  79.  
  80. jovetool:    jovetool.o jovewindows.o
  81.         $(CC) $(OPTFLAGS) $(LDFLAGS) -o jovetool jovetool.o jovewindows.o -lsuntool -lsunwindow -lpixrect
  82.  
  83. jovetool.o:    jovetool.c exts.h mousemsg.h $(ICONS)
  84.  
  85. jovewindows.o:    jovewindows.c jovemenu.c exts.h jovewindows.h ../tune.h
  86.  
  87. xjove:    xjove.o xjovewindows.o
  88.         $(CC) $(OPTFLAGS) $(LDFLAGS) $(XJLDFLAGS) -o xjove xjove.o xjovewindows.o -lxview -lolgx -lX11
  89.  
  90. xjove.o:    xjove.c exts.h mousemsg.h $(ICONS)
  91.         $(CC) $(CFLAGS) $(XJCFLAGS) -c xjove.c
  92.  
  93. xjovewindows.o:    xjovewindows.c jovemenu.c exts.h xjovewindows.h ../tune.h
  94.         $(CC) $(CFLAGS) $(XJCFLAGS) -c xjovewindows.c
  95.  
  96. tags:    $(C_SRC)
  97.     ctags -w $(C_SRC)
  98.  
  99. # override CIFLAGS with something like:
  100. # CIFLAGS = -m'some reason for change' -u4.14.10.n -q
  101.  
  102. ciall:
  103.     ci $(CIFLAGS) $(BACKUPS)
  104.  
  105. clean:
  106.         rm -f a.out core *.o jovetool xjove '#'*~ .filelist
  107.  
  108. clobber:    clean
  109.     rm -f *.orig *.rej
  110.