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

  1. SOURCEDIR=../../sources/nix
  2.  
  3. include $(SOURCEDIR)/filelist
  4.  
  5. OPTIONS=-I $(SOURCEDIR)/../headers $(CFLAGS)
  6.  
  7. vpath %.c $(SOURCEDIR)
  8.  
  9. SOURCEFILES=*/*
  10.  
  11. REDEF=-D_DOSBase=___DOSBase \
  12.       -D_UtilityBase=___UtilityBase \
  13.       -D_MathIeeeSingBasBase=___MathIeeeSingBasBase \
  14.       -D_MathIeeeSingTransBase=___MathIeeeSingTransBase \
  15.       -D_MathIeeeDoubBasBase=___MathIeeeDoubBasBase \
  16.       -D_MathIeeeDoubTransBase=___MathIeeeDoubTransBase \
  17.       -D_LocaleBase=___LocaleBase
  18.  
  19. %.o: %.c
  20.     gcc $(OPTIONS) -S $^ -o $*.S 2>&1|tee $*.err
  21.     gcc -E -traditional $(REDEF) $*.S -o $*2.S
  22.     gcc $(OPTIONS) $*2.S -c -o $*.o
  23.     -rm $*.S $*2.S
  24.     -if test ! -s $*.err; then rm $*.err; fi
  25.  
  26. .PHONY: all clean veryclean
  27.  
  28. all: libnix.a
  29.  
  30. clean:
  31.     -rm -r $(SUBDIRS)
  32.  
  33. veryclean:
  34.     -rm -r *
  35.  
  36. $(SUBDIRS):
  37.     mkdir $@
  38.  
  39. libnix.a: $(SUBDIRS) $(OBJECTS) $(SOURCEDIR)/makefile $(SOURCEDIR)/filelist
  40.     -rm $@
  41.     ar -q /tmp/$@ $(OBJECTS)
  42.     ranlib /tmp/$@
  43.     cp /tmp/$@ .
  44.     rm /tmp/$@
  45.     echo "\$$$(V)" >>$@
  46.