home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / libnix-0.8-src.lha / libnix-0.8 / sources / stubs / makefile < prev   
Encoding:
Makefile  |  1995-03-23  |  653 b   |  39 lines

  1. SOURCEDIR=../../sources/stubs
  2.  
  3. include $(SOURCEDIR)/filelist
  4.  
  5. OPTIONS=-I $(SOURCEDIR)/../headers $(CFLAGS)
  6.  
  7. vpath %.c $(SOURCEDIR)
  8.  
  9. SOURCEFILES=libbases/* misc/* libnames/* stubs/*
  10.  
  11. OBJECTS2=$(OBJECTS) ../nix/misc/__request.o
  12.  
  13. SUBDIRS2=$(SUBDIRS) ../nix/misc
  14.  
  15. %.o: %.c
  16.     gcc $(OPTIONS) -c $^ -o $@ 2>&1|tee $*.err
  17.     -if test ! -s $*.err; then rm $*.err; fi
  18.  
  19. .PHONY: all clean veryclean
  20.  
  21. all: libstubs.a
  22.  
  23. clean:
  24.     -rm -r $(SUBDIRS)
  25.  
  26. veryclean:
  27.     -rm -r *
  28.  
  29. $(SUBDIRS2):
  30.     mkdir $@
  31.  
  32. libstubs.a: $(SUBDIRS2) $(OBJECTS2) $(SOURCEDIR)/makefile $(SOURCEDIR)/filelist
  33.     -rm $@
  34.     ar -q /tmp/$@ $(OBJECTS2)
  35.     ranlib /tmp/$@
  36.     cp /tmp/$@ .
  37.     rm /tmp/$@
  38.     echo "\$$$(V)" >>$@
  39.