From c876e6ddf5ca317f2d9022f0ab94179c6fc5971d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 19 Feb 2022 23:22:24 +0100 Subject: Improve makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 00aa644..7adb022 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,23 @@ .POSIX: +CONFIGFILE = config.mk +include $(CONFIGFILE) + +OS = linux +# Linux: linux +# Mac OS: macos +# Windows: windows +include mk/$(OS).mk + + LIB_MAJOR = 1 LIB_MINOR = 2 LIB_VERSION = $(LIB_MAJOR).$(LIB_MINOR) -CONFIGFILE = config.mk -OSCONFIGFILE = linux.mk -include $(CONFIGFILE) -include $(OSCONFIGFILE) include man.mk + all: libcoopgamma.a libcoopgamma.$(LIBEXT) test .c.o: @@ -41,6 +48,7 @@ install: libcoopgamma.a libcoopgamma.$(LIBEXT) cp -- libcoopgamma.h "$(DESTDIR)$(PREFIX)/include" cp -- libcoopgamma.a "$(DESTDIR)$(PREFIX)/lib" cp -- libcoopgamma.$(LIBEXT) "$(DESTDIR)$(PREFIX)/lib/libcoopgamma.$(LIBMINOREXT)" + $(FIX_INSTALL_NAME) "$(DESTDIR)$(PREFIX)/lib/libcoopgamma.$(LIBMINOREXT)" ln -sf -- libcoopgamma.$(LIBMINOREXT) "$(DESTDIR)$(PREFIX)/lib/libcoopgamma.$(LIBMAJOREXT)" ln -sf -- libcoopgamma.$(LIBMINOREXT) "$(DESTDIR)$(PREFIX)/lib/libcoopgamma.$(LIBEXT)" cp -- $(MAN0) "$(DESTDIR)$(MANPREFIX)/man0" -- cgit v1.2.3-70-g09d2