summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorstefan11111 <stefan11111@shitposting.expert>2024-02-03 16:05:14 +0200
committerstefan11111 <stefan11111@shitposting.expert>2024-02-03 16:05:14 +0200
commitae217d4c4c785ab9b050ecff382d95bf209da8f7 (patch)
tree31276909a36c86d7b834bae22c74d7d89f338b71 /Makefile
parent7e431e26a1e99e06cbaf24324a5828e9604d64d7 (diff)
downloadfake-dbus-ae217d4c4c785ab9b050ecff382d95bf209da8f7.tar.gz
add headers
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 17 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 9c5cef6..0c73df0 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,9 @@
XCFLAGS = ${CPPFLAGS} ${CFLAGS} -nostdlib -std=c99 -fPIC -Wall -Wno-pedantic
XLDFLAGS = ${LDFLAGS} -shared -Wl
-all: libdbus-glib-1.so.2
+LIBDIR ?= /lib64
+
+all: libdbus-glib-1.so.2 libdbus-1.so.3
.c.o:
${CC} ${XCFLAGS} -c -o $@ $<
@@ -11,17 +13,22 @@ all: libdbus-glib-1.so.2
libdbus-glib-1.so.2:
${CC} ${XCFLAGS} libdbus-glib-1.c -o libdbus-glib-1.so.2 ${XLDFLAGS},-soname,libdbus-glib-1.so.2
-install: libdbus-glib-1.so.2
- mkdir -p ${DESTDIR}/usr/lib64
- cp -f libdbus-glib-1.so.2 ${DESTDIR}/usr/lib64
-# mkdir -p ${DESTDIR}/usr/lib64/pkgconfig
-# cp -f pc/* ${DESTDIR}/usr/lib64/pkgconfig
-# mkdir -p ${DESTDIR}/usr/include/gtk-2.0/gtk
-# cp -rf headers/* ${DESTDIR}/usr/include/gtk-2.0
+libdbus-1.so.3:
+ ${CC} ${XCFLAGS} libdbus-1.c -o libdbus-1.so.3 ${XLDFLAGS},-soname,libdbus-1.so.3
+
+install: libdbus-glib-1.so.2 libdbus-1.so.3
+ mkdir -p ${DESTDIR}/usr${LIBDIR}
+ cp -f libdbus-glib-1.so.2 ${DESTDIR}/usr${LIBDIR}
+ cp -f libdbus-1.so.3 ${DESTDIR}/usr${LIBDIR}
+ ln -rsf ${DESTDIR}/usr${LIBDIR}/libdbus-1.so.3 ${DESTDIR}/usr${LIBDIR}/libdbus-1.so
+ mkdir -p ${DESTDIR}/usr${LIBDIR}/pkgconfig
+ cp -f dbus-1.pc ${DESTDIR}/usr${LIBDIR}/pkgconfig
+ mkdir -p ${DESTDIR}/usr/include/dbus-1.0/dbus
+ cp -rf headers/* ${DESTDIR}/usr/include/dbus-1.0/dbus
uninstall:
- rm -f ${DESTDIR}/usr/lib64/libdbus-glib-1.so.2
+ rm -rf ${DESTDIR}/usr/include/dbus-1.0 ${DESTDIR}/usr${LIBDIR}/libdbus-glib-1.so.2 ${DESTDIR}/usr${LIBDIR}/libdbus-1.so.3 ${DESTDIR}/usr${LIBDIR}/libdbus-1.so ${DESTDIR}/usr${LIBDIR}/pkgconfig/dbus-1.pc
clean:
- rm -f libdbus-glib-1.so.2
+ rm -f libdbus-glib-1.so.2 libdbus-1.so.3
.PHONY: all clean install uninstall