Makefile
Upload User: ykyjsl
Upload Date: 2022-01-30
Package Size: 145k
Code Size: 2k
Development Platform:

C/C++

  1. #
  2. # File: Makefile
  3. #
  4. # Authors:  John Carpinelli   (johnfc@ecr.mu.oz.au)
  5. #   Wayne Salamonsen  (wbs@mundil.cs.mu.oz.au)
  6. # Lang Stuiver      (langs@cs.mu.oz.au)
  7. # Andrew Turpin     (aht@cs.mu.oz.au)
  8. #
  9. # Purpose: This is the makefile for the revised arithmetic coding 
  10. # implementation
  11. #
  12. # Based on: A. Moffat, R. Neal, I.H. Witten, "Arithmetic Coding Revisted",
  13. # ACM Transactions on Information Systems, 16(3):256-294, 1998
  14. #
  15. #        A. Moffat, "An improved data structure for cummulative 
  16. #        probability tables", Software-Practice and Experience,
  17. # 29(7):647-659, 1999.
  18. #
  19. # Any comments or suggestions to: alistair@cs.mu.oz.au
  20. #
  21. CC = gcc
  22. # Change the fixed B_BITS and F_BITS parameters here if required.
  23. FIXED_SHIFT = -DB_BITS=32 -DF_BITS=27
  24. VARY_SHIFT  =   -DVARY_NBITS
  25. FIXED_MULT  = -DB_BITS=32 -DF_BITS=27 -DMULT_DIV 
  26. VARY_MULT   =        -DMULT_DIV -DVARY_NBITS
  27. # Uncomment one of the setup flag assignments below to choose the type
  28. # of coder.
  29. # SETUP_FLAGS = $(FIXED_SHIFT)
  30. # SETUP_FLAGS = $(VARY_SHIFT)
  31. SETUP_FLAGS = $(FIXED_MULT)
  32. # SETUP_FLAGS = $(VARY_MULT)
  33. # comment this line out if your system doesn't have the "times" system call
  34. SYSTYPE = -DSYSV
  35. # Setup compile flags
  36. CFLAGS = -Wall -O3 -ansi -pedantic $(SYSTYPE) $(SETUP_FLAGS)
  37. LINKFLAGS = 
  38. CODER = arith
  39. BITIO = bitio
  40. ARITHOBJ = main.o bits.o char.o word.o hashtable.o uint.o stats.o 
  41. $(CODER).o $(BITIO).o
  42. all  : arith_coder word char bits uint
  43. arith_coder : $(ARITHOBJ)
  44. $(CC) $(LINKFLAGS) -o arith_coder $(ARITHOBJ)
  45. word  : arith_coder ; test '[ ! -L word ]'
  46. ln -s arith_coder word
  47. char  : arith_coder ; test '[ ! -L char ]'
  48. ln -s arith_coder char
  49. bits  : arith_coder ; test '[ ! -L bits ]'
  50. ln -s arith_coder bits
  51. uint  : arith_coder ; test '[ ! -L uint ]'
  52. ln -s arith_coder uint
  53. clean :
  54. /bin/rm -f $(ARITHOBJ)
  55. clobber :
  56. /bin/rm -f $(ARITHOBJ)
  57. /bin/rm -f word char bits uint arith_coder
  58. package:
  59. tar cf - Makefile README WHATSNEW *.c *.h *.i *.1 | gzip -9 > ../arith_coder-3.tar.gz
  60. # dependencies for header files
  61. main.o : $(BITIO).h $(CODER).h stats.h main.h Makefile
  62. char.o  : $(BITIO).h $(CODER).h stats.h main.h Makefile
  63. bits.o : $(BITIO).h $(CODER).h stats.h main.h Makefile
  64. uint.o : $(BITIO).h $(CODER).h stats.h main.h Makefile
  65. word.o  :  $(BITIO).h $(CODER).h stats.h main.h Makefile hashtable.h
  66. hashtable.o :  stats.h $(CODER).h main.h hashtable.h  Makefile
  67. stats.o  : stats.h $(CODER).h Makefile
  68. $(BITIO).o : $(BITIO).h Makefile
  69. $(CODER).o  : $(CODER).h $(BITIO).h Makefile