home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / trn_12.zip / src / makefile < prev    next >
Makefile  |  1993-12-04  |  5KB  |  144 lines

  1. # $Id: Makefile.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  2. #
  3. # This software is Copyright 1991 by Stan Barber. 
  4. #
  5. # Permission is hereby granted to copy, reproduce, redistribute or otherwise
  6. # use this software as long as: there is no monetary profit gained
  7. # specifically from the use or reproduction of this software, it is not
  8. # sold, rented, traded or otherwise marketed, and this copyright notice is
  9. # included prominently in any copy made. 
  10. #
  11. # The author make no claims as to the fitness or correctness of this software
  12. # for any use whatsoever, and it is provided as is. Any use of this software
  13. # is at the user's own risk. 
  14. #
  15. # $Log: Makefile.SH,v $
  16. # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  17. # Changed clientlib to be built in the rn tree instead of the nntp tree.
  18. #
  19. # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  20. # Changed some install directives
  21. #
  22. # Revision 4.4  1991/09/09  20:18:23  sob
  23. # release 4.4
  24. #
  25. #
  26.  
  27. CC = gcc
  28. CFLAGS = -g
  29.  
  30. libs =  -ltermc -los2
  31. mlibs = -los2
  32. mthreading=mthreads.exe 
  33. public = trn.exe tmpthread.exe acttimes.exe 
  34. private = $(mthreading)
  35.  
  36. h1 = addng.h art.h artio.h artsrch.h autosub.h backpage.h bits.h cheat.h 
  37. h2 = common.h decode.h final.h head.h hdbm.h hdbmint.h help.h init.h
  38. h2 = intrp.h kfile.h last.h ng.h ngdata.h ngsrch.h ngstuff.h only.h rcln.h
  39. h3 = rcstuff.h respond.h rn.h search.h sw.h term.h util.h os2patch.h
  40.  
  41. h = $(h1) $(h2) $(h3) $(h4)
  42.  
  43. c1 = addng.c art.c artio.c artsrch.c autosub.c backpage.c bits.c cheat.c
  44. c2 = decode.c final.c hdbm.c head.c help.c init.c intrp.c kfile.c last.c
  45. c3 = $(NDIRC) ng.c ngdata.c nghash.c ngsrch.c ngstuff.c only.c rcln.c
  46. c4 = rcstuff.c respond.c rn.c rthreads.c rt-rn.c rt-select.c search.c sw.c
  47. c5 = term.c threads.c util.c unship.c uudecode.c os2patch.c os2trn.c
  48.  
  49. c = $(c1) $(c2) $(c3) $(c4) $(c5) $(c6)
  50.  
  51. mtc1 = mthreads.c mt-read.c mt-process.c mt-write.c mt-misc.c threads.c 
  52. mtc2 = os2patch.c $(NDIRC)
  53. mtc = $(mtc1) $(mtc2)
  54.  
  55. tmc = tmpthread.c tm-read.c tm-process.c tm-write.c mt-misc.c threads.c $(mtc2)
  56.  
  57. actc = acttimes.c os2patch.c
  58.  
  59. obj1 = addng.o art.o artio.o artsrch.o autosub.o backpage.o bits.o cheat.o
  60. obj2 = decode.o final.o head.o hdbm.o help.o init.o intrp.o kfile.o last.o
  61. obj3 = $(NDIRO) ng.o ngdata.o nghash.o ngsrch.o ngstuff.o only.o
  62. obj4 = rcln.o rcstuff.o respond.o rn.o rthreads.o rt-rn.o rt-select.o
  63. obj5 = search.o sw.o term.o threads.o util.o unship.o uudecode.o os2trn.o
  64. obj6 = os2patch.o
  65.  
  66. obj = $(obj1) $(obj2) $(obj3) $(obj4) $(obj5) $(obj6)
  67.  
  68. mto1 = mthreads.o mt-read.o mt-process.o mt-write.o mt-misc.o os2patch.o
  69. mto2 = threads.o getdate.o $(NDIRO)
  70. mtobj = $(mto1) $(mto2) $(mto3)
  71.  
  72. tmo1 = tmpthread.o tm-read.o tm-process.o tm-write.o mt-misc.o
  73. tmo2 = threads.o getdate.o
  74. tmobj = $(tmo1) $(tmo2) $(obj6)
  75.  
  76. acto = acttimes.o os2patch.o
  77.  
  78. add1 = Makefile.old Pnews Rnmail mt.check
  79. add2 = bsd config.h config.sh eunice filexp 
  80. add3 = loc makedepend makedir mbox.saver ndir.h newsetup
  81. add4 = newsgroups newsnews norm.saver
  82. add5 = pdp11 usg v7 ultrix sun hp-ux sgi xenix next server.h mips uts
  83. add6 = all pyr grimble .falseactive Pnews.header s5uniq sigtest stardent
  84.  
  85. addedbyconf = $(add1) $(add2) $(add3) $(add4) $(add5) $(add6)
  86.  
  87. # grrr
  88. SHELL = /bin/sh
  89.  
  90. .c.o:
  91.     $(CC) $(CFLAGS) -c $*.c
  92.  
  93. all: $(public) $(private) 
  94.     touch all
  95.  
  96. trn.exe: $(obj)
  97.     $(CC) $(LDFLAGS) $(obj) $(libs) -o trn.exe
  98.  
  99. mthreads.exe: $(mtobj)
  100.     $(CC) $(LDFLAGS) $(mtobj) $(mlibs) -o mthreads.exe
  101.  
  102. tmpthread.exe: $(tmobj)
  103.     $(CC) $(LDFLAGS) $(tmobj) $(mlibs) -o tmpthread.exe
  104.  
  105. acttimes.exe: $(acto)
  106.     $(CC) $(LDFLAGS) $(acto) $(libs) -o acttimes.exe
  107.  
  108. mtgroups: mtgroups.o mt-misc.o
  109.     $(CC) $(LDFLAGS) mtgroups.o mt-misc.o -lcurses $(libs) -o mtgroups
  110.  
  111.  
  112. # if a .h file depends on another .h file...
  113. $(h):
  114.     touch $@
  115.  
  116. install: $(public) $(private) $(manpages)
  117. # won't work with csh
  118.     export PATH || exit 1
  119.     - mv $(rnbin)/trn.exe $(rnbin)/trn.exe.old
  120.     - if test `pwd` != $(rnbin); then cp $(public) $(rnbin); fi
  121.     - if test `pwd` != $(rnbin); then cd $(rnbin); chmod 755 $(public); strip trn.exe tmpthread ; fi
  122.     - ./makedir `./filexp $(rnlib)`
  123.     - cd `./filexp $(rnlib)`; mv mthreads mthreads.old
  124.     - if test `pwd` != `./filexp $(rnlib)`; then cp INIT $(private) `./filexp $(rnlib)`; fi
  125.     - if test ! -f `./filexp $(rnlib)/newsnews`; then cp newsnews `./filexp $(rnlib)`; fi
  126.     cd `./filexp $(rnlib)`; chmod 755 $(private); chmod 644 INIT newsnews
  127.     - if test `pwd` != `./filexp $(rnlib)`; then strip `./filexp $(rnlib)`/mthreads ; fi
  128.     - if test `pwd` != $(mansrc); then \
  129. for page in $(manpages); do \
  130. cp $$page $(mansrc)/`basename $$page .1`.$(manext); \
  131. done; \
  132. fi
  133.     - if test `pwd` != $(mtmansrc); then \
  134. cp mthreads.8 $(mtmansrc)/mthreads.$(mtmanext); \
  135. fi
  136.  
  137. clean:
  138.     rm -f *.o
  139.  
  140. realclean:
  141.     rm -f trn.exe mthreads tmpthread *.o core $(addedbyconf) 
  142.  
  143.