forked from notsecure/uTox
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
72 lines (58 loc) · 3.28 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
UNAME_S := $(shell uname -s)
CFLAGS += $(shell pkg-config --cflags freetype2 x11 openal)
CFLAGS += $(shell pkg-config --cflags dbus-1)
CFLAGS += -g -pthread -std=gnu99
LDFLAGS += $(shell pkg-config --libs freetype2 x11 openal)
LDFLAGS += $(shell pkg-config --libs dbus-1)
LDFLAGS += -lX11 -lXft -lXrender -ltoxcore -ltoxav -ltoxdns -lopenal -pthread -lm -lfontconfig -lv4lconvert -lvpx -lXext
ifeq ($(UNAME_S),Linux)
LDFLAGS += -lresolv -ldl
endif
DESTDIR?= # empty
PREFIX?= /usr/local
SRC = $(wildcard *.c png/png.c)
OBJ = $(SRC:.c=.o)
all: utox
utox: $(OBJ)
$(CC) $(CFLAGS) -o utox $(OBJ) $(LDFLAGS)
install: utox
mkdir -p $(DESTDIR)$(PREFIX)/bin
install -m 0755 utox $(DESTDIR)$(PREFIX)/bin/utox
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/14x14/apps
install -m 644 icons/utox-14x14.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/14x14/apps/utox.png
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps
install -m 644 icons/utox-16x16.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/utox.png
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/22x22/apps
install -m 644 icons/utox-22x22.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/22x22/apps/utox.png
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps
install -m 644 icons/utox-24x24.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/24x24/apps/utox.png
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps
install -m 644 icons/utox-32x32.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps/utox.png
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/36x36/apps
install -m 644 icons/utox-36x36.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/36x36/apps/utox.png
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
install -m 644 icons/utox-48x48.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/utox.png
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/64x64/apps
install -m 644 icons/utox-64x64.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/64x64/apps/utox.png
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/72x72/apps
install -m 644 icons/utox-72x72.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/72x72/apps/utox.png
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/96x96/apps
install -m 644 icons/utox-96x96.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/96x96/apps/utox.png
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps
install -m 644 icons/utox-128x128.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/utox.png
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/192x192/apps
install -m 644 icons/utox-192x192.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/192x192/apps/utox.png
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps
install -m 644 icons/utox-256x256.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/utox.png
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/512x512/apps
install -m 644 icons/utox-512x512.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/512x512/apps/utox.png
mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps
install -m 644 icons/utox.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/utox.svg
mkdir -p $(DESTDIR)$(PREFIX)/share/applications
install -m 644 utox.desktop $(DESTDIR)$(PREFIX)/share/applications/utox.desktop
main.o: xlib/main.c xlib/keysym2ucs.c
.c.o:
$(CC) $(CFLAGS) -o $@ -c $<
clean:
rm -f utox *.o png/*.o
.PHONY: all clean