39 lines
1.6 KiB
Diff
39 lines
1.6 KiB
Diff
|
diff --git a/src/Makefile b/src/Makefile
|
||
|
index 68eb140..6d0aab8 100644
|
||
|
--- a/src/Makefile
|
||
|
+++ b/src/Makefile
|
||
|
@@ -345,7 +345,7 @@ endif
|
||
|
|
||
|
ifdef BUILD_GTK3LIB
|
||
|
$(eval $(call DEBUG_INFO_RULES, $(GTK3LIB)))
|
||
|
-$(GTK3LIB).unstripped: $(LIBXNVCTRL) $(GTK3_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) $(VERSION_MK)
|
||
|
+$(GTK3LIB).unstripped: $(LIBXNVCTRL) $(LIBXNVCTRL_SHARED) $(GTK3_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) $(VERSION_MK)
|
||
|
$(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \
|
||
|
$(LIBXNVCTRL) $(LIBS) $(GTK3_LIBS) \
|
||
|
-Wl,--unresolved-symbols=ignore-all -o $@ \
|
||
|
diff --git a/src/libXNVCtrl/xnvctrl.mk b/src/libXNVCtrl/xnvctrl.mk
|
||
|
index e6be2ef..c0921c4 100644
|
||
|
--- a/src/libXNVCtrl/xnvctrl.mk
|
||
|
+++ b/src/libXNVCtrl/xnvctrl.mk
|
||
|
@@ -39,6 +39,11 @@ XNVCTRL_CFLAGS ?=
|
||
|
|
||
|
LIBXNVCTRL = $(OUTPUTDIR)/libXNVCtrl.a
|
||
|
|
||
|
+LIBXNVCTRL_SHARED = $(OUTPUTDIR)/libXNVCtrl.so
|
||
|
+LIBXNVCTRL_ABI_VERSION_MAJOR = 0
|
||
|
+LIBXNVCTRL_ABI_VERSION_MINOR = 0
|
||
|
+LIBXNVCTRL_LIBS += -lXext -lX11
|
||
|
+
|
||
|
LIBXNVCTRL_SRC = $(XNVCTRL_DIR)/NVCtrl.c
|
||
|
|
||
|
LIBXNVCTRL_OBJ = $(call BUILD_OBJECT_LIST,$(LIBXNVCTRL_SRC))
|
||
|
@@ -47,3 +52,8 @@ $(eval $(call DEFINE_OBJECT_RULE,TARGET,$(LIBXNVCTRL_SRC)))
|
||
|
|
||
|
$(LIBXNVCTRL) : $(LIBXNVCTRL_OBJ)
|
||
|
$(call quiet_cmd,AR) ru $@ $(LIBXNVCTRL_OBJ)
|
||
|
+
|
||
|
+$(LIBXNVCTRL_SHARED) : $(LIBXNVCTRL_OBJ)
|
||
|
+ $(CC) -shared $(CFLAGS) $(LDFLAGS) -Wl,-soname=$(notdir $@).${LIBXNVCTRL_ABI_VERSION_MAJOR} -o $@.$(LIBXNVCTRL_ABI_VERSION_MAJOR).$(LIBXNVCTRL_ABI_VERSION_MINOR).0 $^ $(LIBXNVCTRL_LIBS)
|
||
|
+ ln -s $(notdir $@).$(LIBXNVCTRL_ABI_VERSION_MAJOR).$(LIBXNVCTRL_ABI_VERSION_MINOR).0 $@
|
||
|
+ ln -s $(notdir $@).$(LIBXNVCTRL_ABI_VERSION_MAJOR).$(LIBXNVCTRL_ABI_VERSION_MINOR).0 $@.$(LIBXNVCTRL_ABI_VERSION_MAJOR)
|