3/18: Functional package installation backend
This commit is contained in:
44
Makefile
44
Makefile
@@ -1,8 +1,27 @@
|
||||
include config.mk
|
||||
|
||||
all: prepare log log_test rt istoreutils make_conf
|
||||
.PHONY: all prepare log log_test rt pkg istoreutils make_conf dag install clean static libglacier.a install_static
|
||||
|
||||
all: prepare log log_test rt pkg istoreutils make_conf dag
|
||||
@echo "libglacier-ng has finished building"
|
||||
|
||||
static: prepare log_static pkg_static istoreutils_static libglacier.a
|
||||
|
||||
log_static:
|
||||
$(CC) $(CFLAGS) -c src/log.c -o build/lib/tmp/log.o
|
||||
|
||||
pkg_static:
|
||||
$(CC) $(CFLAGS) -c src/pkg.c -o build/lib/tmp/pkg.o
|
||||
|
||||
istoreutils_static: pkg_static
|
||||
$(CC) $(CFLAGS) -c src/istoreutils.c -o build/lib/tmp/istoreutils.o
|
||||
|
||||
libglacier.a:
|
||||
ar rcs build/lib/libglacier.a \
|
||||
build/lib/tmp/log.o \
|
||||
build/lib/tmp/pkg.o \
|
||||
build/lib/tmp/istoreutils.o
|
||||
|
||||
prepare:
|
||||
mkdir -p build
|
||||
mkdir -p build/lib
|
||||
@@ -21,20 +40,37 @@ log_test:
|
||||
rt:
|
||||
$(CC) $(CFLAGS) src/runtime.c -c -o build/lib/tmp/runtime.o
|
||||
|
||||
istoreutils:
|
||||
|
||||
istoreutils: pkg
|
||||
$(CC) $(CFLAGS) -shared -fPIC src/istoreutils.c \
|
||||
-Lbuild/lib/shared -lglacier_log \
|
||||
-Lbuild/lib/shared -lglacier_log -lglacier_pkg -larchive \
|
||||
-Wl,-rpath,'$$ORIGIN' \
|
||||
-o build/lib/shared/libglacier_istoreutils.so
|
||||
|
||||
pkg:
|
||||
$(CC) $(CFLAGS) -shared -fPIC src/pkg.c \
|
||||
-Lbuild/lib/shared -lglacier_log -lconfig \
|
||||
-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
|
||||
|
||||
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
|
||||
install build/lib/shared/libglacier_istoreutils.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_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)
|
||||
|
||||
Reference in New Issue
Block a user