home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / s / sd-27.zip / Makefile < prev    next >
Makefile  |  1992-11-23  |  3KB  |  106 lines

  1. # sample Makefile for Sd (square dance caller's helper)
  2.  
  3. # If your X system was compiled with an ANSI C compiler,
  4. # you should run "xmkmf", which will use the Imakefile and your
  5. # local X configuration information to generate a Makefile.
  6. # This sample Makefile will be moved to Makefile.bak.
  7.  
  8. # If you must use this file directly, expect to have to edit it.
  9.  
  10. CC=gcc
  11. CFLAGS=$(CDEBUGFLAGS) -traditional
  12. # Note: the "-traditional" above is needed only if "fixincludes" has
  13. # not been run on your machine.
  14.  
  15. # CDEBUGFLAGS is used by both cc and ld.
  16. # If you want a smaller executable and are willing to lose the ability
  17. # to debug, use "-O" instead of "-g".
  18. CDEBUGFLAGS = -O
  19.  
  20. # these flags are passed only to ld
  21. LDFLAGS = $(CDEBUGFLAGS)
  22.  
  23. # additional flags for gildea's code
  24. UICFLAGS = -Wswitch
  25.  
  26. #PEDCFLAGS = -pedantic -O -Wimplicit -Wreturn-type -Wunused -Wcomment
  27. #PEDANTICW = -Wformat -Wchar-subscripts -Wshadow -Wpointer-arith
  28. #PEDCFLAGS2 = $(PEDCFLAGS) $(PEDANTICW) -Wmissing-prototypes -Wnested-externs
  29. # for HP Snake: +w1 -z
  30.  
  31. SDUI_OBJ = sdui-x11.o
  32. SDUI_SRC = sdui-x11.c
  33.  
  34. # Libraries the UI needs to be linked with.  If your X11 libraries aren't
  35. # installed, you may want to add some -L<dir> flags to LDFLAGS below
  36. # to specify the library directories explicitly.
  37. SDUI_LIBS = -lXaw -lXmu -lXt -lXext -lX11
  38.  
  39. # override unnecessary SunOS 4.0 stuff:
  40. #TARGET_ARCH=
  41.  
  42. SD_OBJS = sdmain.o sdinit.o sdutil.o sdbasic.o sdtables.o \
  43.           sdtop.o sd.o sdpreds.o sd12.o sd16.o \
  44.           sdgetout.o sdmoves.o sdtand.o sdconc.o sdistort.o \
  45.           sdsi.o
  46.  
  47. SD_SRCS = sdmain.c sdinit.c sdutil.c sdbasic.c sdtables.c \
  48.           sdtop.c sd.c sdpreds.c sd12.c sd16.c \
  49.           sdgetout.c sdmoves.c sdtand.c sdconc.c sdistort.c \
  50.           sdsi.c
  51.  
  52. all: sd mkcalls sd_calls.dat
  53.  
  54. sd: $(SD_OBJS) $(SDUI_OBJ)
  55.     $(CC) $(LDFLAGS) -o $@ $(SD_OBJS) $(SDUI_OBJ) $(SDUI_LIBS)
  56.  
  57. mkcalls: mkcalls.o
  58.     $(CC) $(LDFLAGS) -o $@ mkcalls.o
  59.  
  60. sd_calls.dat: sd_calls.txt mkcalls
  61.     ./mkcalls
  62.  
  63. .SUFFIXES: .o .c .PS .dvi .info .txinfo
  64.  
  65. .txinfo.dvi:
  66.     tex $?
  67.  
  68. .txinfo.info:
  69.     makeinfo $?
  70.  
  71. # TeX outputs front, body, toc; we want front, toc, body
  72.  
  73. sd_doc-sorted.dvi: sd_doc.dvi
  74.     dviselect -i sd_doc.dvi =1:2 > tempa.dvi
  75.     dviselect -i sd_doc.dvi :_1 > tempb.dvi
  76.     (dviselect -i sd_doc.dvi -s 1: | dviselect =3:) > tempc.dvi
  77.     dviconcat -o sd_doc-sorted.dvi tempa.dvi tempb.dvi tempc.dvi
  78.     rm -f tempa.dvi tempb.dvi tempc.dvi
  79.  
  80. sd_doc.PS: sd_doc-sorted.dvi
  81.     dvips -U -o sd_doc.PS sd_doc-sorted.dvi
  82.  
  83.  
  84. sdui-x11.o: sdui-x11.c
  85.     $(CC) $(CFLAGS) $(UICFLAGS) -c sdui-x11.c
  86.  
  87. mkcalls.o sdmain.o sdsi.o sdui-x11.o: paths.h
  88.  
  89. mkcalls.o sdmove.o sdbasic.o sd16.o: database.h
  90.  
  91. $(SD_OBJS): sd.h database.h
  92.  
  93.  
  94. clean::
  95.     rm -f *~ core *.o sd mkcalls sd_calls.dat sd.tar
  96.  
  97. lint:
  98.     /usr/lang/alint -ux $(SD_SRCS) $(SDUI_SRC)
  99.  
  100. DISTFILES = README Relnotes relnotes.archive Imakefile Makefile Sd.res \
  101.             sd_calls.txt COPYING database.doc sd_doc.txinfo
  102. DISTSRCS = sd.h database.h paths.h mkcalls.c
  103.  
  104. distrib:
  105.     tar cvf sd.tar $(DISTFILES) $(SD_SRCS) $(SDUI_SRC) $(DISTSRCS)
  106.