home *** CD-ROM | disk | FTP | other *** search
/ ftp.ncftp.com / ftp.ncftp.com.zip / ftp.ncftp.com / libncftp / older_versions / libncftp-3.1.5-src.tar.gz / libncftp-3.1.5-src.tar / libncftp-3.1.5 / Strn / Makefile.in < prev    next >
Makefile  |  2002-10-12  |  4KB  |  151 lines

  1. #
  2. # Strn makefile
  3. #
  4. VER=@STRN_VERSION@
  5. prefix=@prefix@
  6. MAN=@mandir@
  7. SHELL=/bin/sh
  8. .SUFFIXES: .c .o .so
  9. LIB=libStrn.a
  10. LIBSO=libStrn.so.1
  11. LIBSOS=libStrn.so
  12. CC=@CC@
  13. CPPFLAGS=@CPPFLAGS@
  14. #CFLAGS=-O2
  15. CFLAGS=@CFLAGS@
  16. DEFS=@DEFS@@NDEFS@
  17.  
  18. CFILES=\
  19.     DStrCat.c      DStrFree.c  Dynscpy.c    Strncpy.c   strtokc.c \
  20.     DStrCatList.c  DStrInit.c  Dynsrecpy.c    Strnpcat.c  \
  21.     DStrCpy.c      DStrNew.c   StrFree.c    Strnpcpy.c \
  22.     DStrCpyList.c  Dynscat.c   Strncat.c    Strntok.c
  23.  
  24. HFILES=\
  25.     DStrInternal.h    Strn.h       syshdrs.h
  26.  
  27. OBJS=\
  28.     DStrCat.o      DStrFree.o  Dynscpy.o    Strncpy.o   strtokc.o \
  29.     DStrCatList.o  DStrInit.o  Dynsrecpy.o    Strnpcat.o  \
  30.     DStrCpy.o      DStrNew.o   StrFree.o    Strnpcpy.o \
  31.     DStrCpyList.o  Dynscat.o   Strncat.o    Strntok.o
  32.  
  33. SOBJS=\
  34.     DStrCat.so      DStrFree.so  Dynscpy.so    Strncpy.so   strtokc.so \
  35.     DStrCatList.so  DStrInit.so  Dynsrecpy.so  Strnpcat.so \
  36.     DStrCpy.so      DStrNew.so   StrFree.so    Strnpcpy.so \
  37.     DStrCpyList.so  Dynscat.so   Strncat.so    Strntok.so
  38.  
  39. all: static
  40.     -@echo "Done making Strn."
  41.  
  42. static: $(LIB)
  43.  
  44. $(LIB): $(OBJS)
  45.     @CCDV@ar r $(LIB) $(OBJS)
  46.     -@chmod 644 "$(LIB)"
  47.     -@RANLIB@ "$(LIB)"
  48.     -@echo "$(VER)" > Strn.version
  49.     -@/bin/ls -l "$(LIB)"
  50.  
  51. .c.o:
  52.     @CCDV@$(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) $< -c
  53.  
  54. .c.so:
  55.     @CCDV@$(CC) -fpic $(CFLAGS) $(CPPFLAGS) $(DEFS) $*.c -c -o $*.so
  56.  
  57. dynamic: $(LIBSO)
  58.  
  59. shared: $(LIBSO)
  60.  
  61. so: $(LIBSO)
  62.  
  63. $(LIBSO): $(SOBJS)
  64.     /bin/rm -f "$(LIBSO)" "$(LIBSOS)"
  65.     gcc -shared "-Wl,-soname,$(LIBSO)" -o "$(LIBSO)" $(SOBJS)
  66.     /bin/ln -s "$(LIBSO)" "$(LIBSOS)"
  67.     -@/bin/ls -l "$(LIBSOS)" "$(LIBSO)"
  68.  
  69. soinstall: $(LIBSO)
  70.     cp "$(LIBSO)" "$(prefix)/lib/$(LIBSO)"
  71.     ( cd "$(prefix)/lib" ; /bin/ln -s "$(LIBSO)" "$(LIBSOS)" )
  72.     cp Strn.h "$(prefix)/include/Strn.h"
  73.     -chmod a+r "$(prefix)/lib/$(LIBSO)" "$(prefix)/include/Strn.h"
  74.  
  75. tester: $(LIB) tester.c
  76.     $(CC) $(CFLAGS) tester.c -o tester -I. -L. -lStrn
  77.  
  78. clean:
  79.     /bin/rm -f "$(LIB)" "$(LIBSO)" *.@OBJEXT@ *.so tester core *.pch
  80.  
  81. distclean: clean
  82.     -/bin/rm -f config.h Makefile config.status config.cache config.log Strn.version
  83.  
  84. install_min:
  85.     if test ! -d $(prefix)/include ; then mkdir -p "$(prefix)/include" ; fi
  86.     if test ! -d $(prefix)/lib ; then mkdir -p "$(prefix)/lib" ; fi
  87.     cp "$(LIB)" "$(prefix)/lib"
  88.     cp Strn.h "$(prefix)/include/Strn.h"
  89.     -chmod 664 "$(prefix)/include/Strn.h" "$(prefix)/lib/$(LIB)"
  90.  
  91. install:
  92.     if test ! -d $(prefix)/include ; then mkdir -p "$(prefix)/include" ; fi
  93.     if test ! -d $(prefix)/lib ; then mkdir -p "$(prefix)/lib" ; fi
  94.     cp "$(LIB)" Strn.version "$(prefix)/lib"
  95.     cp Strn.h "$(prefix)/include/Strn.h"
  96.     -chmod 664 "$(prefix)/include/Strn.h" "$(prefix)/lib/Strn.version" "$(prefix)/lib/$(LIB)"
  97.     -cp Strn.3 "$(MAN)/man3/Strn.3"
  98.     -chmod 664 "$(MAN)/man3/Strn.3"
  99.     -ln "$(MAN)/man3/Strn.3" "$(MAN)/man3/Strncpy.3"
  100.     -ln "$(MAN)/man3/Strn.3" "$(MAN)/man3/Strncat.3"
  101.  
  102. uninstall:
  103.     /bin/rm -f "$(prefix)/lib/$(LIB)" "$(prefix)/include/Strn.h" "$(prefix)/lib/Strn.version"
  104.  
  105. PACKAGE=configure Makefile.in configure.in config.h.in Strn.dsp Strn.dsw Strn.version tester.c $(CFILES) $(HFILES)
  106.  
  107. TMPDIR=/tmp
  108. TARDIR=Strn
  109. TARFILE=$(TARDIR).tar
  110. TGZFILE=$(TARDIR).tgz
  111.  
  112. tarcp:
  113.     -@mkdir -p $(TMPDIR)/TAR/$(TARDIR)
  114.     -@chmod ga+r $(PACKAGE)
  115.     -@chmod 755 $(TMPDIR)/TAR/$(TARDIR)
  116.     cp -pr $(PACKAGE) $(TMPDIR)/TAR/$(TARDIR)
  117.  
  118. tar: $(PACKAGE)
  119.     -@mkdir $(TMPDIR)/TAR
  120.     -@mkdir $(TMPDIR)/TAR/$(TARDIR)
  121.     -@chmod ga+r $(PACKAGE)
  122.     -@chmod 755 $(TMPDIR)/TAR/$(TARDIR)
  123.     cp -pr $(PACKAGE) $(TMPDIR)/TAR/$(TARDIR)
  124.     ( cd $(TMPDIR)/TAR ; tar cf $(TARFILE) ./$(TARDIR) )
  125.     cp $(TMPDIR)/TAR/$(TARFILE) .
  126.     -@chmod 644 $(TARFILE)
  127.     -@rm -rf $(TMPDIR)/TAR
  128.     -@ls -l $(TARFILE)
  129.  
  130. gz: tar
  131.     gzip -c $(TARFILE) > $(TGZFILE)
  132.     -@rm $(TARFILE)
  133.     -@chmod 644 $(TGZFILE)
  134.     -@ls -l $(TGZFILE)
  135.  
  136. DStrCat.o: DStrCat.c Strn.h DStrInternal.h syshdrs.h
  137. DStrCatList.o: DStrCatList.c Strn.h DStrInternal.h syshdrs.h
  138. DStrCpy.o: DStrCpy.c Strn.h DStrInternal.h syshdrs.h
  139. DStrCpyList.o: DStrCpyList.c Strn.h DStrInternal.h syshdrs.h
  140. DStrFree.o: DStrFree.c Strn.h DStrInternal.h syshdrs.h
  141. DStrInit.o: DStrInit.c Strn.h DStrInternal.h syshdrs.h
  142. DStrNew.o: DStrNew.c Strn.h DStrInternal.h syshdrs.h
  143. Dynscpy.o: Dynscpy.c Strn.h syshdrs.h
  144. Dynscat.o: Dynscat.c Strn.h syshdrs.h
  145. Strncat.o: Strncat.c Strn.h syshdrs.h
  146. Strncpy.o: Strncpy.c Strn.h syshdrs.h
  147. Strnpcat.o: Strnpcat.c Strn.h syshdrs.h
  148. Strnpcpy.o: Strnpcpy.c Strn.h syshdrs.h
  149. Strntok.o: Strntok.c Strn.h syshdrs.h
  150. strtokc.o: strtokc.c Strn.h syshdrs.h
  151.