1 # ################################################################
2 # Copyright (c) Yann Collet, Meta Platforms, Inc.
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 # ################################################################
10 PROGDIR = ../../programs
13 LIBZSTD = $(LIBDIR)/libzstd.a
15 CPPFLAGS+= -I$(LIBDIR) -I$(LIBDIR)/compress -I$(LIBDIR)/common
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 \
24 CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS)
26 default: externalSequenceProducer
28 all: externalSequenceProducer
30 externalSequenceProducer: sequence_producer.c main.c $(LIBZSTD)
31 $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@
35 $(MAKE) -C $(LIBDIR) libzstd.a CFLAGS="$(CFLAGS)"
39 $(MAKE) -C $(LIBDIR) clean > /dev/null
40 $(RM) externalSequenceProducer