Makefile 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ###########################################################################
  2. ## ##
  3. ## Language Technologies Institute ##
  4. ## Carnegie Mellon University ##
  5. ## Copyright (c) 1999 ##
  6. ## All Rights Reserved. ##
  7. ## ##
  8. ## Permission is hereby granted, free of charge, to use and distribute ##
  9. ## this software and its documentation without restriction, including ##
  10. ## without limitation the rights to use, copy, modify, merge, publish, ##
  11. ## distribute, sublicense, and/or sell copies of this work, and to ##
  12. ## permit persons to whom this work is furnished to do so, subject to ##
  13. ## the following conditions: ##
  14. ## 1. The code must retain the above copyright notice, this list of ##
  15. ## conditions and the following disclaimer. ##
  16. ## 2. Any modifications must be clearly marked as such. ##
  17. ## 3. Original authors' names are not deleted. ##
  18. ## 4. The authors' names are not used to endorse or promote products ##
  19. ## derived from this software without specific prior written ##
  20. ## permission. ##
  21. ## ##
  22. ## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ##
  23. ## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
  24. ## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
  25. ## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ##
  26. ## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
  27. ## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
  28. ## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
  29. ## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
  30. ## THIS SOFTWARE. ##
  31. ## ##
  32. ###########################################################################
  33. ## ##
  34. ## Testsuite ##
  35. ## ##
  36. ###########################################################################
  37. TOP=..
  38. DIRNAME=testsuite
  39. BUILD_DIRS =
  40. ALL_DIRS=
  41. DATAFILES=data.one
  42. SRCS = token_test_main.c hrg_test_main.c \
  43. regex_test_main.c nums_test_main.c \
  44. play_wave_main.c record_wave_main.c \
  45. play_sync_main.c play_server_main.c play_client_main.c \
  46. lex_test_main.c utt_test_main.c lex_lookup_main.c \
  47. lpc_test_main.c asciiS2U_main.c asciiU2S_main.c \
  48. lpc_test2_main.c combine_waves_main.c \
  49. bin2ascii_main.c record_in_noise_main.c \
  50. compare_wave_main.c rfc_main.c lpc_resynth_main.c \
  51. by_word_main.c multi_thread_main.c
  52. OTHERS = kal_test_main.c
  53. FILES = Makefile $(SRCS) $(DATAFILES) $(OTHERS)
  54. LOCAL_INCLUDES = -I$(TOP)/lang/usenglish
  55. MAIN_EXECS = $(SRCS:_main.c=$(EXEEXT))
  56. lex_test_LIBS = -lflite_cmulex
  57. nums_test_LIBS = -lflite_usenglish
  58. utt_test_LIBS = -lflite_cmulex
  59. lex_lookup_LIBS = -lflite_cmulex
  60. ldom_time_LIBS = -L/home/awb/data/ldom/time_flite/flite/lib -lcmu_time_awb -lflite_usenglish -lflite_cmulex
  61. by_word_LIBS = -lflite_cmu_us_kal -lflite_usenglish -lflite_cmulex
  62. #kal_test_LIBS = -lflite_cmu_us_kal -lflite_usenglish -lflite_cmulex \
  63. # /home/awb/src/malloc/gmalloc.o
  64. ALL = $(MAIN_EXECS)
  65. LOCAL_CLEAN = $(MAIN_EXECS)
  66. include $(TOP)/config/common_make_rules
  67. MAIN_O = $(SRCS:%=%_main.o)
  68. $(MAIN_O) : %_main.o : %_main.c
  69. $(CC) $(CFLAGS) -o $@ $<
  70. $(ALL) : %$(EXEEXT) : %_main.o $(FLITELIBS)
  71. $(CC) $(CFLAGS) -o $@ $@_main.o $($(@:=_LIBS)) $(FLITELIBFLAGS) $(LDFLAGS)
  72. multi_thread_test: multi_thread_main.c
  73. gcc -fopenmp -o multi_thread_test multi_thread_main.c \
  74. $(CFLAGS) -I$(TOP)/include $(FLITELIBFLAGS) $(LDFLAGS) \
  75. -l flite_cmu_us_slt -lflite_cmulex -lflite_usenglish \
  76. -lflite -lm -lasound -lgomp
  77. do_thread_test: multi_thread_test
  78. # This shouldn't segfault
  79. export OMP_NUM_THREADS=100 && ./multi_thread_test