include config.mk COLOR_GREEN=\033[0;32m COLOR_BLUE=\033[0;34m COLOR_RESET=\033[0m all: @echo "Run 'make test' for the test binary, or 'make lib' to generate a static library." @echo "Run 'make help' for a full list of options." help: @echo "Make options for libglacier:" @echo "" @echo "lib - generate the static library" @echo "test - generate a test binary" @echo "clean - remove all generated files" test: $(CC) libglacier.c $(LIBFLAGS) -o libglacier.test cp etc/example.cfg ./glacier.cfg lib: mkdir build mkdir build/lib $(CC) libglacier.c -c $(LIBFLAGS) -o build/lib/libglacier.o $(AR) -rc build/lib/libglacier.a build/lib/libglacier.o install: @echo "$(COLOR_BLUE)[i]$(COLOR_RESET) Installing static library to $(PREFIX)/lib..." install 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 @echo "$(COLOR_GREEN)[*]$(COLOR_RESET) Finished installing static library to $(PREFIX)/lib." clean: rm -rf build