ecc9e63952c5925715539fa632aa39c469ae8b3d
[pcsx_rearmed.git] / deps / libchdr / deps / zstd-1.5.5 / contrib / diagnose_corruption / Makefile
1 # ################################################################
2 # Copyright (c) Meta Platforms, Inc. and affiliates.
3 # All rights reserved.
4 #
5 # This source code is licensed under both the BSD-style license (found in the
6 # LICENSE file in the root directory of this source tree) and the GPLv2 (found
7 # in the COPYING file in the root directory of this source tree).
8 # ################################################################
9
10 .PHONY: all
11 all: check_flipped_bits
12
13 ZSTDLIBDIR ?= ../../lib
14
15 CFLAGS     ?= -O3
16 CFLAGS     += -I$(ZSTDLIBDIR) -I$(ZSTDLIBDIR)/common -I$(ZSTDLIBDIR)/compress \
17               -I$(ZSTDLIBDIR)/decompress
18 CFLAGS     += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow                 \
19               -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \
20               -Wstrict-prototypes -Wundef                                     \
21               -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings      \
22               -Wredundant-decls -Wmissing-prototypes
23 CFLAGS     += $(DEBUGFLAGS) $(MOREFLAGS)
24 FLAGS       = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
25
26 .PHONY: $(ZSTDLIBDIR)/libzstd.a
27 $(ZSTDLIBDIR)/libzstd.a:
28         $(MAKE) -C $(ZSTDLIBDIR) libzstd.a
29
30 check_flipped_bits: check_flipped_bits.c $(ZSTDLIBDIR)/libzstd.a
31         $(CC) $(FLAGS) $< -o $@$(EXT) $(ZSTDLIBDIR)/libzstd.a
32
33 .PHONY: clean
34 clean:
35         rm -f check_flipped_bits