libglacier/Makefile

48 lines
1.3 KiB
Makefile
Raw Normal View History

2025-02-13 17:03:51 -05:00
#
# Makefile
#
IDIR = ./include
BDIR = ./build
SDIR = ./src
2024-02-08 09:01:44 -05:00
include config.mk
all:
2025-01-04 12:34:35 -05:00
@echo "No make option specified."
2024-02-08 09:01:44 -05:00
@echo "Run 'make help' for a full list of options."
help:
@echo "Make options for libglacier:"
@echo ""
2025-02-13 17:03:51 -05:00
@echo "lib - generate the static library"
@echo "install - install the static library and header files to PREFIX"
@echo "clean - remove all generated files"
deprecate:
@echo "[WARN]"
@echo "[WARN] This rule has been deprecated, proceed with caution."
@echo "[WARN]"
2024-02-08 09:01:44 -05:00
2025-02-13 17:03:51 -05:00
test: deprecate
2024-02-08 09:01:44 -05:00
$(CC) libglacier.c $(LIBFLAGS) -o libglacier.test
cp etc/example.cfg ./glacier.cfg
2025-02-13 17:03:51 -05:00
lib: $(SDIR)/config.c $(SDIR)/data.c $(SDIR)/log.c $(SDIR)/pkgops.c $(SDIR)/runtime.c $(SDIR)/security.c
mkdir $(BDIR)
mkdir $(BDIR)/lib
$(CC) $(SDIR)/config.c $(SDIR)/data.c $(SDIR)/log.c $(SDIR)/pkgops.c $(SDIR)/runtime.c $(SDIR)/security.c -o $(BDIR)/lib/libglacier.o $(LIBFLAGS)
$(AR) -rc $(BDIR)/lib/libglacier.a $(BDIR)/lib/libglacier.o
2024-10-02 17:30:43 -04:00
2025-02-13 17:03:51 -05:00
install: $(BDIR)/libglacier.a
install $(BDIR)/lib/libglacier.a $(PREFIX)/lib
install include/config.h $(PREFIX)/include/glacier
install include/data.h $(PREFIX)/include/glacier
install include/log.h $(PREFIX)/include/glacier
install include/pkgops.h $(PREFIX)/include/glacier
install include/runtime.h $(PREFIX)/include/glacier
install include/security.h $(PREFIX)/include/glacier
2024-10-02 17:30:43 -04:00
2024-02-08 09:01:44 -05:00
clean:
2025-02-13 17:03:51 -05:00
rm -rf build