blob: 664ab98225f4e2df9f0170c43e4253b524b5c235 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
--- src/libXNVCtrl/Makefile 2019-07-30 00:26:56.000000000 +0200
+++ src/libXNVCtrl/Makefile 2019-08-02 14:08:56.963744238 +0200
@@ -50,8 +50,8 @@
.PHONY: clean
-all: $(LIBXNVCTRL)
+all: $(LIBXNVCTRL) $(LIBXNVCTRL_SHARED)
clean:
- rm -rf $(LIBXNVCTRL) *~ \
+ rm -rf $(LIBXNVCTRL) $(LIBXNVCTRL_SHARED)* *~ \
$(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d
--- src/libXNVCtrl/xnvctrl.mk 2019-08-02 17:04:08.216230565 +0200
+++ src/libXNVCtrl/xnvctrl.mk 2019-08-02 17:08:02.563660632 +0200
@@ -39,6 +39,11 @@
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 @@
$(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)
|