From 7cf5bfe38b8345b2466d3ef7ba7d06040dc57e9d Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Wed, 16 Aug 2017 20:48:34 -0400 Subject: Improve C example. --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 699b2a1..685a684 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,21 @@ bindir := $(prefix)/bin CFLAGS += $(shell pkg-config --cflags dbus-1) -Wall -Wextra -std=c99 LDLIBS := $(shell pkg-config --libs dbus-1) +all: inhibit-screensaver c-example inhibit-screensaver: inhibit-screensaver.o +c-example: c-example.o + +c-example.o: example.c + $(COMPILE.c) $(OUTPUT_OPTION) $< + clean: - $(RM) inhibit-screensaver.o inhibit-screensaver + $(RM) inhibit-screensaver.o inhibit-screensaver c-example.o c-example install: install -D -m0755 inhibit-screensaver $(bindir) uninstall: $(RM) $(bindir)/inhibit-screensaver + +.PHONY: clean install uninstall -- cgit v1.2.3-54-g00ecf