You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.1 KiB

  1. # $Id$
  2. #
  3. # epd -- extended precision
  4. #---------------------------------------------------------------------------
  5. .SUFFIXES: .c .o .u
  6. CC = gcc
  7. RANLIB = ranlib
  8. MFLAG =
  9. ICFLAGS = -g -O6 -Wall
  10. CFLAGS = $(ICFLAGS) $(MFLAG) $(XCFLAGS)
  11. LINTFLAGS = -u -n
  12. # this is to create the lint library
  13. LINTSWITCH = -o
  14. P = epd
  15. PSRC = epd.c
  16. PHDR = epd.h
  17. POBJ = $(PSRC:.c=.o)
  18. PUBJ = $(PSRC:.c=.u)
  19. WHERE = ..
  20. INCLUDE = $(WHERE)/include
  21. #---------------------------
  22. lib$(P).a: $(POBJ)
  23. ar rv $@ $?
  24. $(RANLIB) $@
  25. .c.o: $(PSRC) $(PHDR)
  26. $(CC) -c $< -I$(INCLUDE) $(CFLAGS)
  27. optimize_dec: lib$(P).b
  28. lib$(P).b: $(PUBJ)
  29. ar rv $@ $?
  30. $(RANLIB) $@
  31. .c.u: $(PSRC) $(PHDR)
  32. cc -j $< -I$(INCLUDE) $(XCFLAGS)
  33. # if the header files change, recompile
  34. $(POBJ): $(PHDR)
  35. $(PUBJ): $(PHDR)
  36. lint: llib-l$(P).ln
  37. llib-l$(P).ln: $(PSRC) $(PHDR)
  38. lint $(LINTFLAGS) $(LINTSWITCH)$(P) -I$(INCLUDE) $(PSRC)
  39. tags: $(PSRC) $(PHDR)
  40. ctags $(PSRC) $(PHDR)
  41. all: lib$(P).a lib$(P).b llib-l$(P).ln tags
  42. clean:
  43. rm -f *.o *.u .pure *.warnings
  44. distclean: clean
  45. rm -f lib*.a lib$(P).b llib-l$(P).ln tags *~ *.bak *.qv *.qx