aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-04-19 16:53:45 +0200
committerMattias Andrée <maandree@kth.se>2016-04-19 16:53:45 +0200
commitd0231da35b7733540986fe8400a7acef4571f20e (patch)
treed159a07699830ceb2af59b34c689f891197326cc
parenttypo (diff)
downloadmetar-d0231da35b7733540986fe8400a7acef4571f20e.tar.gz
metar-d0231da35b7733540986fe8400a7acef4571f20e.tar.bz2
metar-d0231da35b7733540986fe8400a7acef4571f20e.tar.xz
add makefile
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..411d172
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,30 @@
+PREFIX = /usr
+BIN = /bin
+DATA = /share
+BINDIR = $(PREFIX)$(BIN)
+DATADIR = $(PREFIX)$(DATA)
+MANDIR = $(DATADIR)/man
+LICENSEDIR = $(DATADIR)/licenses
+
+PKGNAME = metar
+COMMAND = metar
+
+all:
+clean:
+
+install:
+ mkdir -p -- "$(DESTDIR)$(BINDIR)"
+ mkdir -p -- "$(DESTDIR)$(MANDIR)/man1"
+ mkdir -p -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
+ install -m755 metar "$(DESTDIR)$(BINDIR)/$(COMMAND)"
+ install -m644 COPYING "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/COPYING"
+ install -m644 metar.1 "$(DESTDIR)$(MANDIR)/man1/$(COMMAND).1"
+
+uninstall:
+ -rm -- "$(DESTDIR)$(BINDIR)/$(COMMAND)"
+ -rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/COPYING"
+ -rm -- "$(DESTDIR)$(MANDIR)/man1/$(COMMAND).1"
+ -rmdir -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
+
+.PHONY: all clean install uninstall
+