Home | History | Annotate | Download | only in src
      1 # Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 AUTOMAKE_OPTIONS = subdir-objects
      6 ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
      7 
      8 if HAVE_SSE42
      9 CRAS_SSE4_2 = libcrasmix_sse42.la
     10 else
     11 CRAS_SSE4_2 =
     12 endif
     13 
     14 if HAVE_AVX
     15 CRAS_AVX = libcrasmix_avx.la
     16 else
     17 CRAS_AVX =
     18 endif
     19 
     20 if HAVE_AVX2
     21 CRAS_AVX2 = libcrasmix_avx2.la
     22 else
     23 CRAS_AVX2 =
     24 endif
     25 
     26 if HAVE_FMA
     27 CRAS_FMA = libcrasmix_fma.la
     28 else
     29 CRAS_FMA =
     30 endif
     31 
     32 if HAVE_WEBRTC_APM
     33 CRAS_WEBRTC_APM_SOURCES = \
     34 	server/cras_apm_list.c \
     35 	server/config/aec_config.c \
     36 	server/config/apm_config.c
     37 else
     38 CRAS_WEBRTC_APM_SOURCES =
     39 endif
     40 
     41 CRAS_UT_TMPDIR_CFLAGS=-DCRAS_UT_TMPDIR=\"/tmp\"
     42 COMMON_CPPFLAGS = -O2 -Wall -Werror -Wno-error=cpp
     43 COMMON_SIMD_CPPFLAGS = -O3 -Wall -Werror -Wno-error=cpp
     44 
     45 bin_PROGRAMS = cras cras_test_client cras_monitor cras_router
     46 
     47 if HAVE_DBUS
     48 CRAS_DBUS_SOURCES = \
     49 	common/cras_sbc_codec.c \
     50 	server/cras_bt_manager.c \
     51 	server/cras_bt_adapter.c \
     52 	server/cras_bt_device.c \
     53 	server/cras_bt_transport.c \
     54 	server/cras_bt_endpoint.c \
     55 	server/cras_bt_player.c \
     56 	server/cras_bt_io.c \
     57 	server/cras_bt_profile.c \
     58 	server/cras_dbus.c \
     59 	server/cras_dbus_util.c \
     60 	server/cras_dbus_control.c \
     61 	server/cras_hfp_ag_profile.c \
     62 	server/cras_hfp_iodev.c \
     63 	server/cras_hfp_info.c \
     64 	server/cras_hfp_slc.c \
     65 	server/cras_a2dp_endpoint.c \
     66 	server/cras_a2dp_info.c \
     67 	server/cras_a2dp_iodev.c \
     68 	server/cras_telephony.c \
     69 	server/cras_utf8.c
     70 else
     71 CRAS_DBUS_SOURCES =
     72 endif
     73 
     74 if HAVE_SELINUX
     75 CRAS_SELINUX_SOURCES = common/cras_selinux_helper.c
     76 CRAS_SELINUX_UNITTEST_SOURCES = tests/cras_selinux_helper_unittest.c
     77 else
     78 CRAS_SELINUX_SOURCES =
     79 CRAS_SELINUX_UNITTEST_SOURCES =
     80 endif
     81 
     82 cras_server_SOURCES = \
     83 	$(CRAS_DBUS_SOURCES) \
     84 	$(CRAS_SELINUX_SOURCES) \
     85 	$(CRAS_WEBRTC_APM_SOURCES) \
     86 	common/cras_audio_format.c \
     87 	common/cras_checksum.c \
     88 	common/cras_config.c \
     89 	common/cras_metrics.c \
     90 	common/cras_shm.c \
     91 	common/cras_util.c \
     92 	common/dumper.c \
     93 	common/edid_utils.c \
     94 	common/sfh.c \
     95 	dsp/biquad.c \
     96 	dsp/crossover.c \
     97 	dsp/crossover2.c \
     98 	dsp/dcblock.c \
     99 	dsp/drc.c \
    100 	dsp/drc_kernel.c \
    101 	dsp/drc_math.c \
    102 	dsp/dsp_util.c \
    103 	dsp/eq.c \
    104 	dsp/eq2.c \
    105 	server/audio_thread.c \
    106 	server/buffer_share.c \
    107 	server/config/cras_board_config.c \
    108 	server/config/cras_card_config.c \
    109 	server/config/cras_device_blacklist.c \
    110 	server/cras_alert.c \
    111 	server/cras_alsa_card.c \
    112 	server/cras_alsa_helpers.c \
    113 	server/cras_alsa_io.c \
    114 	server/cras_alsa_jack.c \
    115 	server/cras_alsa_mixer.c \
    116 	server/cras_alsa_mixer_name.c \
    117 	server/cras_alsa_ucm.c \
    118 	server/cras_alsa_ucm_section.c \
    119 	server/cras_audio_area.c \
    120 	server/cras_audio_thread_monitor.c \
    121 	server/cras_device_monitor.c \
    122 	server/cras_dsp.c \
    123 	server/cras_dsp_ini.c \
    124 	server/cras_dsp_mod_builtin.c \
    125 	server/cras_dsp_mod_ladspa.c \
    126 	server/cras_dsp_pipeline.c \
    127 	server/cras_empty_iodev.c \
    128 	server/cras_expr.c \
    129 	server/cras_fmt_conv.c \
    130 	server/cras_gpio_jack.c \
    131 	server/cras_hotword_handler.c \
    132 	server/cras_iodev.c \
    133 	server/cras_iodev_list.c \
    134 	server/cras_loopback_iodev.c \
    135 	server/cras_main_message.c \
    136 	server/cras_mix.c \
    137 	server/cras_non_empty_audio_handler.c \
    138 	server/cras_observer.c \
    139 	server/cras_ramp.c \
    140 	server/cras_rclient.c \
    141 	server/cras_rstream.c \
    142 	server/cras_server_metrics.c \
    143 	server/cras_system_state.c \
    144 	server/cras_tm.c \
    145 	server/cras_udev.c \
    146 	server/cras_volume_curve.c \
    147 	server/dev_io.c \
    148 	server/dev_stream.c \
    149 	server/input_data.c \
    150 	server/linear_resampler.c \
    151 	server/polled_interval_checker.c \
    152 	server/server_stream.c \
    153 	server/stream_list.c \
    154 	server/test_iodev.c \
    155 	server/rate_estimator.c \
    156 	server/softvol_curve.c
    157 
    158 libcrasserver_la_SOURCES = \
    159 	$(cras_server_SOURCES)
    160 libcrasserver_la_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    161 	-I$(top_srcdir)/src/dsp -I$(top_srcdir)/src/server \
    162 	-I$(top_srcdir)/src/server/config \
    163 	$(DBUS_CFLAGS) $(SBC_CFLAGS) $(SELINUX_CFLAGS)
    164 libcrasserver_la_LIBADD = \
    165 	libcrasmix.la \
    166 	$(CRAS_SSE4_2) \
    167 	$(CRAS_AVX) \
    168 	$(CRAS_AVX2) \
    169 	$(CRAS_FMA) \
    170 	-lpthread -lasound -lrt -liniparser -ludev -ldl -lm -lspeexdsp \
    171 	$(SBC_LIBS) \
    172 	$(DBUS_LIBS) \
    173 	$(SELINUX_LIBS)
    174 
    175 cras_SOURCES = \
    176 	server/cras.c \
    177 	server/cras_server.c
    178 
    179 cras_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    180 	-I$(top_srcdir)/src/dsp -I$(top_srcdir)/src/server \
    181 	-I$(top_srcdir)/src/server/config \
    182 	$(DBUS_CFLAGS) $(SBC_CFLAGS)
    183 
    184 cras_LDADD = \
    185 	libcrasmix.la \
    186 	libcrasserver.la \
    187 	$(CRAS_SSE4_2) \
    188 	$(CRAS_AVX) \
    189 	$(CRAS_AVX2) \
    190 	$(CRAS_FMA) \
    191 	-lpthread -lasound -lrt -liniparser -ludev -ldl -lm -lspeexdsp \
    192 	$(METRICS_LIBS) \
    193 	$(SBC_LIBS) \
    194 	$(DBUS_LIBS) \
    195 	$(WEBRTC_APM_LIBS)
    196 
    197 noinst_LTLIBRARIES = \
    198 	$(CRAS_SSE4_2) \
    199 	$(CRAS_AVX) \
    200 	$(CRAS_AVX2) \
    201 	$(CRAS_FMA) \
    202 	libcrasmix.la \
    203 	libcrasserver.la
    204 
    205 libcrasmix_la_SOURCES = \
    206 	server/cras_mix_ops.c
    207 
    208 libcrasmix_la_CFLAGS = \
    209 	$(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    210 	-I$(top_srcdir)/src/dsp -I$(top_srcdir)/src/server \
    211 	-I$(top_srcdir)/src/server/config \
    212 	$(DBUS_CFLAGS) $(SBC_CFLAGS)
    213 
    214 libcrasmix_sse42_la_SOURCES = \
    215 	server/cras_mix_ops.c
    216 
    217 libcrasmix_sse42_la_CFLAGS = \
    218 	$(COMMON_SIMD_CPPFLAGS) -I$(top_srcdir)/src/common \
    219 	-I$(top_srcdir)/src/dsp -I$(top_srcdir)/src/server \
    220 	-I$(top_srcdir)/src/server/config \
    221 	$(DBUS_CFLAGS) $(SSE42_CFLAGS)
    222 
    223 libcrasmix_avx_la_SOURCES = \
    224 	server/cras_mix_ops.c
    225 
    226 libcrasmix_avx_la_CFLAGS = \
    227 	$(COMMON_SIMD_CPPFLAGS) -I$(top_srcdir)/src/common \
    228 	-I$(top_srcdir)/src/dsp -I$(top_srcdir)/src/server \
    229 	-I$(top_srcdir)/src/server/config \
    230 	$(DBUS_CFLAGS) $(AVX_CFLAGS)
    231 
    232 libcrasmix_avx2_la_SOURCES = \
    233 	server/cras_mix_ops.c
    234 
    235 libcrasmix_avx2_la_CFLAGS = \
    236 	$(COMMON_SIMD_CPPFLAGS) -I$(top_srcdir)/src/common \
    237 	-I$(top_srcdir)/src/dsp -I$(top_srcdir)/src/server \
    238 	-I$(top_srcdir)/src/server/config \
    239 	$(DBUS_CFLAGS) $(AVX2_CFLAGS)
    240 
    241 libcrasmix_fma_la_SOURCES = \
    242 	server/cras_mix_ops.c
    243 
    244 libcrasmix_fma_la_CFLAGS = \
    245 	$(COMMON_SIMD_CPPFLAGS) -I$(top_srcdir)/src/common \
    246 	-I$(top_srcdir)/src/dsp -I$(top_srcdir)/src/server \
    247 	-I$(top_srcdir)/src/server/config \
    248 	$(DBUS_CFLAGS) $(FMA_CFLAGS)
    249 
    250 lib_LTLIBRARIES = libcras.la
    251 libcras_la_SOURCES = \
    252 	common/cras_audio_format.c \
    253 	common/cras_config.c \
    254 	common/cras_file_wait.c \
    255 	common/cras_util.c \
    256 	common/edid_utils.c \
    257 	libcras/cras_client.c \
    258 	libcras/cras_helpers.c
    259 
    260 include_HEADERS = \
    261 	common/cras_audio_format.h \
    262 	common/cras_config.h \
    263 	common/cras_iodev_info.h \
    264 	common/cras_messages.h \
    265 	common/cras_shm.h \
    266 	common/cras_types.h \
    267 	common/cras_util.h \
    268 	common/edid_utils.h \
    269 	common/utlist.h \
    270 	libcras/cras_client.h \
    271 	libcras/cras_helpers.h
    272 
    273 libcras_la_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    274 	-I$(top_srcdir)/src/libcras
    275 libcras_la_LIBADD = -lpthread -lasound -lrt
    276 libcras_la_LDFLAGS = -version-info 0:0:0
    277 
    278 asound_module_pcm_cras_LTLIBRARIES = libasound_module_pcm_cras.la
    279 asound_module_ctl_cras_LTLIBRARIES = libasound_module_ctl_cras.la
    280 asound_module_pcm_crasdir = @ALSA_PLUGIN_DIR@
    281 asound_module_ctl_crasdir = @ALSA_PLUGIN_DIR@
    282 libasound_module_pcm_cras_la_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    283 	-I$(top_srcdir)/src/libcras
    284 libasound_module_pcm_cras_la_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined \
    285 	$(LDFLAGS_NOUNDEFINED)
    286 libasound_module_ctl_cras_la_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    287 	-I$(top_srcdir)/src/libcras
    288 libasound_module_ctl_cras_la_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined \
    289 	$(LDFLAGS_NOUNDEFINED)
    290 libasound_module_pcm_cras_la_SOURCES = alsa_plugin/pcm_cras.c
    291 libasound_module_pcm_cras_la_LIBADD = -lasound libcras.la
    292 libasound_module_ctl_cras_la_SOURCES = alsa_plugin/ctl_cras.c
    293 libasound_module_ctl_cras_la_LIBADD = -lasound libcras.la
    294 
    295 # Inject a dependency between the installation rules of libcras and its modules.
    296 # This avoids a race when the modules are relinked before libcras is actually
    297 # installed.
    298 #
    299 # Automake will refuse to generate a rule that collides with a user-specified
    300 # one. The hide_install variable prevents automake from noticing these rules,
    301 # so everything else will behave as usual.
    302 hide_install=install
    303 $(hide_install)-asound_module_pcm_crasLTLIBRARIES: install-libLTLIBRARIES
    304 $(hide_install)-asound_module_ctl_crasLTLIBRARIES: install-libLTLIBRARIES
    305 
    306 if HAVE_DBUS
    307 DBUS_TESTS = \
    308 	a2dp_info_unittest \
    309 	a2dp_iodev_unittest \
    310 	alsa_io_unittest \
    311 	bt_device_unittest \
    312 	bt_io_unittest \
    313 	hfp_iodev_unittest \
    314 	hfp_slc_unittest
    315 else
    316 DBUS_TESTS =
    317 endif
    318 
    319 if HAVE_WEBRTC_APM
    320 CRAS_WEBRTC_APM_TESTS = \
    321 	apm_list_unittest
    322 else
    323 CRAS_WEBRTC_APM_TESTS =
    324 endif
    325 
    326 TESTS = \
    327 	$(DBUS_TESTS) \
    328 	$(CRAS_WEBRTC_APM_TESTS) \
    329 	audio_area_unittest \
    330 	audio_format_unittest \
    331 	audio_thread_unittest \
    332 	audio_thread_monitor_unittest \
    333 	alert_unittest \
    334 	alsa_card_unittest \
    335 	alsa_helpers_unittest \
    336 	alsa_jack_unittest \
    337 	alsa_mixer_unittest \
    338 	alsa_ucm_unittest \
    339 	array_unittest \
    340 	byte_buffer_unittest \
    341 	card_config_unittest \
    342 	checksum_unittest \
    343 	cras_client_unittest \
    344 	cras_tm_unittest \
    345 	device_monitor_unittest \
    346 	dev_io_unittest \
    347 	dev_stream_unittest \
    348 	device_blacklist_unittest \
    349 	dsp_core_unittest \
    350 	dsp_ini_unittest \
    351 	dsp_pipeline_unittest \
    352 	dsp_unittest \
    353 	dumper_unittest \
    354 	edid_utils_unittest \
    355 	expr_unittest \
    356 	file_wait_unittest \
    357 	float_buffer_unittest \
    358 	fmt_conv_unittest \
    359 	hfp_info_unittest \
    360 	buffer_share_unittest \
    361 	iodev_list_unittest \
    362 	iodev_unittest \
    363 	loopback_iodev_unittest \
    364 	mix_unittest \
    365 	linear_resampler_unittest \
    366 	observer_unittest \
    367 	polled_interval_checker_unittest \
    368 	ramp_unittest \
    369 	rate_estimator_unittest \
    370 	rclient_unittest \
    371 	rstream_unittest \
    372 	shm_unittest \
    373 	server_metrics_unittest \
    374 	softvol_curve_unittest \
    375 	stream_list_unittest \
    376 	system_state_unittest \
    377 	timing_unittest \
    378 	utf8_unittest \
    379 	util_unittest \
    380 	volume_curve_unittest
    381 
    382 check_PROGRAMS = $(TESTS)
    383 
    384 cras_test_client_SOURCES = tests/cras_test_client.c
    385 cras_test_client_LDADD = -lm libcras.la
    386 cras_test_client_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/libcras \
    387 	-I$(top_srcdir)/src/common -I$(top_builddir)/src/common
    388 
    389 tests/cras_test_client.c: common/cras_version.h
    390 
    391 cras_monitor_SOURCES = tests/cras_monitor.c
    392 cras_monitor_LDADD = -lm libcras.la
    393 cras_monitor_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/libcras \
    394 	-I$(top_srcdir)/src/common -I$(top_builddir)/src/common
    395 
    396 tests/cras_monitor.c: common/cras_version.h
    397 
    398 cras_router_SOURCES = tests/cras_router.c
    399 cras_router_LDADD = -lm libcras.la
    400 cras_router_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/libcras \
    401         -I$(top_srcdir)/src/common -I$(top_srcdir)/src/dsp \
    402 	-I$(top_srcdir)/src/server -I$(top_builddir)/src/common
    403 
    404 tests/cras_router.c: common/cras_version.h
    405 
    406 CLEANFILES = common/cras_version.h
    407 .PHONY: common/cras_version.h
    408 common/cras_version.h:
    409 	if echo "$(CPPFLAGS)" | grep -q -- '-DVCSID='; then \
    410 		echo > $@.tmp; \
    411 	else \
    412 		commit="outoftree-$$(git rev-parse HEAD)"; \
    413 		if [ -n "$$(git diff-index --name-only HEAD)" ]; then \
    414 			commit="$${commit}-dirty"; \
    415 		fi; \
    416 		echo "#define VCSID \"$$commit\"" > $@.tmp; \
    417 	fi
    418 	diff $@.tmp $@ && rm -f $@.tmp || mv $@.tmp $@
    419 
    420 # dsp test programs (not run automatically)
    421 check_PROGRAMS += \
    422 	crossover_test \
    423 	crossover2_test \
    424 	dcblock_test \
    425 	drc_test \
    426 	dsp_util_test \
    427 	eq_test \
    428 	eq2_test \
    429 	cmpraw
    430 
    431 DSP_INCLUDE_PATHS = -I$(top_srcdir)/src/dsp -I$(top_srcdir)/src/common
    432 
    433 crossover_test_SOURCES = dsp/crossover.c dsp/biquad.c dsp/dsp_util.c \
    434 	dsp/tests/crossover_test.c dsp/tests/dsp_test_util.c dsp/tests/raw.c
    435 crossover_test_LDADD = -lrt -lm
    436 crossover_test_CPPFLAGS = $(COMMON_CPPFLAGS) $(DSP_INCLUDE_PATHS)
    437 
    438 crossover2_test_SOURCES = dsp/crossover2.c dsp/biquad.c dsp/dsp_util.c \
    439 	dsp/tests/crossover2_test.c dsp/tests/dsp_test_util.c dsp/tests/raw.c
    440 crossover2_test_LDADD = -lrt -lm
    441 crossover2_test_CPPFLAGS = $(COMMON_CPPFLAGS) $(DSP_INCLUDE_PATHS)
    442 
    443 dcblock_test_SOURCES = dsp/dcblock.c dsp/dsp_util.c dsp/tests/dcblock_test.c \
    444 	dsp/tests/dsp_test_util.c dsp/tests/raw.c
    445 dcblock_test_LDADD = -lrt -lm
    446 dcblock_test_CPPFLAGS = $(COMMON_CPPFLAGS) $(DSP_INCLUDE_PATHS)
    447 
    448 drc_test_SOURCES = dsp/drc.c dsp/drc_kernel.c dsp/drc_math.c \
    449 	dsp/crossover2.c dsp/eq2.c dsp/biquad.c dsp/dsp_util.c \
    450 	dsp/tests/drc_test.c dsp/tests/dsp_test_util.c dsp/tests/raw.c
    451 drc_test_LDADD = -lrt -lm
    452 drc_test_CPPFLAGS = $(COMMON_CPPFLAGS) $(DSP_INCLUDE_PATHS)
    453 
    454 dsp_util_test_SOURCES = dsp/tests/dsp_util_test.c dsp/dsp_util.c
    455 dsp_util_test_LDADD = -lm
    456 dsp_util_test_CPPFLAGS = $(COMMON_CPPFLAGS) $(DSP_INCLUDE_PATHS) -Wno-error=strict-aliasing
    457 
    458 eq_test_SOURCES = dsp/biquad.c dsp/eq.c dsp/dsp_util.c dsp/tests/eq_test.c \
    459 	dsp/tests/dsp_test_util.c dsp/tests/raw.c
    460 eq_test_LDADD = -lrt -lm
    461 eq_test_CPPFLAGS = $(COMMON_CPPFLAGS) $(DSP_INCLUDE_PATHS)
    462 
    463 eq2_test_SOURCES = dsp/biquad.c dsp/eq2.c dsp/dsp_util.c dsp/tests/eq2_test.c \
    464 	dsp/tests/dsp_test_util.c dsp/tests/raw.c
    465 eq2_test_LDADD = -lrt -lm
    466 eq2_test_CPPFLAGS = $(COMMON_CPPFLAGS) $(DSP_INCLUDE_PATHS)
    467 
    468 cmpraw_SOURCES = dsp/tests/cmpraw.c dsp/tests/raw.c
    469 cmpraw_LDADD = -lm
    470 cmpraw_CPPFLAGS = $(COMMON_CPPFLAGS) $(DSP_INCLUDE_PATHS)
    471 
    472 # unit tests
    473 alert_unittest_SOURCES = tests/alert_unittest.cc \
    474 	server/cras_alert.c
    475 alert_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    476 	-I$(top_srcdir)/src/common \
    477 	-I$(top_srcdir)/src/server
    478 alert_unittest_LDADD = -lgtest -lpthread
    479 
    480 alsa_card_unittest_SOURCES = tests/alsa_card_unittest.cc \
    481 	server/cras_alsa_card.c server/cras_alsa_mixer_name.c \
    482 	server/cras_alsa_ucm_section.c
    483 alsa_card_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    484 	-I$(top_srcdir)/src/common \
    485 	-I$(top_srcdir)/src/server \
    486 	-I$(top_srcdir)/src/server/config
    487 alsa_card_unittest_LDADD = -lgtest -lpthread
    488 
    489 alsa_helpers_unittest_SOURCES = tests/alsa_helpers_unittest.cc \
    490 	common/cras_audio_format.c
    491 alsa_helpers_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    492 	-I$(top_srcdir)/src/common \
    493 	-I$(top_srcdir)/src/server
    494 alsa_helpers_unittest_LDADD = -lgtest -lpthread
    495 
    496 audio_area_unittest_SOURCES = tests/audio_area_unittest.cc \
    497 	server/cras_audio_area.c
    498 audio_area_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/server \
    499 	-I$(top_srcdir)/src/common
    500 audio_area_unittest_LDADD = -lgtest -lpthread
    501 
    502 audio_format_unittest_SOURCES = tests/audio_format_unittest.cc
    503 audio_format_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/server \
    504 	-I$(top_srcdir)/src/common
    505 audio_format_unittest_LDADD = -lgtest -lpthread
    506 
    507 if HAVE_DBUS
    508 a2dp_info_unittest_SOURCES = tests/a2dp_info_unittest.cc \
    509 	server/cras_a2dp_info.c
    510 a2dp_info_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/server \
    511 	-I$(top_srcdir)/src/common
    512 a2dp_info_unittest_LDADD = -lgtest -lpthread
    513 
    514 a2dp_iodev_unittest_SOURCES = tests/a2dp_iodev_unittest.cc \
    515 	server/cras_a2dp_iodev.c common/sfh.c
    516 a2dp_iodev_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/server \
    517 	-I$(top_srcdir)/src/common $(DBUS_CFLAGS)
    518 a2dp_iodev_unittest_LDADD = -lgtest -lpthread $(DBUS_LIBS)
    519 endif
    520 
    521 alsa_io_unittest_SOURCES = tests/alsa_io_unittest.cc server/softvol_curve.c \
    522 	common/sfh.c \
    523 	server/cras_alsa_ucm_section.c \
    524 	server/cras_alsa_mixer_name.c
    525 alsa_io_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) $(DBUS_CFLAGS) \
    526 	-I$(top_srcdir)/src/server \
    527 	-I$(top_srcdir)/src/common \
    528 	-I$(top_srcdir)/src/server/config
    529 alsa_io_unittest_LDADD = -lgtest -lpthread
    530 
    531 alsa_jack_unittest_SOURCES = tests/alsa_jack_unittest.cc \
    532 	server/cras_alsa_jack.c \
    533 	server/cras_alsa_ucm_section.c \
    534 	server/cras_alsa_mixer_name.c
    535 alsa_jack_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    536 	-I$(top_srcdir)/src/server
    537 alsa_jack_unittest_LDADD = -lgtest -lpthread
    538 
    539 alsa_mixer_unittest_SOURCES = tests/alsa_mixer_unittest.cc \
    540 	server/cras_alsa_mixer_name.c \
    541 	server/cras_alsa_ucm_section.c
    542 alsa_mixer_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    543 	-I$(top_srcdir)/src/common \
    544 	-I$(top_srcdir)/src/server \
    545 	-I$(top_srcdir)/src/server/config
    546 alsa_mixer_unittest_LDADD = -lgtest -lpthread
    547 
    548 alsa_ucm_unittest_SOURCES = tests/alsa_ucm_unittest.cc \
    549 	server/cras_alsa_mixer_name.c \
    550 	server/cras_alsa_ucm_section.c
    551 alsa_ucm_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    552 	-I$(top_srcdir)/src/common \
    553 	-I$(top_srcdir)/src/server \
    554 	-I$(top_srcdir)/src/server/config
    555 alsa_ucm_unittest_LDADD = -lgtest -lpthread
    556 
    557 if HAVE_WEBRTC_APM
    558 apm_list_unittest_SOURCES = tests/apm_list_unittest.cc \
    559 	server/cras_apm_list.c
    560 apm_list_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    561 	$(DSP_INCLUDE_PATHS) \
    562 	-I$(top_srcdir)/src/server \
    563 	-I$(top_srcdir)/src/server/config \
    564 	$(WEBRTC_APM_CFLAGS)
    565 apm_list_unittest_LDADD = -lgtest
    566 endif
    567 
    568 array_unittest_SOURCES = tests/array_unittest.cc
    569 array_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common
    570 array_unittest_LDADD = -lgtest -lpthread
    571 
    572 audio_thread_unittest_SOURCES = tests/audio_thread_unittest.cc \
    573 	server/dev_io.c tests/empty_audio_stub.cc
    574 audio_thread_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    575 	-I$(top_srcdir)/src/common -I$(top_srcdir)/src/server
    576 audio_thread_unittest_LDADD = -lgtest -lpthread -lrt
    577 
    578 audio_thread_monitor_unittest_SOURCES = tests/audio_thread_monitor_unittest.cc
    579 audio_thread_monitor_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    580 	-I$(top_srcdir)/src/common -I$(top_srcdir)/src/server
    581 audio_thread_monitor_unittest_LDADD = -lgtest -lpthread -lrt
    582 
    583 if HAVE_DBUS
    584 bt_device_unittest_SOURCES = tests/bt_device_unittest.cc \
    585 	server/cras_bt_device.c
    586 bt_device_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/server \
    587 	-I$(top_srcdir)/src/common $(DBUS_CFLAGS)
    588 bt_device_unittest_LDADD = -lgtest -lpthread $(DBUS_LIBS)
    589 
    590 bt_io_unittest_SOURCES = tests/bt_io_unittest.cc common/sfh.c
    591 bt_io_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/server \
    592 	-I$(top_srcdir)/src/common $(DBUS_CFLAGS)
    593 bt_io_unittest_LDADD = -lgtest -lpthread $(DBUS_LIBS)
    594 endif
    595 
    596 byte_buffer_unittest_SOURCES = tests/byte_buffer_unittest.cc
    597 byte_buffer_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common
    598 byte_buffer_unittest_LDADD = -lgtest -lpthread
    599 
    600 card_config_unittest_SOURCES = tests/card_config_unittest.cc \
    601 	server/config/cras_card_config.c
    602 card_config_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    603 	-I$(top_srcdir)/src/common -I$(top_srcdir)/src/server \
    604 	-I$(top_srcdir)/src/server/config $(CRAS_UT_TMPDIR_CFLAGS)
    605 card_config_unittest_LDADD = -lgtest -liniparser -lpthread
    606 
    607 checksum_unittest_SOURCES = tests/checksum_unittest.cc common/cras_checksum.c
    608 checksum_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common
    609 checksum_unittest_LDADD = -lgtest -lpthread
    610 
    611 cras_client_unittest_SOURCES = tests/cras_client_unittest.cc \
    612 	common/cras_config.c common/cras_util.c common/cras_file_wait.c
    613 cras_client_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    614 	-I$(top_srcdir)/src/libcras
    615 cras_client_unittest_LDADD = -lgtest -lpthread -lspeexdsp
    616 
    617 cras_tm_unittest_SOURCES = tests/cras_tm_unittest.cc server/cras_tm.c
    618 cras_tm_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    619 	 -I$(top_srcdir)/src/server
    620 cras_tm_unittest_LDADD = -lgtest -lpthread
    621 
    622 dev_io_unittest_SOURCES = \
    623 	$(CRAS_SELINUX_UNITTEST_SOURCES) \
    624 	common/cras_audio_format.c \
    625 	common/cras_shm.c \
    626 	server/cras_audio_area.c \
    627 	server/cras_fmt_conv.c \
    628 	server/cras_mix.c \
    629 	server/cras_mix_ops.c \
    630 	server/dev_io.c \
    631 	server/dev_stream.c \
    632 	server/linear_resampler.c \
    633 	tests/dev_io_stubs.cc \
    634 	tests/iodev_stub.cc \
    635 	tests/empty_audio_stub.cc \
    636 	tests/rstream_stub.cc \
    637 	tests/dev_io_unittest.cc
    638 dev_io_unittest_CXXFLAGS = \
    639 	-std=c++11 -Wno-noexcept-type
    640 dev_io_unittest_CPPFLAGS = \
    641 	$(COMMON_CPPFLAGS) \
    642 	-I$(top_srcdir)/src/common \
    643 	-I$(top_srcdir)/src/server \
    644 	-I$(top_srcdir)/src/server/config \
    645 	$(SELINUX_CFLAGS)
    646 dev_io_unittest_LDADD = \
    647 	libcrasmix.la \
    648 	$(CRAS_SSE4_2) \
    649 	$(CRAS_AVX) \
    650 	$(CRAS_AVX2) \
    651 	$(CRAS_FMA) \
    652 	$(SELINUX_LIBS) \
    653 	-lgtest -lrt -lpthread -ldl -lm -lspeexdsp
    654 
    655 dev_stream_unittest_SOURCES = tests/dev_stream_unittest.cc \
    656 	server/dev_stream.c
    657 dev_stream_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    658 	-I$(top_srcdir)/src/common -I$(top_srcdir)/src/server
    659 dev_stream_unittest_LDADD = -lgtest -liniparser -lpthread
    660 
    661 device_blacklist_unittest_SOURCES = tests/device_blacklist_unittest.cc \
    662 	server/config/cras_device_blacklist.c
    663 device_blacklist_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    664 	-I$(top_srcdir)/src/common -I$(top_srcdir)/src/server \
    665 	-I$(top_srcdir)/src/server/config $(CRAS_UT_TMPDIR_CFLAGS)
    666 device_blacklist_unittest_LDADD = -lgtest -liniparser -lpthread
    667 
    668 device_monitor_unittest_SOURCES = tests/device_monitor_unittest.cc
    669 device_monitor_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    670 	-I$(top_srcdir)/src/server
    671 device_monitor_unittest_LDADD = -lgtest -lpthread
    672 
    673 dsp_core_unittest_SOURCES = tests/dsp_core_unittest.cc dsp/eq.c dsp/eq2.c \
    674 	dsp/biquad.c dsp/dsp_util.c dsp/crossover.c dsp/crossover2.c dsp/drc.c \
    675 	dsp/drc_kernel.c dsp/drc_math.c
    676 dsp_core_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) $(DSP_INCLUDE_PATHS)
    677 dsp_core_unittest_LDADD = -lgtest -lpthread
    678 
    679 dsp_ini_unittest_SOURCES = tests/dsp_ini_unittest.cc \
    680 	server/cras_dsp_ini.c server/cras_expr.c common/dumper.c
    681 dsp_ini_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    682 	-I$(top_srcdir)/src/server
    683 dsp_ini_unittest_LDADD = -lgtest -liniparser -lpthread
    684 
    685 dsp_pipeline_unittest_SOURCES = tests/cras_dsp_pipeline_unittest.cc \
    686 	server/cras_dsp_ini.c server/cras_expr.c server/cras_dsp_pipeline.c \
    687 	common/dumper.c dsp/dsp_util.c
    688 dsp_pipeline_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    689 	-I$(top_srcdir)/src/server $(DSP_INCLUDE_PATHS)
    690 dsp_pipeline_unittest_LDADD = -lgtest -lrt -liniparser -lpthread
    691 
    692 dsp_unittest_SOURCES = tests/dsp_unittest.cc \
    693 	server/cras_dsp.c server/cras_dsp_ini.c server/cras_dsp_pipeline.c \
    694 	server/cras_expr.c common/dumper.c dsp/dsp_util.c \
    695 	dsp/tests/dsp_test_util.c
    696 dsp_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    697 	-I$(top_srcdir)/src/server $(DSP_INCLUDE_PATHS)
    698 dsp_unittest_LDADD = -lgtest -lrt -liniparser -lpthread
    699 
    700 dumper_unittest_SOURCES = tests/dumper_unittest.cc common/dumper.c
    701 dumper_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common
    702 dumper_unittest_LDADD = -lgtest -lpthread
    703 
    704 edid_utils_unittest_SOURCES = tests/edid_utils_unittest.cc common/edid_utils.c
    705 edid_utils_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common
    706 edid_utils_unittest_LDADD = -lgtest -lpthread
    707 
    708 expr_unittest_SOURCES = tests/expr_unittest.cc server/cras_expr.c common/dumper.c
    709 expr_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    710 	-I$(top_srcdir)/src/server
    711 expr_unittest_LDADD = -lgtest -lpthread
    712 
    713 file_wait_unittest_SOURCES = tests/file_wait_unittest.cc \
    714 	common/cras_file_wait.c common/cras_util.c
    715 file_wait_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    716 	$(CRAS_UT_TMPDIR_CFLAGS)
    717 file_wait_unittest_LDADD = -lgtest -lpthread
    718 
    719 
    720 float_buffer_unittest_SOURCES = tests/float_buffer_unittest.cc
    721 float_buffer_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    722 	-I$(top_srcdir)/src/server
    723 float_buffer_unittest_LDADD = -lgtest -lpthread
    724 
    725 fmt_conv_unittest_SOURCES = tests/fmt_conv_unittest.cc server/cras_fmt_conv.c
    726 fmt_conv_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    727 	 -I$(top_srcdir)/src/server
    728 fmt_conv_unittest_LDADD = -lasound -lspeexdsp -lgtest -lpthread
    729 
    730 hfp_info_unittest_SOURCES = tests/hfp_info_unittest.cc
    731 hfp_info_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    732 	-I$(top_srcdir)/src/server
    733 hfp_info_unittest_LDADD = -lgtest -lpthread
    734 
    735 if HAVE_DBUS
    736 hfp_iodev_unittest_SOURCES = tests/hfp_iodev_unittest.cc \
    737 	server/cras_hfp_iodev.c common/sfh.c
    738 hfp_iodev_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    739 	-I$(top_srcdir)/src/server $(DBUS_CFLAGS)
    740 hfp_iodev_unittest_LDADD = -lgtest -lpthread $(DBUS_LIBS)
    741 
    742 hfp_slc_unittest_SOURCES = tests/hfp_slc_unittest.cc \
    743 	server/cras_hfp_slc.c
    744 hfp_slc_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    745 	-I$(top_srcdir)/src/server $(DBUS_CFLAGS)
    746 hfp_slc_unittest_LDADD = -lgtest -lpthread $(DBUS_LIBS)
    747 endif
    748 
    749 buffer_share_unittest_SOURCES = tests/buffer_share_unittest.cc \
    750 	server/buffer_share.c
    751 buffer_share_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    752 	-I$(top_srcdir)/src/common -I$(top_srcdir)/src/server
    753 buffer_share_unittest_LDADD = -lgtest -liniparser -lpthread
    754 
    755 iodev_list_unittest_SOURCES = tests/iodev_list_unittest.cc \
    756 	server/cras_iodev_list.c
    757 iodev_list_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    758 	 -I$(top_srcdir)/src/server
    759 iodev_list_unittest_LDADD = -lgtest -lpthread
    760 
    761 loopback_iodev_unittest_SOURCES = tests/loopback_iodev_unittest.cc \
    762 	server/cras_loopback_iodev.c common/sfh.c
    763 loopback_iodev_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    764 	-I$(top_srcdir)/src/common \
    765 	-I$(top_srcdir)/src/server
    766 loopback_iodev_unittest_LDADD = -lgtest -lpthread
    767 
    768 iodev_unittest_SOURCES = tests/iodev_unittest.cc \
    769 	server/cras_iodev.c
    770 iodev_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    771 	 -I$(top_srcdir)/src/server
    772 iodev_unittest_LDADD = -lgtest -lpthread
    773 
    774 mix_unittest_SOURCES = tests/mix_unittest.cc server/cras_mix.c
    775 mix_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    776 	 -I$(top_srcdir)/src/server
    777 mix_unittest_LDADD = libcrasmix.la \
    778 	$(CRAS_SSE4_2) \
    779 	$(CRAS_AVX) \
    780 	$(CRAS_AVX2) \
    781 	$(CRAS_FMA) \
    782 	-lgtest \
    783 	-lpthread
    784 
    785 linear_resampler_unittest_SOURCES = tests/linear_resampler_unittest.cc \
    786 	server/linear_resampler.c server/cras_audio_area.c
    787 linear_resampler_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    788 	 -I$(top_srcdir)/src/server
    789 linear_resampler_unittest_LDADD = -lgtest -lpthread
    790 
    791 observer_unittest_SOURCES = tests/observer_unittest.cc
    792 observer_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    793 	-I$(top_srcdir)/src/server
    794 observer_unittest_LDADD = -lgtest -lpthread
    795 
    796 polled_interval_checker_unittest_SOURCES = tests/polled_interval_checker_unittest.cc \
    797     server/polled_interval_checker.c
    798 polled_interval_checker_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    799 	-I$(top_srcdir)/src/server
    800 polled_interval_checker_unittest_LDADD = -lgtest -lpthread
    801 
    802 ramp_unittest_SOURCES = tests/ramp_unittest.cc
    803 ramp_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    804 	-I$(top_srcdir)/src/server
    805 ramp_unittest_LDADD = -lgtest -lpthread
    806 
    807 rate_estimator_unittest_SOURCES = tests/rate_estimator_unittest.cc server/rate_estimator.c
    808 rate_estimator_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    809 	 -I$(top_srcdir)/src/server
    810 rate_estimator_unittest_LDADD = -lgtest -lpthread
    811 
    812 rclient_unittest_SOURCES = tests/rclient_unittest.cc
    813 rclient_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    814 	 -I$(top_srcdir)/src/server $(CRAS_UT_TMPDIR_CFLAGS)
    815 rclient_unittest_LDADD = -lgtest -lpthread
    816 
    817 rstream_unittest_SOURCES = tests/rstream_unittest.cc server/cras_rstream.c \
    818 	common/cras_shm.c $(CRAS_SELINUX_UNITTEST_SOURCES)
    819 rstream_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    820 	 -I$(top_srcdir)/src/server $(SELINUX_CFLAGS)
    821 rstream_unittest_LDADD = $(SELINUX_LIBS) \
    822 	-lasound -lgtest -lpthread -lrt
    823 
    824 server_metrics_unittest_SOURCES = tests/server_metrics_unittest.cc
    825 server_metrics_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    826 	-I$(top_srcdir)/src/server
    827 server_metrics_unittest_LDADD = -lgtest -lpthread
    828 
    829 shm_unittest_SOURCES = tests/shm_unittest.cc
    830 shm_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common
    831 shm_unittest_LDADD = -lgtest -lpthread
    832 
    833 softvol_curve_unittest_SOURCES = tests/softvol_curve_unittest.cc server/softvol_curve.c
    834 softvol_curve_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    835 	 -I$(top_srcdir)/src/server
    836 softvol_curve_unittest_LDADD = -lgtest -lpthread
    837 
    838 stream_list_unittest_SOURCES = tests/stream_list_unittest.cc \
    839 	server/stream_list.c
    840 stream_list_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    841 	 -I$(top_srcdir)/src/server
    842 stream_list_unittest_LDADD = -lgtest -lpthread
    843 
    844 system_state_unittest_SOURCES = tests/system_state_unittest.cc \
    845 	server/cras_system_state.c common/cras_shm.c \
    846 	server/config/cras_board_config.c $(CRAS_SELINUX_UNITTEST_SOURCES)
    847 system_state_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    848 	-I$(top_srcdir)/src/common -I$(top_srcdir)/src/server \
    849 	-I$(top_srcdir)/src/server/config $(SELINUX_CFLAGS)
    850 system_state_unittest_LDADD = $(SELINUX_LIBS) \
    851 	-lgtest -liniparser -lpthread -lrt
    852 
    853 timing_unittest_SOURCES = \
    854 	$(CRAS_SELINUX_UNITTEST_SOURCES) \
    855 	common/cras_audio_format.c \
    856 	common/cras_shm.c \
    857 	server/cras_audio_area.c \
    858 	server/cras_fmt_conv.c \
    859 	server/cras_mix.c \
    860 	server/cras_mix_ops.c \
    861 	server/dev_io.c \
    862 	server/dev_stream.c \
    863 	server/linear_resampler.c \
    864 	tests/dev_io_stubs.cc \
    865 	tests/iodev_stub.cc \
    866 	tests/empty_audio_stub.cc \
    867 	tests/rstream_stub.cc \
    868 	tests/timing_unittest.cc
    869 timing_unittest_CXXFLAGS = \
    870 	-std=c++11 -Wno-noexcept-type
    871 timing_unittest_CPPFLAGS = \
    872 	$(COMMON_CPPFLAGS) \
    873 	-I$(top_srcdir)/src/common \
    874 	-I$(top_srcdir)/src/server \
    875 	-I$(top_srcdir)/src/server/config \
    876 	$(SELINUX_CFLAGS)
    877 timing_unittest_LDADD = \
    878 	libcrasmix.la \
    879 	$(CRAS_SSE4_2) \
    880 	$(CRAS_AVX) \
    881 	$(CRAS_AVX2) \
    882 	$(CRAS_FMA) \
    883 	$(SELINUX_LIBS) \
    884 	-lgtest -lrt -lpthread -ldl -lm -lspeexdsp
    885 
    886 utf8_unittest_SOURCES = tests/utf8_unittest.cc server/cras_utf8.c
    887 utf8_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common \
    888 	-I$(top_srcdir)/src/server
    889 utf8_unittest_LDADD = -lgtest -lpthread
    890 
    891 util_unittest_SOURCES = tests/util_unittest.cc common/cras_util.c \
    892 	common/cras_config.c
    893 util_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) -I$(top_srcdir)/src/common
    894 util_unittest_LDADD = -lgtest -lpthread
    895 
    896 volume_curve_unittest_SOURCES = tests/volume_curve_unittest.cc \
    897 	server/cras_volume_curve.c
    898 volume_curve_unittest_CPPFLAGS = $(COMMON_CPPFLAGS) \
    899 	-I$(top_srcdir)/src/common -I$(top_srcdir)/src/server
    900 volume_curve_unittest_LDADD = -lgtest -lpthread
    901