Files
zstd-rs/contrib/freestanding_lib/test/Makefile
T
Nick Terrell ae455dde08 [contrib] Add freestanding translator prototype
This is the idea, some of the functionality isn't yet implemented.
2020-08-26 12:26:05 -07:00

28 lines
866 B
Makefile

# ################################################################
# Copyright (c) 2015-2020, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under both the BSD-style license (found in the
# LICENSE file in the root directory of this source tree) and the GPLv2 (found
# in the COPYING file in the root directory of this source tree).
# You may select, at your option, one of the above-listed licenses.
# ################################################################
all: run-test
.PHONY: libzstd
libzstd: clean
../freestanding.py --source-lib ../../../lib --output-lib ./libzstd
test: libzstd
$(CC) $(CFLAGS) $(CPPFLAGS) -ffreestanding $(wildcard libzstd/*/*.c) -c
$(CC) $(CFLAGS) $(CPPFLAGS) -ffreestanding -c test.c
$(CC) $(LDFLAGS) -ffreestanding -nostdlib *.o -o test
run-test: test
./test
clean:
rm -rf ./libzstd/ *.o test