# ################################################################
# Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
# ################################################################

# This Makefile presumes libzstd is installed, using `sudo make install`


LDFLAGS += -lzstd

.PHONY: default all clean

default: all

all: main main-ldm


main : ldm.c main.c
	$(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@

main-ldm : ldm.c main-ldm.c
	$(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@

clean:
	@rm -f core *.o tmp* result* *.ldm *.ldm.dec \
	main main-ldm
	@echo Cleaning completed

