tg/Makefile.in

57 lines
1.5 KiB
Makefile
Raw Normal View History

srcdir=@srcdir@
CFLAGS=@CFLAGS@
LDFLAGS=@LDFLAGS@ @OPENSSL_LDFLAGS@
CPPFLAGS=@CPPFLAGS@ @OPENSSL_INCLUDES@
DEFS=@DEFS@
COMPILE_FLAGS=${CFLAGS} ${CPFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Wextra -Werror -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC
EXTRA_LIBS=@LIBS@ @EXTRA_LIBS@ @OPENSSL_LIBS@
2014-08-14 18:16:01 -04:00
LOCAL_LDFLAGS=-rdynamic -ggdb -levent ${EXTRA_LIBS}
LINK_FLAGS=${LDFLAGS} ${LOCAL_LDFLAGS}
2014-11-12 09:38:44 -05:00
DEP=dep
AUTO=auto
EXE=bin
OBJ=objs
LIB=libs
2014-08-18 12:39:04 -04:00
DIR_LIST=${DEP} ${AUTO} ${EXE} ${OBJ} ${LIB} ${DEP}/auto ${OBJ}/auto
2014-11-12 09:38:44 -05:00
EXE_LIST=${EXE}/telegram-cli
2014-11-12 09:38:44 -05:00
TG_OBJECTS=${OBJ}/main.o ${OBJ}/loop.o ${OBJ}/interface.o ${OBJ}/lua-tg.o
INCLUDE=-I. -I${srcdir}
CC=@CC@
.SUFFIXES:
.SUFFIXES: .c .h .o
2014-11-12 09:38:44 -05:00
all: ${EXE_LIST} ${DIR_LIST}
2014-08-12 11:15:04 -04:00
create_dirs_and_headers: ${DIR_LIST} ${AUTO}/auto.c ${AUTO}/auto-header.h ${AUTO}/constants.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-01-09 06:54:46 -05:00
OBJ_LIST=${TG_OBJECTS} ${TGL_OBJECTS} ${TGL_COMMON_OBJECTS} ${GENERATE_OBJECTS} ${TL_PARSER_OBJECTS}
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:
rm -rf ${DIR_LIST} config.log config.status > /dev/null || echo "all clean"