home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 1 / GoldFishApril1994_CD2.img / d4xx / d473 / cnewssrc / cnews_src.lzh / relay / Makefile < prev    next >
Makefile  |  1991-01-01  |  6KB  |  190 lines

  1. # makefile for C news relaynews
  2. #
  3. #    $Id$
  4. #    $Log$
  5.  
  6. # =()<NEWSARTS = @<NEWSARTS>@>()=
  7. #    AMIGA
  8. #    NEWSARTS = /usr/spool/news
  9. NEWSARTS = NewsArts:
  10. # =()<NEWSBIN = @<NEWSBIN>@>()=
  11. #    AMIGA
  12. #    NEWSBIN = /usr/lib/newsbin
  13. NEWSBIN = NewsBin:
  14. # =()<NEWSCTL = @<NEWSCTL>@>()=
  15. #    AMIGA
  16. #    NEWSCTL = /usr/lib/news
  17. NEWSCTL = NewsCtl:
  18.  
  19. # workaround for System V make bug
  20. SHELL = /bin/sh
  21.  
  22. BIN=/bin
  23. NPROC=2
  24.  
  25. # -DVOID=int for libc.h & old lint libraries
  26. #    AMIGA
  27. #    DEFINES= -I../include -I. -DVOID=int -DFLUSHEVERY=6
  28. INCLUDE= -ICN:include
  29. DEFINES= -DFJE -DAMIGA -DVOID=int -DFLUSHEVERY=6 $(INCLUDE)
  30.  
  31. #    AMIGA
  32. CC = cc
  33. #CC=CC +V
  34. #CC=gcc -ansi -pedantic -Wall -S
  35. #CC=redcc
  36.  
  37. #    AMIGA
  38. #    COPTS= -O # -pg -g
  39. COPTS= -bs
  40. CFLAGS=$(DEFINES) $(COPTS)
  41.  
  42. #    AMIGA
  43. #    DBM = -ldbm
  44. DBM =
  45.  
  46. #    AMIGA
  47. #    LIBS= $(DBM) vfprintf.o heapmem.o -lc
  48. LDFLAGS= -g -w
  49. LIBS= $(DBM) -lc
  50.  
  51. # LINT=lint
  52. # LINTFLAGS=-haz $(DEFINES)
  53. # LLIBS=-llocal -lmalloc
  54. # I wish I could make lint shut the fk up about some things.  Grrr!
  55. # LINTFILT=egrep -v '(possible pointer|long assign|nnfree|getdate|:$$)'
  56. # PROPTS=
  57. # P=stpr
  58. # PP=pp -Tpsc -fR # lazywriter
  59. # PPBACK=dps | stps # lazywriter
  60.  
  61. #    AMIGA
  62. #    What is LIBSRCS for???
  63. #    LIBOBJS=../libcnews.a
  64. LIBSRCS=
  65. LIBOBJS= +l CN:libcnews.lib +l
  66.  
  67. SRC=relaynews.c active.c article.c caches.c mkdirs.c control.c fileart.c \
  68.     hdrdefs.c hdrparse.c hdrmunge.c \
  69.     history.c io.c msgs.c procart.c \
  70.     sys.c transmit.c trbatch.c ihave.c $(LIBSRCS)
  71. OBJ=relaynews.o active.o article.o caches.o mkdirs.o control.o fileart.o \
  72.     hdrdefs.o hdrparse.o hdrmunge.o \
  73.     history.o io.o msgs.o procart.o \
  74.     sys.o transmit.o trbatch.o ihave.o
  75. NONCFILES= TODO* README ads/README ads/[0-9]* \
  76.     sh/inews sh/tear sh/anne.jones sh/defhdrs.awk \
  77.     sh/realrnews sh/serverrnews makefile
  78. CFILES= CN:include/*.h \
  79.     active.h article.h caches.h mkdirs.h control.h fileart.h \
  80.     hdrint.h headers.h history.h system.h transmit.h trbatch.h $(SRC)
  81. FILES=$(NONCFILES) $(CFILES)
  82.  
  83. .c.o:
  84.     $(CC) $(CFLAGS) $*.c
  85.  
  86. all: Makefile relaynews
  87. #    chmod +x sh/[a-z]* aux/[a-z]* ctl/[a-z]*
  88.  
  89. #mkfile: makefile
  90. #    sed '/mkfile/d' makefile | mkconv | sed 's/make/mk/g' >$@
  91.  
  92. relaynews: $(OBJ) /libcnews.lib
  93.     ln $(LDFLAGS) $(OBJ) -o $@ $(LIBOBJS) $(LIBS)
  94. #    cmp $(NEWSCTL)/inews sh/inews
  95. #    $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(PRE) $(LIBS) $(LIBOBJS) $(POST) -o $@
  96.  
  97. #lint: $(SRC)
  98. #    $(LINT) $(LINTFLAGS) $(SRC) $(LLIBS) | $(LINTFILT)
  99. #lint-p: $(SRC)
  100. #    $(LINT) $(LINTFLAGS) -p $(SRC) $(LLIBS) | $(LINTFILT)
  101.  
  102. #newsinstall:
  103. #    : nothing
  104.  
  105. # bininstall: make directories, install programs
  106. #bininstall: install
  107. #install: $(NEWSBIN)/relay/relaynews
  108. #$(NEWSBIN)/relay/relaynews: relaynews
  109. #    -mkdir $(NEWSBIN)/relay $(NEWSBIN)/inject $(NEWSBIN)/ctl
  110. #    rm -f $(NEWSBIN)/relay/relaynews
  111. #    cp relaynews $(NEWSBIN)/relay
  112. #    : needs to be news-owned, setuid -- build looks after that
  113. #    cp sh/[a-z]* $(NEWSBIN)/inject
  114. #    cp ctl/[a-z]* $(NEWSBIN)/ctl
  115. #    cp aux/[a-z]* $(NEWSBIN)/relay
  116. #    rm -f $(BIN)/inews $(NEWSCTL)/inews
  117. #    ln $(NEWSBIN)/inject/inews $(BIN)/inews 2>/dev/null || cp sh/inews $(BIN)
  118. #    ln $(NEWSBIN)/inject/inews $(NEWSCTL)/inews 2>/dev/null || cp sh/inews $(NEWSCTL)
  119.  
  120. #cmp:    relaynews
  121. #    cmp $(NEWSBIN)/relay/relaynews relaynews
  122. #    for f in `ls sh` ; do cmp $(NEWSBIN)/inject/$$f sh/$$f ; done
  123. #    for f in `ls ctl` ; do cmp $(NEWSBIN)/ctl/$$f ctl/$$f ; done
  124. #    for f in `ls aux` ; do cmp $(NEWSBIN)/relay/$$f aux/$$f ; done
  125. #    cmp $(BIN)/inews sh/inews
  126. #    cmp $(NEWSCTL)/inews sh/inews
  127. #    ls -lg $(NEWSBIN)/relay/relaynews | egrep -s '^-rwsrwsr-x  1 news     news'
  128.  
  129. #check:    relaynews
  130. #    cmp $(NEWSBIN)/relay/relaynews relaynews || true
  131. #    for f in `ls sh` ; do cmp $(NEWSBIN)/inject/$$f sh/$$f || true ; done
  132. #    for f in `ls ctl` ; do cmp $(NEWSBIN)/ctl/$$f ctl/$$f || true ; done
  133. #    for f in `ls aux` ; do cmp $(NEWSBIN)/relay/$$f aux/$$f || true ; done
  134. #    cmp $(BIN)/inews sh/inews || true
  135. #    ls -lg $(NEWSBIN)/relay/relaynews | egrep -s '^-rwsrwsr-x  1 news     news'
  136.  
  137. #TODO.grep: TODO
  138. #    -egrep TODO ../include/*.h *.h *.c sh/* | tr -s " \11" " " >$@
  139. #    -egrep TODO ../lib*/*.[ch] | tr -s " \11" " " >>$@
  140.  
  141. print: printc printnonc
  142. #    touch $@
  143. #printc: $(CFILES)
  144. #    $(PP) $? | $(PPBACK)
  145. #    touch $@
  146. #printnonc: $(NONCFILES)
  147. #    pr $(PROPTS) $? | $P
  148. #    touch $@
  149. #clean:
  150. #    rm -f core a.out relaynews *.o    
  151. #    rm -rf regress/tmp
  152.  
  153. #r:    relaynews
  154. #    chmod +x regress/regress
  155. #    (cd regress; ./regress)
  156.  
  157. # header dependencies follow
  158.  
  159. active.o: CN:include/libc.h CN:include/news.h CN:include/config.h
  160. active.o: active.h
  161. article.o: CN:include/news.h article.h headers.h
  162. caches.o: CN:include/news.h active.h caches.h transmit.h
  163. mkdirs.o: CN:include/libc.h CN:include/news.h
  164. control.o: CN:include/libc.h CN:include/news.h CN:include/config.h
  165. control.o: headers.h article.h caches.h history.h
  166. fileart.o: CN:include/libc.h CN:include/news.h CN:include/config.h
  167. fileart.o: active.h mkdirs.h headers.h article.h history.h system.h
  168. hdrdefs.o: CN:include/news.h headers.h hdrint.h
  169. hdrmunge.o: CN:include/libc.h CN:include/news.h fileart.h headers.h
  170. hdrmunge.o: article.h hdrint.h
  171. hdrparse.o: CN:include/libc.h CN:include/news.h headers.h hdrint.h
  172. history.o: CN:include/libc.h CN:include/news.h CN:include/config.h
  173. history.o: CN:include/fgetmfs.h headers.h article.h history.h
  174. hostname.o: CN:include/news.h CN:include/config.h
  175. ihave.o: CN:include/libc.h CN:include/news.h CN:include/config.h
  176. ihave.o: headers.h article.h caches.h history.h
  177. io.o: CN:include/news.h headers.h article.h
  178. msgs.o: CN:include/news.h headers.h article.h
  179. procart.o: CN:include/libc.h CN:include/news.h active.h control.h
  180. procart.o: headers.h article.h history.h system.h
  181. relaynews.o: CN:include/libc.h CN:include/news.h CN:include/config.h
  182. relaynews.o: CN:include/fgetmfs.h active.h caches.h headers.h
  183. relaynews.o: history.h
  184. string.o: CN:include/libc.h CN:include/news.h
  185. sys.o: CN:include/libc.h CN:include/fgetmfs.h CN:include/news.h
  186. sys.o: CN:include/config.h system.h
  187. transmit.o: CN:include/libc.h CN:include/news.h CN:include/config.h
  188. transmit.o: headers.h active.h article.h system.h trbatch.h transmit.h
  189. trbatch.o: CN:include/libc.h CN:include/news.h trbatch.h
  190.