2013-11-09 17:47:19 -05:00
|
|
|
srcdir=.
|
2013-10-03 08:38:25 -04:00
|
|
|
|
2013-11-09 17:47:19 -05:00
|
|
|
CFLAGS=-g -O2
|
|
|
|
LDFLAGS=
|
|
|
|
CPPFLAGS=
|
|
|
|
DEFS=-DHAVE_CONFIG_H
|
|
|
|
COMPILE_FLAGS=${CFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Wextra -Werror -fno-strict-aliasing -fno-omit-frame-pointer -ggdb
|
2013-10-03 08:38:25 -04:00
|
|
|
|
2013-11-09 17:47:19 -05:00
|
|
|
EXTRA_LIBS= -lreadline -lconfig
|
|
|
|
LOCAL_LDFLAGS=-lm -lcrypto -lz -lssl -lrt ${EXTRA_LIBS}
|
|
|
|
LINK_FLAGS=${LDFLAGS} ${LOCAL_LDFLAGS}
|
|
|
|
|
|
|
|
HEADERS= ${srcdir}/constants.h ${srcdir}/include.h ${srcdir}/interface.h ${srcdir}/LICENSE.h ${srcdir}/loop.h ${srcdir}/mtproto-client.h ${srcdir}/mtproto-common.h ${srcdir}/net.h ${srcdir}/no-preview.h ${srcdir}/queries.h ${srcdir}/structures.h ${srcdir}/telegram.h ${srcdir}/tree.h ${srcdir}/config.h
|
|
|
|
INCLUDE=-I. -I${srcdir}
|
|
|
|
CC=gcc
|
|
|
|
OBJECTS=main.o loop.o interface.o net.o mtproto-common.o mtproto-client.o queries.o structures.o
|
|
|
|
|
|
|
|
.SUFFIXES:
|
|
|
|
|
|
|
|
.SUFFIXES: .c .h .o
|
|
|
|
|
|
|
|
all: telegram
|
|
|
|
|
|
|
|
${OBJECTS}: ${HEADERS}
|
|
|
|
|
|
|
|
telegram: ${OBJECTS}
|
|
|
|
${CC} ${OBJECTS} ${LINK_FLAGS} -o $@
|
|
|
|
|
|
|
|
.c.o :
|
|
|
|
${CC} ${COMPILE_FLAGS} ${INCLUDE} -c $< -o $@
|
2013-10-03 08:38:25 -04:00
|
|
|
|
|
|
|
|
2013-10-13 08:30:53 -04:00
|
|
|
clean:
|
2013-11-09 17:47:19 -05:00
|
|
|
rm -rf *.o telegram > /dev/null || echo "all clean"
|
|
|
|
|