Compare commits

..

No commits in common. "1a18d642e00968befa3127f8de8506280e764f6b" and "8140187d226413824399667c3b950712d66f5802" have entirely different histories.

5 changed files with 23 additions and 69 deletions

View File

@ -1,60 +1,40 @@
#
# Makefile
#
IDIR = ./include
BDIR = ./build
SDIR = ./src
include config.mk include config.mk
COLOR_GREEN=\033[0;32m
COLOR_BLUE=\033[0;34m
COLOR_RESET=\033[0m
all: all:
@echo "No make option specified." @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." @echo "Run 'make help' for a full list of options."
help: help:
@echo "Make options for libglacier:" @echo "Make options for libglacier:"
@echo "" @echo ""
@echo "lib - generate the static library" @echo "lib - generate the static library"
@echo "install - install the static library and header files to PREFIX" @echo "test - generate a test binary"
@echo "clean - remove all generated files" @echo "clean - remove all generated files"
deprecate: test:
@echo "[WARN]"
@echo "[WARN] This rule has been deprecated, proceed with caution."
@echo "[WARN]"
test: deprecate
$(CC) libglacier.c $(LIBFLAGS) -o libglacier.test $(CC) libglacier.c $(LIBFLAGS) -o libglacier.test
cp etc/example.cfg ./glacier.cfg cp etc/example.cfg ./glacier.cfg
lib: $(SDIR)/libglacier.c lib:
mkdir build mkdir build
mkdir build/lib mkdir build/lib
$(CC) $(SDIR)/libglacier.c -c $(LIBFLAGS) -o $(BDIR)/lib/libglacier.o $(CC) libglacier.c -c $(LIBFLAGS) -o build/lib/libglacier.o
$(AR) -rc $(BDIR)/lib/libglacier.a build/lib/libglacier.o $(AR) -rc build/lib/libglacier.a build/lib/libglacier.o
install_lib: $(BDIR)/lib/libglacier.a install:
@echo "[INFO]" @echo "$(COLOR_BLUE)[i]$(COLOR_RESET) Installing static library to $(PREFIX)/lib..."
@echo "[INFO] Installing library to PREFIX/lib..." install lib/libglacier.a $(PREFIX)/lib
@echo "[INFO]" install include/config.h $(PREFIX)/include/glacier
install $(BDIR)/lib/libglacier.a $(PREFIX)/lib install include/data.h $(PREFIX)/include/glacier
install include/log.h $(PREFIX)/include/glacier
install_head: $(IDIR)/config.h $(IDIR)/data.h $(IDIR)/log.h $(IDIR)/pkgops.h $(IDIR)/runtime.h $(IDIR)/security.h install include/pkgops.h $(PREFIX)/include/glacier
@echo "[INFO]" install include/runtime.h $(PREFIX)/include/glacier
@echo "[INFO] Installing header files to PREFIX/include/glacier..." install include/security.h $(PREFIX)/include/glacier
@echo "[INFO]" @echo "$(COLOR_GREEN)[*]$(COLOR_RESET) Finished installing static library to $(PREFIX)/lib."
install $(IDIR)/config.h $(PREFIX)/include/glacier
install $(IDIR)/data.h $(PREFIX)/include/glacier
install $(IDIR)/log.h $(PREFIX)/include/glacier
install $(IDIR)/pkgops.h $(PREFIX)/include/glacier
install $(IDIR)/runtime.h $(PREFIX)/include/glacier
install $(IDIR)/security.h $(PREFIX)/include/glacier
install: install_lib install_head
@echo "[INFO]"
@echo "[INFO] Finished installing library and header files to PREFIX."
@echo "[INFO]"
clean: clean:
rm -rf $(BDIR) rm -rf build

View File

@ -1 +1 @@
0.1.0-rc 4.0.3-rc

View File

@ -31,6 +31,7 @@
#include <wchar.h> #include <wchar.h>
#include "config.h" #include "config.h"
#include "include/globals.h"
#define BUFFER_SIZE 1024 #define BUFFER_SIZE 1024
#define MAX_CHILDREN 64 #define MAX_CHILDREN 64

View File

@ -1,27 +0,0 @@
/*
* config.h - Various compile-time settings for libglacier
*
* This file is part of Glacier.
*
* Glacier is free software: you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* Glacier is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Glacier. If
* not, see <https://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_H_
#define CONFIG_H_
/* LG_VERBOSE - whether to use verbose logging for library events or not
*
* 0 is false, 1 is true
*/
#define LG_VERBOSE 0
#endif