diff options
author | Takayuki Matsuoka <t-mat@users.noreply.github.com> | 2021-05-30 08:10:19 (GMT) |
---|---|---|
committer | Takayuki Matsuoka <t-mat@users.noreply.github.com> | 2021-05-30 08:10:19 (GMT) |
commit | 6443b85af46a3b2a17d88420ee24635427f25fdc (patch) | |
tree | 2cf4484fe53d5a9c33f787a923c1b671e2edc4f3 /Makefile | |
parent | 634fa2047d217f1c62222071a8313bc5e17d4509 (diff) | |
download | lz4-6443b85af46a3b2a17d88420ee24635427f25fdc.zip lz4-6443b85af46a3b2a17d88420ee24635427f25fdc.tar.gz lz4-6443b85af46a3b2a17d88420ee24635427f25fdc.tar.bz2 |
Split c_standards into multiple Makefile targets
To support older compiler which doesn't have explicit dialect option
for C90 (gcc-4.4), this change set split "c_standards" into multiple
part.
Original "make c_standards" still works as intended. But this change
gives extra freedom of choice for external program For example, CI
can choose test for standards which is supported by specimen compiler.
With this separation, we can also introduce C17 smoothly.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -215,11 +215,20 @@ ctocpptest: clean CC=$(TESTCC) $(MAKE) -C $(TESTDIR) CFLAGS="$(CFLAGS)" all .PHONY: c_standards -c_standards: clean +c_standards: clean c_standards_c11 c_standards_c99 c_standards_c90 + +.PHONY: c_standards_c90 +c_standards_c90: clean $(MAKE) clean; CFLAGS="-std=c90 -Werror -pedantic -Wno-long-long -Wno-variadic-macros" $(MAKE) allmost $(MAKE) clean; CFLAGS="-std=gnu90 -Werror -pedantic -Wno-long-long -Wno-variadic-macros" $(MAKE) allmost + +.PHONY: c_standards_c99 +c_standards_c99: clean $(MAKE) clean; CFLAGS="-std=c99 -Werror -pedantic" $(MAKE) all $(MAKE) clean; CFLAGS="-std=gnu99 -Werror -pedantic" $(MAKE) all + +.PHONY: c_standards_c11 +c_standards_c11: clean $(MAKE) clean; CFLAGS="-std=c11 -Werror" $(MAKE) all endif # MSYS POSIX |