aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 9 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 835ce98..90595a1 100644
--- a/Makefile
+++ b/Makefile
@@ -3,13 +3,14 @@
CONFIGFILE = config.mk
include $(CONFIGFILE)
+
all: alarm
-alarm.o: alarm.c
- $(CC) -c -o $@ alarm.c $(CCFLAGS) $(CPPFLAGS)
+.c.o:
+ $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)
-alarm: alarm.o
- $(CC) -o $@ alarm.o $(LDFLAGS)
+.o:
+ $(CC) -o $@ $< $(LDFLAGS)
check: alarm
./alarm 1 sleep 2 & a=$$! ;\
@@ -19,19 +20,18 @@ check: alarm
install: alarm
mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
- mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/alarm"
mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
cp -- alarm "$(DESTDIR)$(PREFIX)/bin/"
- cp -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/alarm/"
cp -- alarm.1 "$(DESTDIR)$(MANPREFIX)/man1/"
uninstall:
-rm -- "$(DESTDIR)$(PREFIX)/bin/alarm"
- -rm -- "$(DESTDIR)$(PREFIX)/share/licenses/alarm/LICENSE"
-rm -- "$(DESTDIR)$(MANPREFIX)/man1/alarm.1"
- -rmdir -- "$(DESTDIR)$(PREFIX)/share/licenses/alarm"
clean:
- -rm -rf -- alarm *.o
+ -rm -rf -- alarm *.o *.su
+
+.SUFFIXES:
+.SUFFIXES: .o .c
.PHONY: all check install uninstall clean