7/19
This commit is contained in:
31
Makefile
31
Makefile
@@ -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
|
||||
.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
|
||||
|
||||
all: prepare log log_test rt pkg istoreutils make_conf dag
|
||||
all: prepare log log_test rt pkg transaction istoreutils make_conf dag sha256 libglacier_verify gsha256sum
|
||||
@echo "libglacier-ng has finished building"
|
||||
|
||||
static: prepare log_static pkg_static istoreutils_static libglacier.a
|
||||
@@ -29,6 +29,7 @@ prepare:
|
||||
mkdir -p build/lib/tmp
|
||||
mkdir -p build/lib/shared
|
||||
mkdir -p build/include/glacier
|
||||
mkdir -p build/bin
|
||||
|
||||
log:
|
||||
$(CC) $(CFLAGS) src/log.c -c -o build/lib/tmp/log.o
|
||||
@@ -40,6 +41,22 @@ log_test:
|
||||
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
|
||||
|
||||
libglacier_verify:
|
||||
$(CC) $(CFLAGS) -shared -fPIC src/sha256.c \
|
||||
-o build/lib/shared/libglacier_verify.so
|
||||
|
||||
gsha256sum: prepare
|
||||
$(CC) $(CFLAGS) src/gsha256sum.c src/sha256.c -o build/bin/gsha256sum
|
||||
|
||||
transaction: log istoreutils
|
||||
$(CC) $(CFLAGS) -shared -fPIC src/transaction.c \
|
||||
-Lbuild/lib/shared -lglacier_istoreutils -lglacier_log \
|
||||
-Wl,-rpath,'$$ORIGIN' \
|
||||
-o build/lib/shared/libglacier_transaction.so
|
||||
|
||||
istoreutils: pkg
|
||||
$(CC) $(CFLAGS) -shared -fPIC src/istoreutils.c \
|
||||
-Lbuild/lib/shared -lglacier_log -lglacier_pkg -larchive \
|
||||
@@ -55,6 +72,12 @@ pkg:
|
||||
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 \
|
||||
-larchive -lconfig \
|
||||
-o build/lib/shared/libglacier-ng.so
|
||||
|
||||
dag:
|
||||
$(CC) $(CFLAGS) -shared -fPIC src/dag.c \
|
||||
-Lbuild/lib/shared -lglacier_log \
|
||||
@@ -65,8 +88,10 @@ install:
|
||||
mkdir -p $(PREFIX)/lib/glacier/
|
||||
install build/lib/shared/libglacier_log.so $(PREFIX)/lib/glacier/ -m 755
|
||||
install build/lib/shared/libglacier_istoreutils.so $(PREFIX)/lib/glacier/ -m 755
|
||||
install build/lib/shared/libglacier_transaction.so $(PREFIX)/lib/glacier/ -m 755
|
||||
install build/lib/shared/libglacier_pkg.so $(PREFIX)/lib/glacier -m 755
|
||||
install build/lib/shared/libglacier_dag.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_static:
|
||||
mkdir -p $(PREFIX)/lib/glacier
|
||||
|
||||
Reference in New Issue
Block a user