git subrepo pull (merge) --force deps/libchdr
[pcsx_rearmed.git] / deps / libchdr / deps / zstd-1.5.5 / contrib / externalSequenceProducer / Makefile
1 # ################################################################
2 # Copyright (c) Yann Collet, Meta Platforms, Inc.
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 PROGDIR = ../../programs
11 LIBDIR  = ../../lib
12
13 LIBZSTD = $(LIBDIR)/libzstd.a
14
15 CPPFLAGS+= -I$(LIBDIR) -I$(LIBDIR)/compress -I$(LIBDIR)/common
16
17 CFLAGS  ?= -O3
18 CFLAGS  += -std=gnu99
19 DEBUGFLAGS= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \
20             -Wstrict-aliasing=1 -Wswitch-enum \
21             -Wstrict-prototypes -Wundef -Wpointer-arith \
22             -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \
23             -Wredundant-decls
24 CFLAGS  += $(DEBUGFLAGS) $(MOREFLAGS)
25
26 default: externalSequenceProducer
27
28 all: externalSequenceProducer
29
30 externalSequenceProducer: sequence_producer.c main.c $(LIBZSTD)
31         $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@
32
33 .PHONY: $(LIBZSTD)
34 $(LIBZSTD):
35         $(MAKE) -C $(LIBDIR) libzstd.a CFLAGS="$(CFLAGS)"
36
37 clean:
38         $(RM) *.o
39         $(MAKE) -C $(LIBDIR) clean > /dev/null
40         $(RM) externalSequenceProducer