From 5a42bb20c963deffb47698c74cb6e7c845c49feb Mon Sep 17 00:00:00 2001 From: heck Date: Sat, 10 Jun 2023 20:35:47 +0200 Subject: [PATCH] Build: rename LIB to LIB_STATIC in preparation to support dynamic libs too. --- Makefile.conf | 2 +- src/Makefile | 8 ++++---- test/Makefile | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile.conf b/Makefile.conf index a39d12e..90a7b86 100644 --- a/Makefile.conf +++ b/Makefile.conf @@ -1,5 +1,5 @@ LIBNAME:=heck_log -LIB:=lib$(LIBNAME).a +LIB_STATIC:=lib$(LIBNAME).a C_LANG_VERSION=c99 CXX_LANG_VERSION=c++17 diff --git a/src/Makefile b/src/Makefile index a38eee1..62051b1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -17,16 +17,16 @@ endif all: $(EXE) -$(LIB): $(OBJS) +$(LIB_STATIC): $(OBJS) $(AR) -rc $@ $(OBJS_LIB) -$(EXE) : $(LIB) +$(EXE) : $(LIB_STATIC) clean: rm -rf \ $(OBJS) \ $(EXE) \ - $(LIB) \ - *.d \ + $(LIB_STATIC) \ + $(DEPS) \ *.dSYM \ *.h.gch \ No newline at end of file diff --git a/test/Makefile b/test/Makefile index 1363b54..bf948a1 100644 --- a/test/Makefile +++ b/test/Makefile @@ -5,22 +5,22 @@ SRC_EXE:=$(filter test_%, $(SRC)) EXE:=$(basename $(SRC_EXE)) $(info src exe: $(SRC_EXE)) -$(info lib: $(LIB)) +$(info lib: $(LIB_STATIC)) $(info exe: $(EXE)) LDFLAGS+=-L../src CFLAGS+=-I../src CXXFLAGS+=-I../src -.PHONY: lib all clean ../src/$(LIB) +.PHONY: lib all clean ../src/$(LIB_STATIC) .DEFAULT_GOAL := all all: $(EXE) -../src/$(LIB): - $(MAKE) -C ../src $(LIB) +../src/$(LIB_STATIC): + $(MAKE) -C ../src $(LIB_STATIC) -$(EXE): ../src/$(LIB) +$(EXE): ../src/$(LIB_STATIC) clean: rm -rf \