aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/Makefile.template
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2016-01-04 08:18:43 -0800
committerGravatar Craig Tiller <craig.tiller@gmail.com>2016-01-04 08:18:43 -0800
commitab23045414dbe120fa307b8c07ca6f3f73b3dbe5 (patch)
treeaae0388c675f3a2bd046f0bb1ba90b93b8ef0b24 /templates/Makefile.template
parentb121d44dc657967ad97d68aed48c108b416cc57d (diff)
Add a test that public headers compile as C99
Diffstat (limited to 'templates/Makefile.template')
-rw-r--r--templates/Makefile.template6
1 files changed, 6 insertions, 0 deletions
diff --git a/templates/Makefile.template b/templates/Makefile.template
index 1e9753ab68..435b4079cb 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -1858,6 +1858,12 @@
$(LIBDIR)/$(CONFIG)/lib${dep}.a\
% endfor
+ % if tgt.language == 'c89':
+ % for src in tgt.src:
+ $(OBJDIR)/$(CONFIG)/${os.path.splitext(src)[0]}.o: CFLAGS := <%text>$(CFLAGS)</%text> -std=c89
+ % endfor
+ % endif
+
% endfor
% if not has_no_sources:
deps_${tgt.name}: $(${tgt.name.upper()}_OBJS:.o=.dep)