forked from zevlg/telega.el
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (42 loc) · 1.24 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
CC=cc
ifndef LIBS_PREFIX
CFLAGS=`pkg-config --cflags tdjson`
LDFLAGS=`pkg-config --libs tdjson`
else
CFLAGS=-I$(LIBS_PREFIX)/include
LDFLAGS=-L$(LIBS_PREFIX)/lib -Wl,-rpath,$(LIBS_PREFIX)/lib -ltdjson
endif
CFLAGS+=-Wall -g -pthread
PROG=telega-server
SOURCES=telega-server.c telega-dat.c telega-pngext.c
ifeq ($(shell pkg-config --exists appindicator3-0.1 && echo yes), yes)
CFLAGS+=-DWITH_APPINDICATOR
CFLAGS+=`pkg-config --cflags appindicator3-0.1`
LDFLAGS+=`pkg-config --libs appindicator3-0.1`
SOURCES+=telega-appindicator.c
else ifeq ($(shell pkg-config --exists ayatana-appindicator3-0.1 && echo yes), yes)
CFLAGS+=-DWITH_APPINDICATOR
CFLAGS+=-DWITH_AYATANA_APPINDICATOR
CFLAGS+=`pkg-config --cflags ayatana-appindicator3-0.1`
LDFLAGS+=`pkg-config --libs ayatana-appindicator3-0.1`
SOURCES+=telega-appindicator.c
endif
ifdef WITH_VOIP
CC=c++
CFLAGS+=-std=c++11 -DWITH_VOIP -DTGVOIP_NO_STDOUT_LOGS
LDFLAGS+=-ltgvoip
SOURCES+=telega-voip.cpp
endif
ifndef INSTALL_PREFIX
INSTALL_PREFIX=$(HOME)/.telega
endif
$(PROG): $(SOURCES) telega-emoji.h
$(CC) $(CFLAGS) -o $(PROG) $(SOURCES) $(LDFLAGS)
install: $(PROG)
@install -d $(INSTALL_PREFIX)
@install -v $(PROG) $(INSTALL_PREFIX)
test:
@python3 run_tests.py
clean:
@rm -vf $(PROG)
.PHONY: clean install