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

  1. SOURCEDIR=../../sources/misc
  2.  
  3. OBJECTS=detach.o swapstack.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.     echo "\$$$(V)" >>$*.o
  25.  
  26. .PHONY: all filelist subdirs clean veryclean
  27.  
  28. all: $(OBJECTS)
  29.  
  30. filelist:
  31.  
  32. subdirs:
  33.  
  34. clean:
  35.     -rm *.o *.err
  36.  
  37. veryclean: clean
  38.