home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnurx.zip / rx / Makefile.in < prev    next >
Makefile  |  1995-12-31  |  6KB  |  164 lines

  1. # Makefile for librx
  2. # Copyright (C) 1994 Free Software Foundation, Inc.
  3. # This file is part of GNU Rx
  4. # GNU Rx is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8. # GNU Rx is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with GNU Rx; see the file COPYING.LIB.  If not, write to
  14. # the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  15.  
  16.  
  17. SHELL = /bin/sh
  18.  
  19. srcdir = @srcdir@
  20. VPATH = @srcdir@
  21. prefix = @prefix@
  22. exec_prefix = $(prefix)
  23. bindir = $(exec_prefix)/bin
  24. libdir = $(exec_prefix)/lib
  25. includedir = $(prefix)/include
  26. infodir = $(prefix)/info
  27.  
  28. #### Start of system configuration section. ####
  29.  
  30. CC = @CC@
  31. INSTALL = @INSTALL@
  32. DEFS = @DEFS@
  33. CFLAGS = -g @opt_cflags@ -I. -I$(srcdir)
  34. AR = ar
  35. AR_FLAGS = rc
  36. RANLIB = @RANLIB@
  37. opt_objs=@opt_objs@
  38.  
  39. source= hashrexp.c runtests.c rx.c rxanal.c rxbasic.c rxbitset.c rxcset.c rxdbug.c rxgnucomp.c rxhash.c rxnfa.c rxnode.c rxposix.c rxsimp.c rxspencer.c rxstr.c rxsuper.c rxunfa.c
  40.  
  41. headers=_rx.h rx.h rxanal.h rxbasic.h rxbitset.h rxcontext.h rxcset.h rxgnucomp.h rxhash.h rxnfa.h rxnode.h inst-rxposix.h  rxposix.h rxproto.h rxsimp.h rxspencer.h rxstr.h rxsuper.h rxunfa.h testcases.h rxall.h
  42.  
  43. ancillery=configure.in Makefile.in configure ../doc/rx.texi ../doc/rx.info \
  44.       COPYING.LIB ChangeLog PLUGIN TESTS TESTS2C.sed
  45. distfiles=$(source) $(headers) $(ancillery)
  46. libobjs= hashrexp.o rx.o rxanal.o rxbasic.o rxbitset.o rxcset.o rxdbug.o rxgnucomp.o rxhash.o rxnfa.o rxnode.o rxposix.o rxsimp.o rxspencer.o rxstr.o rxsuper.o rxunfa.o
  47.  
  48.  
  49. .SUFFIXES:
  50. .SUFFIXES: .o .c .h .ps .dvi .info .texinfo .scm .cd .x
  51.  
  52. .c.x:
  53.     $(CC) $(CFLAGS) -DGSCM_MAGIC_SNARFER -E $< | grep "^%%%" | sed -e "s/^%%%//" > $@ ; \
  54.  
  55. .c.o:
  56.     $(CC) -c $(CFLAGS) $(DEFS) -I$(srcdir) $<
  57.  
  58. all: librx.a
  59.  
  60. install: all
  61.     test -d $(libdir) || mkdir $(libdir)
  62.     test -d $(includedir) || mkdir $(includedir)
  63.     $(INSTALL) librx.a $(libdir)/librx.a
  64.     $(RANLIB) $(libdir)/librx.a
  65.     $(INSTALL) $(srcdir)/inst-rxposix.h $(includedir)/rxposix.h
  66.  
  67.  
  68. uninstall:
  69.     rm $(libdir)/librx.a
  70.     rm $(includedir)/rx.h
  71.  
  72. clean:
  73.     -rm -f $(libobjs) librx.a
  74.  
  75. distclean: clean
  76.     -rm Makefile config.status
  77.  
  78. mostlyclean: clean
  79.  
  80. realclean: distclean
  81.  
  82. TAGS:
  83.     etags $(source)
  84.  
  85. info:
  86.  
  87. install-info:
  88.  
  89. clean-info:
  90.  
  91. dvi:
  92.  
  93. check:
  94.  
  95. SUBDIR=.
  96. manifest:
  97.     for file in $(distfiles); do echo $(SUBDIR)/$$file; done
  98.  
  99. dist:    $(distfiles)
  100.     echo rx-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q rx.c` > .fname
  101.     rm -rf `cat .fname`
  102.     mkdir `cat .fname`
  103.     ln $(distfiles) `cat .fname`
  104.     tar chzf `cat .fname`.tar.gz `cat .fname`
  105.     rm -rf `cat .fname` .fname
  106.  
  107.  
  108. librx.a: $(libobjs)
  109.     rm -f librx.a
  110.     $(AR) $(AR_FLAGS) librx.a $(libobjs)
  111.     $(RANLIB) librx.a
  112.  
  113.  
  114. depends:
  115.     gcc -MM $(source)
  116.  
  117. $(srcdir)/testcases.h: TESTS TESTS2C.sed
  118.     sed -f $(srcdir)/TESTS2C.sed $(srcdir)/TESTS > $(srcdir)/testcases.h
  119.  
  120. runtests: runtests.o librx.a rxdbug.o
  121.     $(CC) -g -o runtests runtests.o rxdbug.o librx.a 
  122.  
  123. ###
  124. hashrexp.o : hashrexp.c rxall.h /usr/include/malloc.h rxnode.h rxbitset.h rxcset.h \
  125.   rxhash.h 
  126. runtests.o : runtests.c rxall.h /usr/include/malloc.h rxposix.h rxspencer.h \
  127.   rxproto.h rxnode.h rxbitset.h rxcset.h rxunfa.h _rx.h rxhash.h rxanal.h rxsuper.h \
  128.   rxnfa.h rxcontext.h testcases.h 
  129. rx.o : rx.c rxall.h /usr/include/malloc.h rxhash.h rxbitset.h rxnfa.h _rx.h \
  130.   rxcset.h rxnode.h 
  131. rxanal.o : rxanal.c rxall.h /usr/include/malloc.h rxanal.h rxcset.h rxbitset.h \
  132.   rxnode.h rxsuper.h rxnfa.h _rx.h rxhash.h 
  133. rxbasic.o : rxbasic.c rxall.h /usr/include/malloc.h rxbasic.h rxcontext.h rxnode.h \
  134.   rxbitset.h rxcset.h rxspencer.h rxproto.h rxunfa.h _rx.h rxhash.h rxanal.h rxsuper.h \
  135.   rxnfa.h rxstr.h 
  136. rxbitset.o : rxbitset.c rxall.h /usr/include/malloc.h rxbitset.h 
  137. rxcset.o : rxcset.c rxall.h /usr/include/malloc.h rxcset.h rxbitset.h 
  138. rxdbug.o : rxdbug.c rxall.h /usr/include/malloc.h rxgnucomp.h rxcset.h rxbitset.h \
  139.   rxnode.h rxnfa.h _rx.h rxhash.h 
  140. rxgnucomp.o : rxgnucomp.c rxall.h /usr/include/malloc.h rxgnucomp.h rxcset.h \
  141.   rxbitset.h rxnode.h 
  142. rxhash.o : rxhash.c rxall.h /usr/include/malloc.h rxhash.h rxbitset.h 
  143. rxnfa.o : rxnfa.c rxall.h /usr/include/malloc.h rxnfa.h _rx.h rxhash.h rxbitset.h \
  144.   rxcset.h rxnode.h 
  145. rxnode.o : rxnode.c rxall.h /usr/include/malloc.h rxnode.h rxbitset.h rxcset.h 
  146. rxposix.o : rxposix.c rxall.h /usr/include/malloc.h rxposix.h rxspencer.h rxproto.h \
  147.   rxnode.h rxbitset.h rxcset.h rxunfa.h _rx.h rxhash.h rxanal.h rxsuper.h rxnfa.h \
  148.   rxcontext.h rxgnucomp.h rxbasic.h rxsimp.h 
  149. rxsimp.o : rxsimp.c rxall.h /usr/include/malloc.h rxsimp.h rxcset.h rxbitset.h \
  150.   rxnode.h 
  151. rxspencer.o : rxspencer.c rxall.h /usr/include/malloc.h rxspencer.h rxproto.h \
  152.   rxnode.h rxbitset.h rxcset.h rxunfa.h _rx.h rxhash.h rxanal.h rxsuper.h rxnfa.h 
  153. rxstr.o : rxstr.c rxall.h /usr/include/malloc.h rxstr.h rxspencer.h rxproto.h \
  154.   rxnode.h rxbitset.h rxcset.h rxunfa.h _rx.h rxhash.h rxanal.h rxsuper.h rxnfa.h \
  155.   rxcontext.h 
  156. rxsuper.o : rxsuper.c rxall.h /usr/include/malloc.h rxsuper.h rxnfa.h _rx.h \
  157.   rxhash.h rxbitset.h rxcset.h rxnode.h 
  158. rxunfa.o : rxunfa.c rxall.h /usr/include/malloc.h rx.h rxhash.h rxbitset.h rxunfa.h \
  159.   _rx.h rxcset.h rxnfa.h rxnode.h 
  160.