summary refs log tree commit diff stats
path: root/plugins/sysinfo/xsys-makefile
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sysinfo/xsys-makefile')
-rw-r--r--plugins/sysinfo/xsys-makefile39
1 files changed, 39 insertions, 0 deletions
diff --git a/plugins/sysinfo/xsys-makefile b/plugins/sysinfo/xsys-makefile
new file mode 100644
index 00000000..aeb28a99
--- /dev/null
+++ b/plugins/sysinfo/xsys-makefile
@@ -0,0 +1,39 @@
+#### SET THIS VALUE TO THE LOCATION OF THE `pci.ids` file ####
+PCIIDS = /usr/share/misc/pci.ids
+
+#### UNCOMMENT THIS IF YOU WANT THE BUTTONS ####
+#BUTTON = -Dbuttonbar
+
+#### SHOULD NOT NEED TO EDIT BELOW THIS LINE ####
+VER_MAJOR = 2
+VER_MINOR = 2
+VER_PATCH = 0
+CC = gcc
+CFLAGS += -O2 -Wall -fPIC
+CFLAGS += $(shell pkg-config dbus-1 --cflags) $(shell pkg-config glib-2.0 --cflags)
+CFLAGS += -DVER_MINOR=$(VER_MINOR) -DVER_MAJOR=$(VER_MAJOR) -DVER_PATCH=$(VER_PATCH) \
+          -DVER_STRING=\"$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)\" -DPCIIDS=\"$(PCIIDS)\" $(BUTTON)
+LDFLAGS = $(CFLAGS) -shared
+LIBRARY = xsys-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH).so
+OBJECTS = xsys.o parse.o pci.o match.o hwmon.o
+
+ALL : $(LIBRARY)
+
+$(LIBRARY) : $(OBJECTS)
+	$(CC) $(LDFLAGS) -o $(LIBRARY) $(OBJECTS) -lpci $(shell pkg-config dbus-1 --libs) $(shell pkg-config glib-2.0 --libs) -laudclient
+
+xsys.o : xsys.c
+parse.o : parse.c
+pci.o : pci.c
+match.o : match.c
+hwmon.o : hwmon.c
+
+.PHONY : clean
+clean :
+	rm -rf *.o *.so *~
+
+.PHONY : install
+install : $(LIBRARY)
+	rm -f $(HOME)/.xchat2/xsys-plugin.so
+	cp ./$(LIBRARY) $(HOME)/.xchat2/xsys-plugin.so
+