Makefile.am 4 KB
Newer Older
Pekka Pessi's avatar
Pekka Pessi committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#
# Makefile.am for sip module
#

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

INCLUDES = 	-I$(srcdir)/../bnf \
		-I$(srcdir)/../ipt \
		-I$(srcdir)/../msg \
		-I$(srcdir)/../url \
		-I$(srcdir)/../su

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

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

noinst_PROGRAMS =       torture_sip \
Pekka Pessi's avatar
Pekka Pessi committed
20
			sip_test_msg validator date_test
Pekka Pessi's avatar
Pekka Pessi committed
21 22 23 24

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

25 26
GENERATED_H = sip_hclasses.h sip_protos.h sip_tag.h
H_IN = sip_hclasses.h.in sip_protos.h.in sip_tag.h.in
Pekka Pessi's avatar
Pekka Pessi committed
27 28 29 30 31 32 33 34 35 36 37 38

PUBLIC_H = sip.h sip_extensions.h sip_util.h \
           sip_header.h sip_parser.h \
	   sip_tag_class.h sip_dll.h sip_status.h
INTERNAL_H = sip_internal.h 

GENERATED_C = sip_tag.c sip_tag_ref.c sip_parser_table.c

# EXTRA_DIST = $(GENERATED_C:%.in=%)

BUILT_SOURCES = 	$(GENERATED_H) $(GENERATED_C)

39
include_sofia_HEADERS = 	$(GENERATED_H) $(PUBLIC_H) $(H_IN)
Pekka Pessi's avatar
Pekka Pessi committed
40

Pekka Pessi's avatar
Pekka Pessi committed
41
libsip_la_SOURCES = 	$(INTERNAL_H) \
Pekka Pessi's avatar
Pekka Pessi committed
42 43 44 45 46 47 48 49 50
			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 \
			sip_tag_class.c \
			$(GENERATED_C)

51
COVERAGE_INPUT = 	$(libsip_la_SOURCES) $(include_sofia_HEADERS)
52

Pekka Pessi's avatar
Pekka Pessi committed
53 54 55 56 57
LDADD = 		libsip.la \
			../msg/libmsg.la \
			../bnf/libbnf.la \
			../url/liburl.la \
			../su/libsu.la
Pekka Pessi's avatar
Pekka Pessi committed
58

59 60 61 62
torture_sip_LDFLAGS = 	-static
sip_test_msg_LDFLAGS = 	-static
date_test_LDFLAGS = 	-static

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

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

EXTRA_DIST =		Doxyfile sip.docs sip_parser.docs \
			ADD-A-HEADER GRAMMAR sip_bad_mask \
			sip_parser_table.c.in sip_tag.c.in \
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
			sip_bad_mask \
	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 \
	tests/own4.txt tests/own5.txt tests/own6.txt \
	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
91 92 93 94 95 96 97 98 99 100 101 102 103

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

TESTS = torture_sip run_sip_test_msg run_date_test

dist_noinst_SCRIPTS = 	run_sip_test_msg run_date_test

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

include ../sofia.am

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

106
AWK_SIP_AWK = $(AWK) -f $(MSG_PARSER_AWK) module=sip
Pekka Pessi's avatar
Pekka Pessi committed
107 108 109 110

#
# Note: sip_bad_mask is used by nta to weed out bad messages
#
111 112
sip_parser_table.c: sip_bad_mask

113 114 115 116 117
sip_hclasses.h: sip_hclasses.h.in $(MSG_PARSER_AWK)
sip_protos.h: sip_protos.h.in $(MSG_PARSER_AWK)
sip_tag.h: sip_tag.h.in $(MSG_PARSER_AWK)
sip_parser_table.c: sip_parser_table.c.in $(MSG_PARSER_AWK)
sip_tag.c: sip_tag.c.in $(MSG_PARSER_AWK)
118

119 120
sip_tag.c sip_hclasses.h sip_protos.h sip_tag.h: sip.h
	$(AWK_SIP_AWK) PR=$@ TEMPLATE=$(srcdir)/$@.in $<
121 122

sip_parser_table.c: sip.h
123
	$(AWK_SIP_AWK) PT=$@ FLAGFILE=$(srcdir)/sip_bad_mask \
124
		MC_HASH_SIZE=127 MC_SHORT_SIZE=26 $<