From 0ce0d8d6e0c420ccafa79e0203b928c3559a4311 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 5 Mar 2021 00:43:38 +0100 Subject: Split source files, merge public header files, eliminite use gpp, rewrite makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- mk/linux.mk | 8 ++++++++ mk/macos.mk | 6 ++++++ mk/method-dummy=no.mk | 0 mk/method-dummy=yes.mk | 3 +++ mk/method-linux-drm=no.mk | 0 mk/method-linux-drm=yes.mk | 5 +++++ mk/method-quartz-cg=fake.mk | 3 +++ mk/method-quartz-cg=no.mk | 0 mk/method-quartz-cg=yes.mk | 8 ++++++++ mk/method-w32-gdi=fake.mk | 3 +++ mk/method-w32-gdi=no.mk | 0 mk/method-w32-gdi=yes.mk | 3 +++ mk/method-x-randr=no.mk | 0 mk/method-x-randr=yes.mk | 5 +++++ mk/method-x-vidmode=no.mk | 0 mk/method-x-vidmode=yes.mk | 5 +++++ mk/windows.mk | 6 ++++++ 17 files changed, 55 insertions(+) create mode 100644 mk/linux.mk create mode 100644 mk/macos.mk create mode 100644 mk/method-dummy=no.mk create mode 100644 mk/method-dummy=yes.mk create mode 100644 mk/method-linux-drm=no.mk create mode 100644 mk/method-linux-drm=yes.mk create mode 100644 mk/method-quartz-cg=fake.mk create mode 100644 mk/method-quartz-cg=no.mk create mode 100644 mk/method-quartz-cg=yes.mk create mode 100644 mk/method-w32-gdi=fake.mk create mode 100644 mk/method-w32-gdi=no.mk create mode 100644 mk/method-w32-gdi=yes.mk create mode 100644 mk/method-x-randr=no.mk create mode 100644 mk/method-x-randr=yes.mk create mode 100644 mk/method-x-vidmode=no.mk create mode 100644 mk/method-x-vidmode=yes.mk create mode 100644 mk/windows.mk (limited to 'mk') 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 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 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 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 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 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 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) -- cgit v1.2.3-70-g09d2