home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / src / amiga / libnix-0.7-src.lha / libnix-0.7 / sources / nix / makefile < prev   
Encoding:
Makefile  |  1995-01-18  |  943 b   |  45 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 -P $(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.