aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-02-19 23:22:24 +0100
committerMattias Andrée <maandree@kth.se>2022-02-19 23:22:24 +0100
commitc876e6ddf5ca317f2d9022f0ab94179c6fc5971d (patch)
tree232e685fb6e08d2a82c538bbca8e6d6a87a09cde /Makefile
parentm makefile (diff)
downloadlibcoopgamma-c876e6ddf5ca317f2d9022f0ab94179c6fc5971d.tar.gz
libcoopgamma-c876e6ddf5ca317f2d9022f0ab94179c6fc5971d.tar.bz2
libcoopgamma-c876e6ddf5ca317f2d9022f0ab94179c6fc5971d.tar.xz
Improve makefile1.2.2.1
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--Makefile16
1 files changed, 12 insertions, 4 deletions
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"