home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / os2 / remind / src / makefile < prev    next >
Encoding:
Makefile  |  1993-10-12  |  6.5 KB  |  208 lines

  1. # Makefile for REMIND
  2.  
  3. #-----------------------------------------------------------------------------
  4. # THINGS FOR YOU TO EDIT START BELOW
  5. #-----------------------------------------------------------------------------
  6.  
  7. # Uncomment the next line if you are running on a SYSV system
  8. # SYSV= -DSYSV
  9.  
  10. # Uncomment the next line if you are running under UNIX (including SYSV!)
  11. UNIX= -DUNIX
  12.  
  13. # Uncomment the next lines if you want to use gcc instead of default compiler
  14. # NOTE:  Tempting as it may be, if you use 'cc' for the C compiler, do not
  15. # use 'ld' for the linker.  It will probably work much better if you use
  16. # LD= cc rather than LD= ld.
  17. CC= gcc
  18. LD= gcc
  19.  
  20. # Put any additional flags for the C compiler or linker here - if you
  21. # are not using gcc, you probably want to remove '-ansi'.
  22. CFLAGS= -O -ansi
  23. CDEFS=
  24. LDFLAGS=
  25.  
  26. #### INSTALLATION LOCATIONS ####
  27. # Note that I use 'cp' rather than 'install' for improved portability.
  28. #
  29. # BINDIR:  Where should the Remind executable be installed?
  30. BINDIR= /usr/local/bin
  31.  
  32. # SCRIPTDIR:  Where should the kall and rem shell scripts be installed?
  33. SCRIPTDIR= /usr/share/bin
  34.  
  35. # MANDIR:  Where should the man pages be installed?
  36. MANDIR= /usr/local/man
  37.  
  38. # MANSECT:  Which man section should the man pages go into?
  39. MANSECT= 1
  40.  
  41. # EXEMODE:  What file protection mode should be used for the executables?
  42. EXEMODE= 755
  43.  
  44. # MANMODE:  What file protection mode should be used for the man pages?
  45. MANMODE= 644
  46.  
  47. # OWNER, GROUP:  What owner and group to use for executables,
  48. # scripts and man pages?
  49. OWNER=bin
  50. GROUP=bin
  51.  
  52. #-----------------------------------------------------------------------------
  53. # YOU SHOULDN'T EDIT ANYTHING BELOW HERE.  You may want to change some things
  54. # in config.h; then, you should be able to type 'make'.
  55. #-----------------------------------------------------------------------------
  56. VERSION= 03.00.10
  57. MATHLIB= -lm
  58.  
  59. HDRS= config.h err.h expr.h globals.h protos.h types.h version.h \
  60. lang.h english.h german.h dutch.h finnish.h french.h norwgian.h
  61.  
  62. STDHDRS= config.h types.h protos.h globals.h err.h lang.h
  63.  
  64. LANGHDRS= english.h german.h dutch.h finnish.h french.h norwgian.h
  65.  
  66. SRCS= calendar.c dorem.c dosubst.c expr.c files.c funcs.c globals.c hbcal.c \
  67. init.c main.c moon.c omit.c sort.c queue.c token.c trigger.c userfns.c \
  68. utils.c var.c
  69.  
  70. MANIFEST= README.UNIX README.DOS COPYRIGHT $(HDRS) $(SRCS) Makefile rem rem.1 \
  71. remind.1 remind-all.csh remind-all.sh test.rem test-rem test.cmp makefile.tc \
  72. makefile.msc lnk.msc lnk.tc MANIFEST.UNX MANIFEST.DOS WHATSNEW.30 kall kall.1 \
  73. defs.rem README.OS2 makefile.os2 rem2ps.c rem2ps.h remind.def rem2ps.1 \
  74. tstlang.rem README.BCC lnk.bcc makefile.bcc os2func.c \
  75. test-rem.bat test-rem.cmd test1.cmp test2.cmp
  76.  
  77.  
  78. OBJS= $(SRCS:.c=.o)
  79.  
  80. all: remind rem2ps
  81.  
  82. .c.o:
  83.     $(CC) $(UNIX) $(SYSV) -c $(CFLAGS) $(CDEFS) $*.c
  84.  
  85. rem2ps: rem2ps.o
  86.     $(LD) $(LDFLAGS) -o rem2ps rem2ps.o
  87.  
  88. remind: $(OBJS)
  89.     $(LD) $(LDFLAGS) -o remind $(OBJS) $(MATHLIB)
  90.  
  91. clean:
  92.     rm -f *.o *~ core *.bak
  93.  
  94. clobber:
  95.     rm -f *.o *~ remind rem2ps test.out core *.bak
  96.  
  97. test: remind
  98.     sh test-rem
  99.  
  100. rem2ps.o: rem2ps.c rem2ps.h lang.h config.h
  101. calendar.o: calendar.c $(STDHDRS) expr.h
  102. dorem.o: dorem.c $(STDHDRS) expr.h
  103. dosubst.o: dosubst.c $(STDHDRS) $(LANGHDRS)
  104. expr.o: expr.c $(STDHDRS) expr.h
  105. files.o: files.c $(STDHDRS)
  106. funcs.o: funcs.c $(STDHDRS) expr.h version.h
  107. globals.o: globals.c config.h types.h globals.h err.h lang.h $(LANGHDRS)
  108. hbcal.o: hbcal.c $(STDHDRS)
  109. init.o: init.c $(STDHDRS) expr.h version.h lang.h $(LANGHDRS)
  110. main.o: main.c $(STDHDRS) expr.h
  111. moon.o: moon.c $(STDHDRS)
  112. omit.o: omit.c $(STDHDRS)
  113. sort.o: sort.c $(STDHDRS)
  114. queue.o: queue.c $(STDHDRS)
  115. token.o: token.c $(STDHDRS)
  116. trigger.o: trigger.c $(STDHDRS) expr.h
  117. userfns.o: userfns.c $(STDHDRS) expr.h
  118. utils.o: utils.c $(STDHDRS)
  119. var.o: var.c $(STDHDRS) expr.h
  120.  
  121. tarZ:
  122.     tar cvf remind-3.0.10.tar $(MANIFEST)
  123.     compress -v remind-3.0.10.tar
  124.  
  125. shar:
  126.     shar -x -n"Remind $(VERSION)" -l45 -o./Shar $(MANIFEST)
  127.  
  128. todos:
  129.     mcopy -tn $(MANIFEST) a:
  130.  
  131. fromdos:
  132.     mcopy -tn 'a:*' .
  133.     -mv -f copyrigh COPYRIGHT
  134.     -mv -f makefile Makefile
  135.     -mv -f readme.os2 README.OS2
  136.     -mv -f readme.dos README.DOS
  137.     -mv -f readme.bcc README.BCC
  138.     -mv -f readme.uni README.UNIX
  139.     -mv -f remind-a.csh remind-all.csh
  140.     -mv -f remind-a.sh remind-all.sh
  141.     -mv -f manifest.dos MANIFEST.DOS
  142.     -mv -f manifest.unx MANIFEST.UNX
  143.     -mv -f whatsnew.30 WHATSNEW.30
  144.     -chmod u+x test-rem
  145.  
  146. backup:
  147.     cp $(MANIFEST) ../backup
  148.  
  149. transmit:
  150.     sz -a -e $(MANIFEST)
  151.  
  152. install:  install-bin install-scripts install-man
  153.  
  154. install-bin: remind rem2ps
  155.     cp remind $(BINDIR)/remind
  156.     -chmod $(EXEMODE) $(BINDIR)/remind
  157.     -chown $(OWNER) $(BINDIR)/remind
  158.     -chgrp $(GROUP) $(BINDIR)/remind
  159.     cp rem2ps $(BINDIR)/rem2ps
  160.     -chmod $(EXEMODE) $(BINDIR)/rem2ps
  161.     -chown $(OWNER) $(BINDIR)/rem2ps
  162.     -chgrp $(GROUP) $(BINDIR)/rem2ps
  163.  
  164. install-scripts:
  165.     cp kall $(SCRIPTDIR)/kall
  166.     -chmod $(EXEMODE) $(SCRIPTDIR)/kall
  167.     -chown $(OWNER) $(SCRIPTDIR)/kall
  168.     -chgrp $(GROUP) $(SCRIPTDIR)/kall
  169.     cp rem $(SCRIPTDIR)/rem
  170.     -chmod $(EXEMODE) $(SCRIPTDIR)/rem
  171.     -chown $(OWNER) $(SCRIPTDIR)/rem
  172.     -chgrp $(GROUP) $(SCRIPTDIR)/rem
  173.  
  174. install-man:
  175.     cp remind.1 $(MANDIR)/man$(MANSECT)/remind.$(MANSECT)
  176.     -chmod $(MANMODE) $(MANDIR)/man$(MANSECT)/remind.$(MANSECT)
  177.     -chown $(OWNER) $(MANDIR)/man$(MANSECT)/remind.$(MANSECT)
  178.     -chgrp $(GROUP) $(MANDIR)/man$(MANSECT)/remind.$(MANSECT)
  179.     cp rem.1 $(MANDIR)/man$(MANSECT)/rem.$(MANSECT)
  180.     -chmod $(MANMODE) $(MANDIR)/man$(MANSECT)/rem.$(MANSECT)
  181.     -chown $(OWNER) $(MANDIR)/man$(MANSECT)/rem.$(MANSECT)
  182.     -chgrp $(GROUP) $(MANDIR)/man$(MANSECT)/rem.$(MANSECT)
  183.     cp kall.1 $(MANDIR)/man$(MANSECT)/kall.$(MANSECT)
  184.     -chmod $(MANMODE) $(MANDIR)/man$(MANSECT)/kall.$(MANSECT)
  185.     -chown $(OWNER) $(MANDIR)/man$(MANSECT)/kall.$(MANSECT)
  186.     -chgrp $(GROUP) $(MANDIR)/man$(MANSECT)/kall.$(MANSECT)
  187.     cp rem2ps.1 $(MANDIR)/man$(MANSECT)/rem2ps.$(MANSECT)
  188.     -chmod $(MANMODE) $(MANDIR)/man$(MANSECT)/rem2ps.$(MANSECT)
  189.     -chown $(OWNER) $(MANDIR)/man$(MANSECT)/rem2ps.$(MANSECT)
  190.     -chgrp $(GROUP) $(MANDIR)/man$(MANSECT)/rem2ps.$(MANSECT)
  191.  
  192. release:
  193.     -mkdir RELEASE
  194.     -rm -f RELEASE/*
  195.     mkpatch ../prev . patch.10 Shar "Remind-3.0/Patch-10/part"
  196.     mv Shar* RELEASE
  197.     rm -f patch.10
  198.     for i in *.1; do nroff -man $$i | sed -e 's/_//g' > `basename $$i .1`.man; done
  199.     mv *.man RELEASE
  200.     for i in *.1; do groff -man -Tps $$i > `basename $$i .1`.ps; done
  201.     mv *.ps RELEASE
  202.  
  203. # Meant for debugging - don't invoke this target unless you know what
  204. # you're doing!
  205. majortest:
  206.     for comp in "cc" "gcc -Wall -pedantic -ansi" ; do for lang in 1 2 3 4 5 0 ; do for def in ISOLATIN1 IBMEXTENDED FOOBARBAZ ; do echo $$def $$lang ; $(MAKE) clobber ; $(MAKE) "CDEFS=-DLANG=$$lang -D$$def=1" CFLAGS=-O "CC=$$comp" "LD=$$comp" ; done ; done ; done
  207.  
  208.