1 # ################################################################
2 # Copyright (c) 2017-present, Facebook, 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 # This Makefile presumes libzstd is installed, using `sudo make install`
12 CPPFLAGS
+= -I..
/..
/lib
/common
14 DEBUGFLAGS
= -Wall
-Wextra
-Wcast-qual
-Wcast-align
-Wshadow \
15 -Wstrict-aliasing
=1 -Wswitch-enum
-Wdeclaration-after-statement \
16 -Wstrict-prototypes
-Wundef
-Wpointer-arith
-Wformat-security \
17 -Wvla
-Wformat
=2 -Winit-self
-Wfloat-equal
-Wwrite-strings \
19 CFLAGS
+= $(DEBUGFLAGS
) $(MOREFLAGS
)
20 FLAGS
= $(CPPFLAGS
) $(CFLAGS
)
24 .PHONY
: default
all clean
30 ldm
: ldm_common.c ldm.c main.c
31 $(CC
) $(CPPFLAGS
) $(CFLAGS
) $^
$(LDFLAGS
) -o
$@
34 @
rm -f core
*.o tmp
* result
* *.ldm
*.ldm.dec \
36 @echo Cleaning completed