aboutsummaryrefslogtreecommitdiffstats
path: root/mk
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-03-05 00:43:38 +0100
committerMattias Andrée <maandree@kth.se>2021-03-05 00:43:38 +0100
commit0ce0d8d6e0c420ccafa79e0203b928c3559a4311 (patch)
tree88e8228a93691c28811a49898abf86a96dd9d613 /mk
parentChange license + change style + misc (diff)
downloadlibgamma-0ce0d8d6e0c420ccafa79e0203b928c3559a4311.tar.gz
libgamma-0ce0d8d6e0c420ccafa79e0203b928c3559a4311.tar.bz2
libgamma-0ce0d8d6e0c420ccafa79e0203b928c3559a4311.tar.xz
Split source files, merge public header files, eliminite use gpp, rewrite makefile
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'mk')
-rw-r--r--mk/linux.mk8
-rw-r--r--mk/macos.mk6
-rw-r--r--mk/method-dummy=no.mk0
-rw-r--r--mk/method-dummy=yes.mk3
-rw-r--r--mk/method-linux-drm=no.mk0
-rw-r--r--mk/method-linux-drm=yes.mk5
-rw-r--r--mk/method-quartz-cg=fake.mk3
-rw-r--r--mk/method-quartz-cg=no.mk0
-rw-r--r--mk/method-quartz-cg=yes.mk8
-rw-r--r--mk/method-w32-gdi=fake.mk3
-rw-r--r--mk/method-w32-gdi=no.mk0
-rw-r--r--mk/method-w32-gdi=yes.mk3
-rw-r--r--mk/method-x-randr=no.mk0
-rw-r--r--mk/method-x-randr=yes.mk5
-rw-r--r--mk/method-x-vidmode=no.mk0
-rw-r--r--mk/method-x-vidmode=yes.mk5
-rw-r--r--mk/windows.mk6
17 files changed, 55 insertions, 0 deletions
diff --git a/mk/linux.mk b/mk/linux.mk
new file mode 100644
index 0000000..32d9953
--- /dev/null
+++ b/mk/linux.mk
@@ -0,0 +1,8 @@
+LINUX_DRM_METHOD = yes
+X_RANDR_METHOD = yes
+X_VIDMODE_METHOD = yes
+
+LIBEXT = so
+LIBFLAGS = -shared -Wl,-soname,libgamma.$(LIBEXT).$(LIB_MAJOR)
+LIBMAJOREXT = $(LIBEXT).$(LIB_MAJOR)
+LIBMINOREXT = $(LIBEXT).$(LIB_VERSION)
diff --git a/mk/macos.mk b/mk/macos.mk
new file mode 100644
index 0000000..3a670b1
--- /dev/null
+++ b/mk/macos.mk
@@ -0,0 +1,6 @@
+QUARTZ_CG_METHOD = yes
+
+LIBEXT = dylib
+LIBFLAGS = -dynamiclib
+LIBMAJOREXT = $(LIB_MAJOR).$(LIBEXT)
+LIBMINOREXT = $(LIB_VERSION).$(LIBEXT)
diff --git a/mk/method-dummy=no.mk b/mk/method-dummy=no.mk
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/mk/method-dummy=no.mk
diff --git a/mk/method-dummy=yes.mk b/mk/method-dummy=yes.mk
new file mode 100644
index 0000000..18773cf
--- /dev/null
+++ b/mk/method-dummy=yes.mk
@@ -0,0 +1,3 @@
+HDR_METHODS += gamma-dummy.h
+METHODS_PARAMS += LIBGAMMA_METHOD_DUMMY dummy 0 ramps16
+CPPFLAGS_METHODS += -DHAVE_LIBGAMMA_METHOD_DUMMY
diff --git a/mk/method-linux-drm=no.mk b/mk/method-linux-drm=no.mk
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/mk/method-linux-drm=no.mk
diff --git a/mk/method-linux-drm=yes.mk b/mk/method-linux-drm=yes.mk
new file mode 100644
index 0000000..8799388
--- /dev/null
+++ b/mk/method-linux-drm=yes.mk
@@ -0,0 +1,5 @@
+HDR_METHODS += gamma-linux-drm.h
+METHODS_PARAMS += LIBGAMMA_METHOD_LINUX_DRM linux_drm 16 ramps16
+CPPFLAGS_METHODS += -DHAVE_LIBGAMMA_METHOD_LINUX_DRM
+CFLAGS_METHODS += $$(pkg-config --cflags libdrm)
+LDFLAGS_METHODS += $$(pkg-config --libs libdrm)
diff --git a/mk/method-quartz-cg=fake.mk b/mk/method-quartz-cg=fake.mk
new file mode 100644
index 0000000..e33253a
--- /dev/null
+++ b/mk/method-quartz-cg=fake.mk
@@ -0,0 +1,3 @@
+HDR_METHODS += gamma-quartz-cg.h
+METHODS_PARAMS += LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS quartz_cg -1 rampsf
+CPPFLAGS_METHODS += -DHAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS -DFAKE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
diff --git a/mk/method-quartz-cg=no.mk b/mk/method-quartz-cg=no.mk
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/mk/method-quartz-cg=no.mk
diff --git a/mk/method-quartz-cg=yes.mk b/mk/method-quartz-cg=yes.mk
new file mode 100644
index 0000000..b98d03d
--- /dev/null
+++ b/mk/method-quartz-cg=yes.mk
@@ -0,0 +1,8 @@
+F_APPLICATION_SERVICES = /System/Library/Frameworks/ApplicationServices.framework
+I_APPLICATION_SERVICES = $(F_APPLICATION_SERVICES)/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers
+
+HDR_METHODS += gamma-quartz-cg.h
+METHODS_PARAMS += LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS quartz_cg -1 rampsf
+CPPFLAGS_METHODS += -DHAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+CFLAGS_METHODS += -I$(I_APPLICATION_SERVICES) -F$(F_APPLICATION_SERVICES)
+LDFLAGS_METHODS += -framework ApplicationServices
diff --git a/mk/method-w32-gdi=fake.mk b/mk/method-w32-gdi=fake.mk
new file mode 100644
index 0000000..add5f79
--- /dev/null
+++ b/mk/method-w32-gdi=fake.mk
@@ -0,0 +1,3 @@
+HDR_METHODS += gamma-w32-gdi.h
+METHODS_PARAMS += LIBGAMMA_METHOD_W32_GDI w32_gdi 16 ramps16
+CPPFLAGS_METHODS += -DHAVE_LIBGAMMA_METHOD_W32_GDI -DFAKE_LIBGAMMA_METHOD_W32_GDI
diff --git a/mk/method-w32-gdi=no.mk b/mk/method-w32-gdi=no.mk
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/mk/method-w32-gdi=no.mk
diff --git a/mk/method-w32-gdi=yes.mk b/mk/method-w32-gdi=yes.mk
new file mode 100644
index 0000000..348b71f
--- /dev/null
+++ b/mk/method-w32-gdi=yes.mk
@@ -0,0 +1,3 @@
+HDR_METHODS += gamma-w32-gdi.h
+METHODS_PARAMS += LIBGAMMA_METHOD_W32_GDI w32_gdi 16 ramps16
+CPPFLAGS_METHODS += -DHAVE_LIBGAMMA_METHOD_W32_GDI
diff --git a/mk/method-x-randr=no.mk b/mk/method-x-randr=no.mk
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/mk/method-x-randr=no.mk
diff --git a/mk/method-x-randr=yes.mk b/mk/method-x-randr=yes.mk
new file mode 100644
index 0000000..91a935b
--- /dev/null
+++ b/mk/method-x-randr=yes.mk
@@ -0,0 +1,5 @@
+HDR_METHODS += gamma-x-randr.h
+METHODS_PARAMS += LIBGAMMA_METHOD_X_RANDR x_randr 16 ramps16
+CPPFLAGS_METHODS += -DHAVE_LIBGAMMA_METHOD_X_RANDR
+CFLAGS_METHODS += $$(pkg-config --cflags xcb xcb-randr)
+LDFLAGS_METHODS += $$(pkg-config --libs xcb xcb-randr)
diff --git a/mk/method-x-vidmode=no.mk b/mk/method-x-vidmode=no.mk
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/mk/method-x-vidmode=no.mk
diff --git a/mk/method-x-vidmode=yes.mk b/mk/method-x-vidmode=yes.mk
new file mode 100644
index 0000000..e54d98a
--- /dev/null
+++ b/mk/method-x-vidmode=yes.mk
@@ -0,0 +1,5 @@
+HDR_METHODS += gamma-x-vidmode.h
+METHODS_PARAMS += LIBGAMMA_METHOD_X_VIDMODE x_vidmode 16 ramps16
+CPPFLAGS_METHODS += -DHAVE_LIBGAMMA_METHOD_X_VIDMODE
+CFLAGS_METHODS += $$(pkg-config --cflags x11 xxf86vm)
+LDFLAGS_METHODS += $$(pkg-config --libs x11 xxf86vm)
diff --git a/mk/windows.mk b/mk/windows.mk
new file mode 100644
index 0000000..4520743
--- /dev/null
+++ b/mk/windows.mk
@@ -0,0 +1,6 @@
+W32_GDI_METHOD = yes
+
+LIBEXT = dll
+LIBFLAGS = -mdll
+LIBMAJOREXT = $(LIB_MAJOR).$(LIBEXT)
+LIBMINOREXT = $(LIB_VERSION).$(LIBEXT)