Makefile.am 5.18 KB
Newer Older
Pekka Pessi's avatar
Pekka Pessi committed
1 2 3 4 5 6 7
#
# Makefile.am for sip module
#

# ----------------------------------------------------------------------
# Header paths

8 9 10 11 12
INCLUDES = 	-I$(srcdir)/../bnf -I../bnf \
		-I$(srcdir)/../ipt -I../ipt \
		-I$(srcdir)/../msg -I../msg \
		-I$(srcdir)/../url -I../url \
		-I$(srcdir)/../su -I../su
Pekka Pessi's avatar
Pekka Pessi committed
13 14 15 16

# ----------------------------------------------------------------------
# Build targets

17
noinst_LTLIBRARIES = 	libsip.la
Pekka Pessi's avatar
Pekka Pessi committed
18

19
check_PROGRAMS =       torture_sip \
20
			test_sip_msg validator test_date
Pekka Pessi's avatar
Pekka Pessi committed
21 22 23 24

# ----------------------------------------------------------------------
# Rules for building the targets

25
GENERATED_H = 		sofia-sip/sip_hclasses.h \
26 27
			sofia-sip/sip_protos.h sofia-sip/sip_tag.h \
			sofia-sip/sip_extra.h
28

29
H_IN = 			sofia-sip/sip_hclasses.h.in \
30 31
			sofia-sip/sip_protos.h.in sofia-sip/sip_tag.h.in \
			sofia-sip/sip_extra.h.in
Pekka Pessi's avatar
Pekka Pessi committed
32

33 34 35
PUBLIC_H = sofia-sip/sip.h sofia-sip/sip_util.h \
           sofia-sip/sip_header.h sofia-sip/sip_parser.h \
	   sofia-sip/sip_tag_class.h sofia-sip/sip_status.h
Pekka Pessi's avatar
Pekka Pessi committed
36

37
GENERATED_C = sip_tag.c sip_parser_table.c
Pekka Pessi's avatar
Pekka Pessi committed
38

39
BUILT_SOURCES = 	$(GENERATED_H) $(GENERATED_C) sip_tag_ref.c
Pekka Pessi's avatar
Pekka Pessi committed
40

41
nobase_include_sofia_HEADERS = $(GENERATED_H) $(PUBLIC_H) $(H_IN)
Pekka Pessi's avatar
Pekka Pessi committed
42

43
libsip_la_SOURCES = 	$(INTERNAL_H) \
Pekka Pessi's avatar
Pekka Pessi committed
44 45 46 47 48 49
			sip_parser.c sip_header.c sip_util.c sip_pref_util.c \
			sip_basic.c sip_extra.c sip_feature.c sip_mime.c \
			sip_security.c sip_event.c sip_prack.c \
			sip_refer.c sip_session.c \
			sip_caller_prefs.c sip_reason.c \
			sip_status.c sip_time.c \
Pekka Pessi's avatar
Pekka Pessi committed
50
			sip_tag_class.c sip_inlined.c \
51
			$(BUILT_SOURCES)
Pekka Pessi's avatar
Pekka Pessi committed
52

53
COVERAGE_INPUT = 	$(libsip_la_SOURCES) $(include_sofia_HEADERS)
54

55 56 57 58
LDADD = 		libsip.la \
			../msg/libmsg.la \
			../bnf/libbnf.la \
			../url/liburl.la \
Pekka Pessi's avatar
Pekka Pessi committed
59
			../ipt/libipt.la \
60
			../su/libsu.la
Pekka Pessi's avatar
Pekka Pessi committed
61

62
torture_sip_LDFLAGS = 	-static
63 64
test_sip_msg_LDFLAGS = 	-static
test_date_LDFLAGS = 	-static
65

Pekka Pessi's avatar
Pekka Pessi committed
66 67 68 69 70 71
# ----------------------------------------------------------------------
# Install and distribution rules

# note: srcdir needs to be specified, otherwise
#       breaks make distcheck target

72
EXTRA_DIST =		sip.docs sip_parser.docs sip.doxyaliases \
Pekka Pessi's avatar
Pekka Pessi committed
73 74
			ADD-A-HEADER GRAMMAR sip_bad_mask \
			sip_parser_table.c.in sip_tag.c.in \
75
			sip_extra_headers.txt \
76 77 78 79 80
	images/sip-parser.eps images/sip-parser.gif \
	images/sip-parser2.eps images/sip-parser2.gif \
	images/sip-parser3.eps images/sip-parser3.gif \
	images/sip-parser4.eps images/sip-parser4.gif \
	tests/own0.txt tests/own1.txt tests/own2.txt tests/own3.txt \
81
	tests/own4.txt tests/own5.txt tests/own6.txt tests/own8.txt \
82 83 84 85 86 87 88 89 90 91 92 93
	tests/test1.txt tests/test-ack-1.txt tests/test2.txt tests/test3.txt \
	tests/test4.txt tests/test5.txt tests/test6.txt tests/test7.txt	     \
	tests/test8.txt tests/test9.txt tests/test10.txt tests/test10b.txt   \
	tests/test10c.txt tests/test11.txt tests/test12.txt tests/test13.txt \
	tests/test14-req.txt tests/test14.txt tests/test15.txt		     \
	tests/test16.txt tests/test17.txt tests/test18.txt tests/test19.txt  \
	tests/test1a.txt tests/test20.txt tests/test21.txt tests/test22.txt  \
	tests/test23.txt tests/test24.txt tests/test25.txt tests/test26.txt  \
	tests/test27.txt tests/test28.txt tests/test29.txt tests/test30.txt  \
	tests/test31.txt tests/test32.txt tests/test33.txt tests/test34.txt  \
	tests/test35.txt tests/test36.txt tests/test37.txt tests/test38.txt  \
	tests/test39.txt tests/test40.txt tests/test41.txt tests/test42.txt
Pekka Pessi's avatar
Pekka Pessi committed
94 95 96 97

# ----------------------------------------------------------------------
# Tests

98
TESTS = torture_sip run_test_sip_msg run_test_date
Pekka Pessi's avatar
Pekka Pessi committed
99

100
dist_noinst_SCRIPTS = 	run_test_sip_msg run_test_date
Pekka Pessi's avatar
Pekka Pessi committed
101 102 103 104

# ----------------------------------------------------------------------
# Sofia specific rules

105
include $(top_srcdir)/rules/sofia.am
Pekka Pessi's avatar
Pekka Pessi committed
106

107
MSG_PARSER_AWK = $(srcdir)/../msg/msg_parser.awk
Pekka Pessi's avatar
Pekka Pessi committed
108

109
AWK_SIP_AWK = LC_ALL=C $(AWK) -f $(MSG_PARSER_AWK) module=sip
Pekka Pessi's avatar
Pekka Pessi committed
110

111
SS_SIP_H = ${srcdir}/sofia-sip/sip.h
112

113
EXTRA = ${srcdir}/sip_extra_headers.txt
114

115 116 117
${GENERATED_H} ${GENERATED_C}: ${SS_SIP_H} ${MSG_PARSER_AWK}

sofia-sip/sip_hclasses.h: ${srcdir}/sofia-sip/sip_hclasses.h.in
118
	@-mkdir sofia-sip 2>/dev/null || true
119 120
	${AWK_SIP_AWK} PR=$@ TEMPLATE=${srcdir}/sofia-sip/sip_hclasses.h.in \
		${SS_SIP_H}
121

122
sofia-sip/sip_protos.h: ${srcdir}/sofia-sip/sip_protos.h.in
123
	@-mkdir sofia-sip 2>/dev/null || true
124 125
	${AWK_SIP_AWK} PR=$@ TEMPLATE=${srcdir}/sofia-sip/sip_protos.h.in \
		 ${SS_SIP_H}
126

127
sofia-sip/sip_tag.h: ${srcdir}/sofia-sip/sip_tag.h.in
128
	@-mkdir sofia-sip 2>/dev/null || true
129 130
	${AWK_SIP_AWK} PR=$@ TEMPLATE=${srcdir}/sofia-sip/sip_tag.h.in \
		${SS_SIP_H}
131

132
sip_tag.c: ${srcdir}/sip_tag.c.in ${EXTRA}
133 134
	${AWK_SIP_AWK} PR=$@ TEMPLATE=${srcdir}/sip_tag.c.in \
		${SS_SIP_H} ${EXTRA}
135

136 137 138
# Note: sip_bad_mask is used by nta to weed out bad messages

sip_parser_table.c: ${srcdir}/sip_parser_table.c.in ${EXTRA} sip_bad_mask
139
	${AWK_SIP_AWK} PT=$@ TEMPLATE=${srcdir}/sip_parser_table.c.in \
140 141 142
		FLAGFILE=${srcdir}/sip_bad_mask \
		MC_HASH_SIZE=127 MC_SHORT_SIZE=26 \
		${SS_SIP_H} ${EXTRA}
143

144
sofia-sip/sip_extra.h: ${srcdir}/sofia-sip/sip_extra.h.in ${EXTRA}
145 146 147 148 149 150
	@-mkdir -p sofia-sip 2>/dev/null
	${AWK_SIP_AWK} PR=$@ NO_FIRST=1 NO_LAST=1 \
		PACKAGE_NAME="${PACKAGE_NAME}" \
		PACKAGE_VERSION="${PACKAGE_VERSION}" \
		TEMPLATE1=${srcdir}/sofia-sip/sip_hclasses.h.in \
		TEMPLATE2=${srcdir}/sofia-sip/sip_protos.h.in \
151
		TEMPLATE3=${srcdir}/sofia-sip/sip_tag.h.in \
152
		TEMPLATE=${srcdir}/sofia-sip/sip_extra.h.in ${EXTRA}