2013-11-09 17:47:19 -05:00
|
|
|
srcdir=@srcdir@
|
|
|
|
|
|
|
|
CFLAGS=@CFLAGS@
|
|
|
|
LDFLAGS=@LDFLAGS@
|
|
|
|
CPPFLAGS=@CPPFLAGS@
|
|
|
|
DEFS=@DEFS@
|
2013-12-18 13:17:21 -05:00
|
|
|
COMPILE_FLAGS=${CFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Wextra -Werror -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -ggdb
|
2013-11-09 17:47:19 -05:00
|
|
|
|
2014-02-05 06:12:01 -05:00
|
|
|
EXTRA_LIBS=@LIBS@ @EXTRA_LIBS@
|
2014-02-03 07:25:09 -05:00
|
|
|
LOCAL_LDFLAGS=-rdynamic -ggdb ${EXTRA_LIBS}
|
2013-11-09 17:47:19 -05:00
|
|
|
LINK_FLAGS=${LDFLAGS} ${LOCAL_LDFLAGS}
|
|
|
|
|
2014-01-11 19:43:29 -05:00
|
|
|
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 ${srcdir}/binlog.h ${srcdir}/tools.h ${srcdir}/lua-tg.h
|
2013-11-09 17:47:19 -05:00
|
|
|
INCLUDE=-I. -I${srcdir}
|
|
|
|
CC=@CC@
|
2014-01-11 19:43:29 -05:00
|
|
|
OBJECTS=main.o loop.o interface.o net.o mtproto-common.o mtproto-client.o queries.o structures.o binlog.o tools.o lua-tg.o
|
2013-11-09 17:47:19 -05:00
|
|
|
|
|
|
|
.SUFFIXES:
|
|
|
|
|
|
|
|
.SUFFIXES: .c .h .o
|
|
|
|
|
|
|
|
all: telegram
|
|
|
|
|
|
|
|
${OBJECTS}: ${HEADERS}
|
|
|
|
|
|
|
|
telegram: ${OBJECTS}
|
|
|
|
${CC} ${OBJECTS} ${LINK_FLAGS} -o $@
|
|
|
|
|
|
|
|
.c.o :
|
|
|
|
${CC} ${COMPILE_FLAGS} ${INCLUDE} -c $< -o $@
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
2013-12-18 13:25:34 -05:00
|
|
|
rm -rf *.o telegram config.log config.status > /dev/null || echo "all clean"
|
2013-11-09 17:47:19 -05:00
|
|
|
|