home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / alt / sources / 2523 / Makefile < prev    next >
Encoding:
Makefile  |  1992-11-15  |  3.6 KB  |  130 lines

  1. # @(#)Makefile    1.32 11/8/92
  2.  
  3. # Uncomment the following if you're compiling on Solaris 2.  It adds an option
  4. # (-o) and changes the default device name of the CD-ROM.
  5. #SOL2 = -DSYSV
  6.  
  7. # Set these to the locations of your XView include files and libraries.
  8. INCDIR = $(OPENWINHOME)/include
  9. LIBDIR = $(OPENWINHOME)/lib
  10.  
  11. # If your linker supports the -R flag to set a default location for
  12. # shared libraries, uncomment this line.
  13. #LIBLOC = -R$(LIBDIR)
  14.  
  15. # Set these to the directory names in which to install the software and
  16. # help files.
  17. BINDIR = $(OPENWINHOME)/bin
  18. HLPDIR = $(OPENWINHOME)/lib/help
  19.  
  20. # And don't worry about anything from this line on.
  21.  
  22. ############################################################################
  23. # Parameters.
  24.  
  25. PROGRAM = workman
  26. SOURCES.c = workman_stubs.c database.c hardware.c cdinfo.c display.c setup.c
  27. SOURCES.h = struct.h workman_ui.h
  28.  
  29. OBJECTS = \
  30.     $(SOURCES.c:%.c=%.o)
  31.  
  32. # Compiler flags.
  33.  
  34. CFLAGS = -O
  35. CPPFLAGS = -I$(INCDIR) $(SOL2)
  36. LDFLAGS = -L$(LIBDIR) $(LIBLOC)
  37. LDLIBS = -lxview -lolgx -lX11 -ldl
  38. CC = cc
  39.  
  40. # Standard targets.
  41.  
  42. all:     $(PROGRAM) $(PROGRAM).man workmandb.man
  43.  
  44. $(PROGRAM): $(SOURCES.c) $(OBJECTS)
  45.     $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LDLIBS)
  46.  
  47. clean:
  48.     $(RM) $(OBJECTS) *.BAK *.delta core
  49.  
  50. install: $(PROGRAM)
  51.     cp $(PROGRAM) $(BINDIR)
  52.     chmod 755 $(BINDIR)/$(PROGRAM)
  53.     cp $(PROGRAM).info $(HLPDIR)
  54.     chmod 644 $(HLPDIR)/$(PROGRAM).info
  55.  
  56. display.o: display.c workman_ui.h
  57. # This next one isn't completely true, but close enough
  58. $(OBJECTS): struct.h
  59.  
  60. $(PROGRAM).man: $(PROGRAM).1
  61.     nroff -man $(PROGRAM).1 > $(PROGRAM).man
  62. workmandb.man: workmandb.4
  63.     nroff -man workmandb.4 > workmandb.man
  64.  
  65. #
  66. # These targets are for building the shar distribution.
  67. #
  68. shar: part01
  69.  
  70. ALLFILES= README ANSWERS INSTALLATION $(PROGRAM)_ui.h \
  71.     $(PROGRAM).man $(PROGRAM).1 $(SOURCES.c) workmandb.man workmandb.4 \
  72.     CHANGELOG struct.h bitmaps bitmaps/loud.icon bitmaps/loud0.icon \
  73.     bitmaps/loud1.icon bitmaps/loud2.icon bitmaps/loud3.icon \
  74.     bitmaps/loud4.icon bitmaps/loud5.icon bitmaps/loud6.icon \
  75.     bitmaps/phones bitmaps/phones0 bitmaps/phonesl1 bitmaps/phonesl2 \
  76.     bitmaps/phonesl3 bitmaps/phonesr1 bitmaps/phonesr2 bitmaps/phonesr3 \
  77.     bitmaps/sink0 bitmaps/sink1 bitmaps/sink2 bitmaps/sink3 \
  78.     bitmaps/sink4 bitmaps/sink5 bitmaps/sink6 bitmaps/sink7 \
  79.     bitmaps/eject.button bitmaps/ff.button \
  80.     bitmaps/icon bitmaps/iconmask bitmaps/pause.button \
  81.     bitmaps/play.button bitmaps/rew.button bitmaps/stop.button \
  82.     $(PROGRAM).info Makefile
  83.  
  84. part01: $(ALLFILES)
  85.     makekit -n part $(ALLFILES)
  86.  
  87. #
  88. # The following builds a compressed tarfile for binary distribution.
  89. # It will require a little hacking to use on machines other than mine.
  90. #
  91. AUXDIR = /tmp
  92.  
  93. AUXSTUFF = $(AUXDIR)/$(PROGRAM) $(AUXDIR)/ANSWERS \
  94.     $(AUXDIR)/$(PROGRAM).info $(AUXDIR)/CHANGELOG $(AUXDIR)/$(PROGRAM).1 \
  95.     $(AUXDIR)/$(PROGRAM).man $(AUXDIR)/workmandb.man $(AUXDIR)/workmandb.4
  96.  
  97. tarfile: $(AUXDIR)/$(PROGRAM).tar.Z
  98.  
  99. $(AUXDIR)/$(PROGRAM).tar.Z: $(AUXSTUFF)
  100.     cd $(AUXDIR); tar cf - $(PROGRAM) \
  101.         $(PROGRAM).info CHANGELOG $(PROGRAM).man $(PROGRAM).1 \
  102.         workmandb.man workmandb.4 ANSWERS | \
  103.         compress > $@
  104.     chmod 644 $@
  105.  
  106. $(AUXDIR)/$(PROGRAM): $(PROGRAM)
  107.     cp $(PROGRAM) $@
  108.     chmod 755 $@
  109. $(AUXDIR)/$(PROGRAM).info: $(PROGRAM).info
  110.     cp $(PROGRAM).info $(AUXDIR)
  111.     chmod 644 $@
  112. $(AUXDIR)/ANSWERS: ANSWERS
  113.     cp ANSWERS $@
  114.     chmod 644 $@
  115. $(AUXDIR)/CHANGELOG: CHANGELOG
  116.     cp CHANGELOG $@
  117.     chmod 644 $@
  118. $(AUXDIR)/workmandb.man: workmandb.man
  119.     cp workmandb.man $@
  120.     chmod 644 $@
  121. $(AUXDIR)/workmandb.4: workmandb.4
  122.     cp workmandb.4 $@
  123.     chmod 644 $@
  124. $(AUXDIR)/$(PROGRAM).man: $(PROGRAM).man
  125.     cp $(PROGRAM).man $@
  126.     chmod 644 $@
  127. $(AUXDIR)/$(PROGRAM).1: $(PROGRAM).1
  128.     cp $(PROGRAM).1 $@
  129.     chmod 644 $@
  130.