Makefile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #
  2. # Makefile for LPC-10 speech coder library (unix)
  3. #
  4. # default C compiler
  5. CC?= gcc
  6. #
  7. # These definitions for CFLAGS and LIB_TARGET_DIR are used when one
  8. # runs make in the lpc10 directory, without environment variables that
  9. # override them. When make is run in this directory from a makefile
  10. # for an application that uses the LPC10 coder, there are environment
  11. # variables set for CFLAGS and LIB_TARGET_DIR that override these
  12. # definitions.
  13. #
  14. LIB_TARGET_DIR = .
  15. #
  16. # -I$(LIB_TARGET_DIR) option needed so that #include "machine.h"
  17. # directives can find the machine.h file.
  18. #
  19. CFLAGS+= -fPIC -Wno-comment
  20. # The code here generates lots of warnings, so compiling with -Werror
  21. # fails miserably. Remove it for the time being.
  22. _ASTCFLAGS:=$(_ASTCFLAGS:-Werror=)
  23. #fix for PPC processors and ALPHA, And UltraSparc too
  24. ifneq ($(OSARCH),Darwin)
  25. ifneq ($(findstring BSD,${OSARCH}),BSD)
  26. ifneq ($(PROC),ppc)
  27. ifneq ($(PROC),x86_64)
  28. ifneq ($(PROC),alpha)
  29. #The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
  30. #This works for even old (2.96) versions of gcc and provides a small boost either way.
  31. #A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it.
  32. #So we go lowest common available by gcc and go a step down, still a step up from
  33. #the default as we now have a better instruction set to work with. - Belgarath
  34. ifeq ($(PROC),ultrasparc)
  35. CFLAGS+= -mtune=$(PROC) -mcpu=v8 -O3 -fomit-frame-pointer
  36. else
  37. ifneq ($(OSARCH),SunOS)
  38. ifneq ($(OSARCH),arm)
  39. # CFLAGS+= -march=$(PROC)
  40. endif
  41. endif
  42. endif
  43. endif
  44. endif
  45. endif
  46. endif
  47. endif
  48. LIB = $(LIB_TARGET_DIR)/liblpc10.a
  49. .PHONY: all clean
  50. include $(ASTTOPDIR)/Makefile.rules
  51. all: $(LIB)
  52. OBJ=f2clib.o analys.o bsynz.o chanwr.o dcbias.o decode.o \
  53. deemp.o difmag.o dyptrk.o encode.o energy.o ham84.o \
  54. hp100.o invert.o irc2pc.o ivfilt.o lpcdec.o lpcenc.o \
  55. lpcini.o lpfilt.o median.o mload.o onset.o pitsyn.o \
  56. placea.o placev.o preemp.o prepro.o random.o rcchk.o \
  57. synths.o tbdm.o voicin.o vparms.o
  58. $(LIB): $(OBJ)
  59. $(ECHO_PREFIX) echo " [AR] $^ -> $@"
  60. $(CMD_PREFIX) $(AR) cr $@ $^
  61. $(CMD_PREFIX) $(RANLIB) $@
  62. clean:
  63. rm -f *.o $(LIB) .*.d
  64. rm -f *.s *.i