aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 86ad740..c9264c2 100644
--- a/Makefile
+++ b/Makefile
@@ -3,26 +3,27 @@
CONFIGFILE = config.mk
include $(CONFIGFILE)
+
all: learn-your-telephone-number
-learn-your-telephone-number: learn-your-telephone-number.o
- $(CC) -o $@ $@.o $(LDFLAGS)
+.c.o:
+ $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)
+
+.o:
+ $(CC) -o $@ $< $(LDFLAGS)
install: learn-your-telephone-number
mkdir -p -- "$(DESTDIR)$(PREFIX)/bin/"
mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1/"
- mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/learn-your-telephone-number/"
cp -- learn-your-telephone-number "$(DESTDIR)$(PREFIX)/bin/"
cp -- learn-your-telephone-number.1 "$(DESTDIR)$(MANPREFIX)/man1/"
- cp -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/learn-your-telephone-number/"
uninstall:
-rm -f -- "$(DESTDIR)$(PREFIX)/bin/learn-your-telephone-number"
-rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/learn-your-telephone-number.1"
- -rm -rf -- "$(DESTDIR)$(PREFIX)/share/licenses/learn-your-telephone-number/"
clean:
- -rm -f -- learn-your-telephone-number *.o
+ -rm -f -- learn-your-telephone-number *.o *.su
.SUFFIXES:
.SUFFIXES: .o .c