diff --git a/src/helper/Makefile.am b/src/helper/Makefile.am
index 362389436c07cea1a17d5c69c034a3a591d23c93..e0f7f49bb0f4ffbc9183314a9e0726472999b10a 100644
--- a/src/helper/Makefile.am
+++ b/src/helper/Makefile.am
@@ -37,7 +37,7 @@ else
 %C%_libhelper_la_SOURCES += %D%/ioutil_stubs.c
 endif
 
-%C%_libhelper_la_CFLAGS =
+%C%_libhelper_la_CFLAGS = $(AM_CFLAGS)
 if IS_MINGW
 # FD_* macros are sloppy with their signs on MinGW32 platform
 %C%_libhelper_la_CFLAGS += -Wno-sign-compare
diff --git a/src/rtos/Makefile.am b/src/rtos/Makefile.am
index aca266e18de246159f133b13743f6704435180b6..c59ee3f8c7b430952202375a561abce0326c6516 100644
--- a/src/rtos/Makefile.am
+++ b/src/rtos/Makefile.am
@@ -24,7 +24,7 @@ noinst_LTLIBRARIES += %D%/librtos.la
 	%D%/rtos_mqx_stackings.h \
 	%D%/rtos_ucos_iii_stackings.h
 
-%C%_librtos_la_CFLAGS =
+%C%_librtos_la_CFLAGS = $(AM_CFLAGS)
 
 if IS_MINGW
 # FD_* macros are sloppy with their signs on MinGW32 platform
diff --git a/src/server/Makefile.am b/src/server/Makefile.am
index 5970d0314638c4ead77c3f0a842f1f302a1e7c08..804efac16dc2a9035a58e6c595ec3f837df4972f 100644
--- a/src/server/Makefile.am
+++ b/src/server/Makefile.am
@@ -10,7 +10,7 @@ noinst_LTLIBRARIES += %D%/libserver.la
 	%D%/tcl_server.c \
 	%D%/tcl_server.h
 
-%C%_libserver_la_CFLAGS =
+%C%_libserver_la_CFLAGS = $(AM_CFLAGS)
 if IS_MINGW
 # FD_* macros are sloppy with their signs on MinGW32 platform
 %C%_libserver_la_CFLAGS += -Wno-sign-compare