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

  1. SOURCEDIR=../../sources/math
  2.  
  3. include $(SOURCEDIR)/filelist
  4.  
  5. OPTIONS=-I $(SOURCEDIR)/../headers -DFULL_SPECIFIERS $(CFLAGS)
  6.  
  7. vpath %.c $(SOURCEDIR)
  8.  
  9. SOURCEFILES=*/*
  10.  
  11. OBJECTS2=$(OBJECTS) \
  12.          ../nix/stdio/printf.o ../nix/stdio/fprintf.o ../nix/stdio/sprintf.o \
  13.          ../nix/stdio/vprintf.o ../nix/stdio/vsprintf.o stdio/vfprintf.o \
  14.          ../nix/stdio/scanf.o ../nix/stdio/fscanf.o ../nix/stdio/sscanf.o \
  15.          ../nix/stdio/vscanf.o ../nix/stdio/vsscanf.o stdio/vfscanf.o
  16.  
  17. SUBDIRS2=$(SUBDIRS) ../nix/stdio
  18.  
  19. REDEF=-D_DOSBase=___DOSBase \
  20.       -D_UtilityBase=___UtilityBase \
  21.       -D_MathIeeeSingBasBase=___MathIeeeSingBasBase \
  22.       -D_MathIeeeSingTransBase=___MathIeeeSingTransBase \
  23.       -D_MathIeeeDoubBasBase=___MathIeeeDoubBasBase \
  24.       -D_MathIeeeDoubTransBase=___MathIeeeDoubTransBase \
  25.       -D_LocaleBase=___LocaleBase
  26.  
  27. %.o: %.c
  28.     gcc $(OPTIONS) -S $^ -o $*.S 2>&1|tee $*.err
  29.     gcc -E -traditional $(REDEF) $*.S -o $*2.S
  30.     gcc $(OPTIONS) $*2.S -c -o $*.o
  31.     -rm $*.S $*2.S
  32.     -if test ! -s $*.err; then rm $*.err; fi
  33.  
  34. .PHONY: all clean veryclean
  35.  
  36. all: libm.a
  37.  
  38. clean:
  39.     -rm -r $(SUBDIRS)
  40.  
  41. veryclean:
  42.     -rm -r *
  43.  
  44. $(SUBDIRS2):
  45.     mkdir $@
  46.  
  47. libm.a: $(SUBDIRS2) $(OBJECTS2) $(SOURCEDIR)/makefile $(SOURCEDIR)/filelist
  48.     -rm $@
  49.     ar -q /tmp/$@ $(OBJECTS2)
  50.     ranlib /tmp/$@
  51.     cp /tmp/$@ .
  52.     rm /tmp/$@
  53.     echo "\$$$(V)" >>$@
  54.  
  55. stdio/vfprintf.o: ../nix/stdio/vfprintf.c
  56.     gcc $(OPTIONS) $^ -c -o stdio/vfprintf.o
  57.  
  58. stdio/vfscanf.o: ../nix/stdio/vfscanf.c
  59.     gcc $(OPTIONS) $^ -c -o stdio/vfscanf.o
  60.