tg/Makefile.in

59 lines
2.0 KiB
Makefile
Raw Permalink Normal View History

srcdir=@srcdir@
CFLAGS=@CFLAGS@
LDFLAGS=@LDFLAGS@ @OPENSSL_LDFLAGS@
CPPFLAGS=@CPPFLAGS@ @OPENSSL_INCLUDES@
DEFS=@DEFS@
2015-05-18 15:25:45 -04:00
COMPILE_FLAGS=${CFLAGS} ${CPFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC
EXTRA_LIBS=@LIBS@ @EXTRA_LIBS@ @OPENSSL_LIBS@
LOCAL_LDFLAGS=-rdynamic -ggdb -levent ${EXTRA_LIBS} -ldl -lpthread -lutil
LINK_FLAGS=${LDFLAGS} ${LOCAL_LDFLAGS}
2014-11-12 09:38:44 -05:00
DEP=dep
AUTO=auto
EXE=bin
OBJ=objs
LIB=libs
2015-10-02 14:38:00 -04:00
DIR_LIST=${DEP} ${AUTO} ${EXE} ${OBJ} ${LIB} ${DEP}/auto ${OBJ}/auto ${OBJ}/crypto ${DEP}/crypto
2014-11-12 09:38:44 -05:00
EXE_LIST=${EXE}/telegram-cli
2015-05-20 13:55:06 -04:00
TG_OBJECTS=${OBJ}/main.o ${OBJ}/loop.o ${OBJ}/interface.o ${OBJ}/lua-tg.o ${OBJ}/json-tg.o ${OBJ}/python-tg.o ${OBJ}/python-types.o
2015-04-16 09:42:44 -04:00
INCLUDE=-I. -I${srcdir} -I${srcdir}/tgl
CC=@CC@
.SUFFIXES:
.SUFFIXES: .c .h .o
2014-11-12 09:38:44 -05:00
all: ${EXE_LIST} ${DIR_LIST}
2015-06-17 12:23:22 -04:00
create_dirs_and_headers: ${DIR_LIST} ${AUTO}/auto-skip.h ${AUTO}/auto-fetch.h ${AUTO}/auto-store.h ${AUTO}/auto-autocomplete.h ${AUTO}/auto-types.h ${AUTO}/constants.h ${AUTO}/constants.h ${AUTO}/auto-skip.h ${AUTO}/auto-fetch.h ${AUTO}/auto-store.h ${AUTO}/auto-autocomplete.h ${AUTO}/auto-types.h ${AUTO}/auto-fetch-ds.h ${AUTO}/auto-free-ds.h ${AUTO}/auto-store-ds.h ${AUTO}/auto-print-ds.h
create_dirs: ${DIR_LIST}
dump-tl: ${EXE}/dump-tl-file
2014-11-12 09:38:44 -05:00
include ${srcdir}/Makefile.tl-parser
include ${srcdir}/Makefile.tgl
${DIR_LIST}:
@test -d $@ || mkdir -p $@
2015-04-16 09:42:44 -04:00
OBJ_LIST=${TG_OBJECTS} ${TGL_OBJECTS} ${TGL_COMMON_OBJECTS} ${GENERATE_OBJECTS} ${TL_PARSER_OBJECTS} ${TGL_OBJECTS_AUTO}
2015-01-09 06:54:46 -05:00
DEPENDENCE=$(subst ${OBJ}/,${DEP}/,$(patsubst %.o,%.d,${OBJ_LIST}))
DEPENDENCE_LIST=${DEPENDENCE}
-include ${DEPENDENCE_LIST}
2014-11-12 10:00:44 -05:00
${TG_OBJECTS}: ${OBJ}/%.o: ${srcdir}/%.c | create_dirs_and_headers
${CC} ${INCLUDE} ${COMPILE_FLAGS} -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $<
2014-11-12 09:38:44 -05:00
${EXE}/telegram-cli: ${TG_OBJECTS} ${LIB}/libtgl.a
${CC} $^ ${LINK_FLAGS} -o $@
clean:
2015-10-09 06:54:30 -04:00
rm -rf ${DIR_LIST}
distclean:
rm -rf ${DIR_LIST} config.h config.log config.status