-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (25 loc) · 879 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.POSIX:
.PHONY: all clean install uninstall dist
include config.mk
all: xscreenshot
xscreenshot: xscreenshot.o
$(CC) $(LDFLAGS) -o xscreenshot xscreenshot.o
clean:
rm -f xscreenshot xscreenshot.o xscreenshot-$(VERSION).tar.gz
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f xscreenshot $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/xscreenshot
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
cp -f xscreenshot.1 $(DESTDIR)$(MANPREFIX)/man1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/xscreenshot.1
dist: clean
mkdir -p xscreenshot-$(VERSION)
cp -R COPYING config.mk Makefile README xscreenshot.1 \
xscreenshot.c xscreenshot-$(VERSION)
tar -cf xscreenshot-$(VERSION).tar xscreenshot-$(VERSION)
gzip xscreenshot-$(VERSION).tar
rm -rf xscreenshot-$(VERSION)
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/xscreenshot
rm -f $(DESTDIR)$(MANPREFIX)/man1/xscreenshot.1