-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
37 lines (29 loc) · 1.14 KB
/
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
33
34
35
36
37
DESTDIR =
PREFIX = /usr/local
SYSCONFDIR = ${PREFIX}/etc
BINDIR = ${PREFIX}/bin
PKGLIBDIR = ${PREFIX}/lib/xdg-open-server
APPLICATIONSDIR = ${PREFIX}/share/applications
AUTOSTARTDIR = ${SYSCONFDIR}/xdg/autostart
CC = gcc
.PHONY: all clean install uninstall
all: \
xdg-open-server
xdg-open-server: main.c
$(CC) $(CFLAGS) -lX11 -lpthread $(LDFLAGS) $< -o $@
clean:
@rm -rfv xdg-open-server
install:
install -Dm755 'xdg-open-server' '${DESTDIR}${BINDIR}/xdg-open-server'
install -Dm644 'xdg-open-server.desktop' '${DESTDIR}${APPLICATIONSDIR}/xdg-open-server.desktop'
install -Dm644 'xdg-open-server.desktop' '${DESTDIR}${AUTOSTARTDIR}/xdg-open-server.desktop'
install -Dm755 'xdg-open' '${DESTDIR}${PKGLIBDIR}/xdg-open'
uninstall:
rm '${DESTDIR}${BINDIR}/xdg-open-server'
@rmdir -p '${DESTDIR}${BINDIR}' 2> /dev/null || true
rm '${DESTDIR}${APPLICATIONSDIR}/xdg-open-server.desktop'
@rmdir -p '${DESTDIR}${APPLICATIONSDIR}' 2> /dev/null || true
rm '${DESTDIR}${AUTOSTARTDIR}/xdg-open-server.desktop'
@rmdir -p '${DESTDIR}${AUTOSTARTDIR}' 2> /dev/null || true
rm '${DESTDIR}${PKGLIBDIR}/xdg-open'
@rmdir -p '${DESTDIR}${PKGLIBDIR}' 2> /dev/null || true