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_main / makefile < prev   
Encoding:
Makefile  |  1995-03-23  |  1003 b   |  46 lines

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