45 lines
1.1 KiB
Makefile
45 lines
1.1 KiB
Makefile
include config.mk
|
|
|
|
all: prepare log log_test rt istoreutils make_conf
|
|
@echo "libglacier-ng has finished building"
|
|
|
|
prepare:
|
|
mkdir -p build
|
|
mkdir -p build/lib
|
|
mkdir -p build/include
|
|
mkdir -p build/lib/tmp
|
|
mkdir -p build/lib/shared
|
|
mkdir -p build/include/glacier
|
|
|
|
log:
|
|
$(CC) $(CFLAGS) src/log.c -c -o build/lib/tmp/log.o
|
|
cp src/log.h build/include/glacier/log.h
|
|
|
|
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
|
|
|
|
istoreutils:
|
|
|
|
$(CC) $(CFLAGS) -shared -fPIC src/istoreutils.c \
|
|
-Lbuild/lib/shared -lglacier_log \
|
|
-Wl,-rpath,'$$ORIGIN' \
|
|
-o build/lib/shared/libglacier_istoreutils.so
|
|
|
|
make_conf:
|
|
$(CC) $(CFLAGS) src/make_conf.c -c -o build/lib/tmp/make_conf.o
|
|
|
|
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_test_dir:
|
|
install build/lib/shared/lg_log.so $(TEST_DIR)
|
|
install build/lib/shared/
|
|
|
|
clean:
|
|
rm -rf build
|