Fix to remove alert if timeout expires during system sleep.
[busymon] / Makefile
1
2 VERSION=-1
3
4 JAVAFX_HOME=/usr/local/javafx-sdk-15
5 JAVA_HOME=/usr/local/jdk-15
6
7 CFLAGS=-Wall -Wno-parentheses
8 CPPFLAGS=
9 LDLIBS=-lX11 -lXext -lXss
10
11 prefix ?= /usr/local
12
13 notzed.busyalert_JAVA=                                          \
14  java/notzed.busyalert/module-info.java                         \
15  java/notzed.busyalert/au/notzed/busyalert/BusyAlert.java
16
17 all: bin/busymon bin/notzed.busyalert.jar
18
19 bin/busymon.o: src/busymon.c
20 bin/busymon: bin/busymon.o
21
22 bin/%.o: src/%.c
23         mkdir -p bin
24         $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
25
26 bin/notzed.busyalert.jar: bin/.classes
27         jar -c -f $(@) -M -C bin/modules/notzed.busyalert .
28
29 bin/.classes: $(notzed.busyalert_JAVA)
30         javac --module-source-path "java/*" -d bin/modules -m notzed.busyalert --module-path $(JAVAFX_HOME)/lib
31         touch $@
32
33 clean:
34         rm -rf bin
35
36 install: bin/notzed.busyalert.jar bin/busymon
37         sed -e 's,@JAVA_HOME@,$(JAVA_HOME),g' \
38             -e 's,@JAVAFX_HOME@,$(JAVAFX_HOME),g' \
39             -e 's,@MODULE_DIR@,$(prefix)/share/notzed.busyalert,g' \
40            < src/busyalert.in > bin/busyalert
41         chmod 755 bin/busyalert
42         install -D bin/busyalert $(DESTDIR)$(prefix)/share/notzed.busyalert/busyalert
43         install -D bin/notzed.busyalert.jar $(DESTDIR)$(prefix)/share/notzed.busyalert/notzed.busyalert.jar
44         install -D bin/busymon $(DESTDIR)$(prefix)/bin/busymon
45
46 dist:
47         tar cfz busymon$(VERSION).tar.gz \
48         --xform 's@^@busymon$(VERSION)/@' \
49         COPYING README Makefile \
50         src/busyalert.in src/busymon.c \
51         $(notzed.busyalert_JAVA) \
52         contrib