blob: 446f49afdbaf4fa55e813d00781664a247adb169 (
plain)
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
|
srcdir=@srcdir@
CFLAGS=@CFLAGS@
LDFLAGS=@LDFLAGS@
CPPFLAGS=@CPPFLAGS@
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@
LOCAL_LDFLAGS=-rdynamic -ggdb ${EXTRA_LIBS}
LINK_FLAGS=${LDFLAGS} ${LOCAL_LDFLAGS}
DEP=dep
EXE=bin
OBJ=objs
DIR_LIST=${DEP} ${EXE} ${OBJ}
EXE_LIST=${EXE}/tl-parser
OBJECTS=${OBJ}/tl-parser.o ${OBJ}/tlc.o
DEPENDENCE=$(subst ${OBJ}/,${DEP}/,$(patsubst %.o,%.d,${OBJECTS}))
DEPENDENCE_LIST=${DEPENDENCE}
INCLUDE=-I. -I${srcdir}
CC=@CC@
.SUFFIXES:
.SUFFIXES: .c .h .o
all: ${EXE_LIST} ${DIR_LIST} ${LIB_LIST}
create_dirs_and_headers: ${DIR_LIST}
create_dirs: ${DIR_LIST}
${DIR_LIST}:
@test -d $@ || mkdir -p $@
-include ${DEPENDENCE_LIST}
${OBJECTS}: ${OBJ}/%.o: ${srcdir}/%.c | create_dirs_and_headers
${CC} ${INCLUDE} ${COMPILE_FLAGS} -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $<
${EXE}/tl-parser: ${OBJECTS}
${CC} $^ ${LINK_FLAGS} -o $@
clean:
rm -rf ${DIR_LIST} config.log config.status > /dev/null || echo "all clean"
|