wayclip

Wayland clipboard utility
git clone git://git.nihaljere.xyz/wayclip
Log | Files | Refs | README | LICENSE

commit a5660d8fd5f9977dcca6e7a623862a5e800e4453
parent 46820648dbfaa53ad72a63731f22e778473c830f
Author: Nihal Jere <nihal@nihaljere.xyz>
Date:   Wed, 23 Feb 2022 17:18:01 -0600

Makefile: cleanup

Diffstat:
MMakefile | 23+++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,13 +1,15 @@ -.c.o: - $(CC) -Wall -c $< -o $@ +PREFIX = /usr/local +LIB = -lwayland-client +WAYCOPY_OBJ = protocol/wlr-data-control-unstable-v1.o waycopy.o common.o util.o +WAYPASTE_OBJ = protocol/wlr-data-control-unstable-v1.o waypaste.o common.o util.o all: waycopy waypaste -waypaste: protocol/wlr-data-control-unstable-v1-client-protocol.h protocol/wlr-data-control-unstable-v1.o waypaste.o common.o util.o - $(CC) protocol/wlr-data-control-unstable-v1.o waypaste.o common.o util.o -lwayland-client -o waypaste +waypaste: protocol/wlr-data-control-unstable-v1-client-protocol.h $(WAYPASTE_OBJ) + $(CC) $(WAYPASTE_OBJ) $(LIB) -o $@ -waycopy: protocol/wlr-data-control-unstable-v1-client-protocol.h protocol/wlr-data-control-unstable-v1.o waycopy.o common.o util.o - $(CC) protocol/wlr-data-control-unstable-v1.o waycopy.o util.o common.o -lwayland-client -o waycopy +waycopy: protocol/wlr-data-control-unstable-v1-client-protocol.h $(WAYCOPY_OBJ) + $(CC) $(WAYCOPY_OBJ) $(LIB) -o $@ protocol/wlr-data-control-unstable-v1.c: wayland-scanner private-code protocol/wlr-data-control-unstable-v1.xml protocol/wlr-data-control-unstable-v1.c @@ -15,5 +17,14 @@ protocol/wlr-data-control-unstable-v1.c: protocol/wlr-data-control-unstable-v1-client-protocol.h: wayland-scanner client-header protocol/wlr-data-control-unstable-v1.xml protocol/wlr-data-control-unstable-v1-client-protocol.h +.c.o: + $(CC) -Wall -Wpedantic -c $< -o $@ + +install: + install -Dm755 -t $(DESTDIR)$(PREFIX)/bin waycopy waypaste + +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/waycopy $(DESTDIR)$(PREFIX)/bin/waypaste + clean: rm -f *.o waycopy protocol/*.[och]