A monitor for my health.
[busymon] / Makefile
1
2 JAVAFX_HOME=/usr/lib64/javafx-sdk-13
3
4 CFLAGS=-Wall -Wno-parentheses
5 CPPFLAGS=
6 LDLIBS=-lX11 -lXext -lXss
7
8 prefix ?= /usr/local
9
10 notzed.busyalert_JAVA=                                          \
11  java/notzed.busyalert/module-info.java                         \
12  java/notzed.busyalert/au/notzed/busyalert/BusyAlert.java
13
14 all: bin/busymon bin/notzed.busyalert.jar
15
16 bin/busymon.o: src/busymon.c
17 bin/busymon: bin/busymon.o
18
19 bin/%.o: src/%.c
20         mkdir -p bin
21         $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
22
23 bin/notzed.busyalert.jar: bin/.classes
24         jar -c -f $(@) -M -C bin/modules/notzed.busyalert .
25
26 bin/.classes: $(notzed.busyalert_JAVA)
27         javac --module-source-path "java/*" -d bin/modules -m notzed.busyalert --module-path $(JAVAFX_HOME)/lib
28         touch $@
29
30 clean:
31         rm -rf bin
32
33 install: bin/notzed.busyalert.jar bin/busymon
34         sed -e 's,@JAVAFX_HOME@,$(JAVAFX_HOME),g' \
35             -e 's,@MODULE_DIR@,$(DESTDIR)$(prefix)/share/notzed.busyalert,g' \
36            < src/busyalert.in > bin/busyalert
37         chmod 755 bin/busyalert
38         install -D bin/busyalert $(DESTDIR)$(prefix)/share/notzed.busyalert/busyalert
39         install -D bin/notzed.busyalert.jar $(DESTDIR)$(prefix)/share/notzed.busyalert/notzed.busyalert.jar
40         install -D bin/busymon $(DESTDIR)$(prefix)/bin/busymon
41
42