Skip to content

Commit

Permalink
Move out common CFLAGS definitions to AM_CFLAGS.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhdunn committed May 7, 2017
1 parent 85801fc commit f30b0c5
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions Makefile.am
Expand Up @@ -15,7 +15,11 @@ SHARED_VERSION=2:49:1 # = *.so.1.1.49

MKDIR=mkdir -p

AM_CFLAGS = -Wno-endif-labels # Needed to prevent warnings in ieee80.c.
# -Wno-endif-labels : Needed to prevent warnings in ieee80.c.
AM_CFLAGS = \
-Isrc/include \
-D_POSIX_C_SOURCE=200112L \
-Wno-endif-labels

EXTRA_DIST=

Expand Down Expand Up @@ -132,8 +136,8 @@ lib_LTLIBRARIES += src/libespeak-ng.la
src_libespeak_ng_la_LDFLAGS = -version-info $(SHARED_VERSION) -lpthread -lm \
${PCAUDIOLIB_LIBS}

src_libespeak_ng_la_CFLAGS = -Isrc/include -Isrc/include/compat -I src/ucd-tools/src/include \
-fPIC -fvisibility=hidden -D _BSD_SOURCE -D_DEFAULT_SOURCE -D _POSIX_C_SOURCE=200112L \
src_libespeak_ng_la_CFLAGS = -Isrc/include/compat -I src/ucd-tools/src/include \
-fPIC -fvisibility=hidden -D _BSD_SOURCE -D_DEFAULT_SOURCE \
-pedantic -fno-exceptions -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -DLIBESPEAK_NG_EXPORT \
${PCAUDIOLIB_CFLAGS} ${AM_CFLAGS}

Expand Down Expand Up @@ -199,7 +203,7 @@ endif

src_speak_ng_LDADD = src/libespeak-ng.la
src_speak_ng_LDFLAGS = -static -lm ${PCAUDIOLIB_LIBS}
src_speak_ng_CFLAGS = -Isrc/libespeak-ng -Isrc/include -D _POSIX_C_SOURCE=200112L ${AM_CFLAGS}
src_speak_ng_CFLAGS = -Isrc/libespeak-ng ${AM_CFLAGS}
src_speak_ng_SOURCES = src/speak-ng.c

bin_PROGRAMS += src/espeak-ng
Expand All @@ -209,14 +213,13 @@ man1_MANS += src/espeak-ng.1
endif

src_espeak_ng_LDADD = src/libespeak-ng.la ${PCAUDIOLIB_LIBS}
src_espeak_ng_CFLAGS = -Isrc/include ${AM_CFLAGS}
src_espeak_ng_SOURCES = src/espeak-ng.c

##### tests:

noinst_bin_PROGRAMS += tests/encoding.test

tests_encoding_test_CFLAGS = -Isrc/libespeak-ng -Isrc/include -D _POSIX_C_SOURCE=200112L ${AM_CFLAGS}
tests_encoding_test_CFLAGS = -Isrc/libespeak-ng ${AM_CFLAGS}
tests_encoding_test_SOURCES = \
src/libespeak-ng/encoding.c \
src/libespeak-ng/mnemonics.c \
Expand All @@ -225,8 +228,8 @@ tests_encoding_test_SOURCES = \
noinst_bin_PROGRAMS += tests/tokenizer.test

tests_tokenizer_test_CFLAGS = \
-Isrc/libespeak-ng -Isrc/include -Isrc/include/compat -I src/ucd-tools/src/include \
-D _POSIX_C_SOURCE=200112L ${AM_CFLAGS}
-Isrc/libespeak-ng -Isrc/include/compat -I src/ucd-tools/src/include \
${AM_CFLAGS}
tests_tokenizer_test_SOURCES = \
$(UCD_TOOLS_SOURCES) \
src/libespeak-ng/encoding.c \
Expand Down

0 comments on commit f30b0c5

Please sign in to comment.