10/14
This commit is contained in:
1 parent
ee4bcc3b77
commit
ae54f74070
53 files changed
+8916
-1424
No files matched your search
@@ -1,8 +1,8 @@
|
||||
include config.mk
|
||||
|
||||
.PHONY: all prepare log log_test rt pkg istoreutils make_conf dag install clean static libglacier.a install_static libglacier-ng sha256 gsha256sum libglacier_verify
|
||||
.PHONY: all prepare log log_test pkg transaction istoreutils install clean static libglacier.a install_static libglacier-ng sha256 gsha256sum libglacier_verify gsign grepo
|
||||
|
||||
all: prepare log log_test rt pkg transaction istoreutils make_conf dag sha256 libglacier_verify gsha256sum
|
||||
all: prepare log log_test pkg transaction istoreutils sha256 libglacier_verify gsha256sum gsign grepo
|
||||
@echo "libglacier-ng has finished building"
|
||||
|
||||
static: prepare log_static pkg_static istoreutils_static libglacier.a
|
||||
@@ -15,12 +15,14 @@ pkg_static:
|
||||
|
||||
istoreutils_static: pkg_static
|
||||
$(CC) $(CFLAGS) -c src/istoreutils.c -o build/lib/tmp/istoreutils.o
|
||||
$(CC) $(CFLAGS) -c src/deps.c -o build/lib/tmp/deps.o
|
||||
|
||||
libglacier.a:
|
||||
ar rcs build/lib/libglacier.a \
|
||||
build/lib/tmp/log.o \
|
||||
build/lib/tmp/pkg.o \
|
||||
build/lib/tmp/istoreutils.o
|
||||
build/lib/tmp/istoreutils.o \
|
||||
build/lib/tmp/deps.o
|
||||
|
||||
prepare:
|
||||
mkdir -p build
|
||||
@@ -38,19 +40,30 @@ log:
|
||||
log_test:
|
||||
$(CC) $(CFLAGS) -shared -fPIC src/log.c -o build/lib/shared/libglacier_log.so
|
||||
|
||||
rt:
|
||||
$(CC) $(CFLAGS) src/runtime.c -c -o build/lib/tmp/runtime.o
|
||||
|
||||
sha256:
|
||||
$(CC) $(CFLAGS) src/sha256.c -c -o build/lib/tmp/sha256.o
|
||||
|
||||
# Monocypher, vendored unmodified (src/monocypher/README): Ed25519 for
|
||||
# sign.c.
|
||||
MONOCYPHER = src/monocypher/monocypher.c src/monocypher/monocypher-ed25519.c
|
||||
|
||||
libglacier_verify:
|
||||
$(CC) $(CFLAGS) -shared -fPIC src/sha256.c \
|
||||
$(CC) $(CFLAGS) -shared -fPIC src/sha256.c src/sign.c $(MONOCYPHER) \
|
||||
-o build/lib/shared/libglacier_verify.so
|
||||
|
||||
gsha256sum: prepare
|
||||
$(CC) $(CFLAGS) src/gsha256sum.c src/sha256.c -o build/bin/gsha256sum
|
||||
|
||||
gsign: prepare
|
||||
$(CC) $(CFLAGS) src/gsign.c src/sign.c src/log.c $(MONOCYPHER) -o build/bin/gsign
|
||||
|
||||
# grepo reads packages (manifest, hash) and signs the index: built
|
||||
# from source like gsign, so it needs no rpath to the shared objects.
|
||||
grepo: prepare
|
||||
$(CC) $(CFLAGS) src/grepo.c src/sign.c src/sha256.c src/log.c src/pkg.c \
|
||||
src/istoreutils.c src/deps.c src/transaction.c $(MONOCYPHER) \
|
||||
-larchive -lconfig -o build/bin/grepo
|
||||
|
||||
transaction: log istoreutils
|
||||
$(CC) $(CFLAGS) -shared -fPIC src/transaction.c \
|
||||
-Lbuild/lib/shared -lglacier_istoreutils -lglacier_log \
|
||||
@@ -58,7 +71,7 @@ transaction: log istoreutils
|
||||
-o build/lib/shared/libglacier_transaction.so
|
||||
|
||||
istoreutils: pkg
|
||||
$(CC) $(CFLAGS) -shared -fPIC src/istoreutils.c \
|
||||
$(CC) $(CFLAGS) -shared -fPIC src/istoreutils.c src/deps.c \
|
||||
-Lbuild/lib/shared -lglacier_log -lglacier_pkg -larchive \
|
||||
-Wl,-rpath,'$$ORIGIN' \
|
||||
-o build/lib/shared/libglacier_istoreutils.so
|
||||
@@ -69,21 +82,12 @@ pkg:
|
||||
-Wl,-rpath,'$$ORIGIN' \
|
||||
-o build/lib/shared/libglacier_pkg.so
|
||||
|
||||
make_conf:
|
||||
$(CC) $(CFLAGS) src/make_conf.c -c -o build/lib/tmp/make_conf.o
|
||||
|
||||
libglacier-ng: prepare
|
||||
$(CC) $(CFLAGS) -shared -fPIC \
|
||||
src/log.c src/pkg.c src/transaction.c src/istoreutils.c \
|
||||
src/log.c src/pkg.c src/transaction.c src/istoreutils.c src/deps.c \
|
||||
-larchive -lconfig \
|
||||
-o build/lib/shared/libglacier-ng.so
|
||||
|
||||
dag:
|
||||
$(CC) $(CFLAGS) -shared -fPIC src/dag.c \
|
||||
-Lbuild/lib/shared -lglacier_log \
|
||||
-Wl,-rpath,'$$ORIGIN' \
|
||||
-o build/lib/shared/libglacier_dag.so
|
||||
|
||||
install:
|
||||
mkdir -p $(PREFIX)/lib/glacier/
|
||||
install build/lib/shared/libglacier_log.so $(PREFIX)/lib/glacier/ -m 755
|
||||
@@ -92,14 +96,12 @@ install:
|
||||
install build/lib/shared/libglacier_pkg.so $(PREFIX)/lib/glacier -m 755
|
||||
install build/lib/shared/libglacier_verify.so $(PREFIX)/lib/glacier -m 755
|
||||
install build/bin/gsha256sum $(PREFIX)/bin/ -m 755
|
||||
install build/bin/gsign $(PREFIX)/bin/ -m 755
|
||||
install build/bin/grepo $(PREFIX)/bin/ -m 755
|
||||
|
||||
install_static:
|
||||
mkdir -p $(PREFIX)/lib/glacier
|
||||
install build/lib/libglacier.a $(PREFIX)/lib/glacier/ -m 644
|
||||
|
||||
install_test_dir:
|
||||
install build/lib/shared/lg_log.so $(TEST_DIR)
|
||||
install build/lib/shared/
|
||||
|
||||
clean:
|
||||
rm -rf build
|
||||
Reference in new issue
Block a user