aboutsummaryrefslogtreecommitdiff
path: root/lib/logger/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lib/logger/Makefile')
-rw-r--r--lib/logger/Makefile54
1 files changed, 54 insertions, 0 deletions
diff --git a/lib/logger/Makefile b/lib/logger/Makefile
new file mode 100644
index 0000000..e5e7682
--- /dev/null
+++ b/lib/logger/Makefile
@@ -0,0 +1,54 @@
+# Copyright (c) 2026, Mr. Goblin
+#
+# SPDX-License-Identifier: BSD-2-Clause
+
+# all 3 values commented, using make's default or export CC
+# CC = cc -fno-caret-diagnostics -fno-color-diagnostics
+# CC = gcc -fno-diagnostics-show-caret -fdiagnostics-color=never
+# CC = gcc
+
+CFLAGS = -Wall -Wextra -pedantic -std=gnu89
+ARFLAGS = rcs
+
+# DEBUG = -g
+# DEBUG = -ggdb
+DEBUG =
+
+# STATIC = -static
+STATIC = -static -s
+# STATIC =
+
+PROG_NAME=liblogger
+VER=0.0.0
+DIST_NAME=$(PROG_NAME)-$(VER)
+
+
+MAINBINARIES = liblogger.a
+
+.SUFFIXES:
+.SUFFIXES: .c .o
+.PHONY: all clean dist ctags rebuild
+
+all: $(MAINBINARIES)
+
+ctags:
+ ctags *.c *.h *.cpp *.hpp
+
+dist:
+ git archive --format=tar --prefix=$(DIST_NAME)/ HEAD | \
+ bzip2 > $(DIST_NAME).tar.bz2
+
+clean:
+ rm -f $(MAINBINARIES) *.o *.test tags $(DIST_NAME)
+
+rebuild: clean all
+
+.c.o:
+ $(CC) $(DEBUG) $(CFLAGS) -c $< -o $@
+
+
+LIBLOGGER_OBJECTS = logger.o
+LIBLOGGER_LIBS = -lc
+
+liblogger.a: $(LIBLOGGER_OBJECTS)
+ $(AR) $(ARFLAGS) $@ $(LIBLOGGER_OBJECTS)