Makefile.am 3.89 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 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

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

GENERATED_H = sip_hclasses.h sip_protos.h sip_tag.h sip_rfc2543.h
H_IN = sip_hclasses.h.in sip_protos.h.in sip_tag.h.in

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)

include_HEADERS = 	$(GENERATED_H) $(PUBLIC_H) $(H_IN)

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)

Pekka Pessi's avatar
Pekka Pessi committed
51 52
COVERAGE_INPUT = 	$(libsip_la_SOURCES) $(include_HEADERS)
COVERAGE_INPUT = 	$(libsip_la_SOURCES) $(include_HEADERS)
53

Pekka Pessi's avatar
Pekka Pessi committed
54 55 56 57 58
LDADD = 		libsip.la \
			../msg/libmsg.la \
			../bnf/libbnf.la \
			../url/liburl.la \
			../su/libsu.la
Pekka Pessi's avatar
Pekka Pessi committed
59 60 61 62 63 64 65 66 67 68 69

# ----------------------------------------------------------------------
# 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 \
			sip_rfc2543.h.in sip_rfc2543.c \
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
			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
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121

# ----------------------------------------------------------------------
# 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

s = $(srcdir)
m = $(s)/../msg

SIP_H = $s/sip.h 

#
# Note: sip_bad_mask is used by nta to weed out bad messages
#
$s/sip_parser_table.c: \
		$m/msg_parser.awk $s/sip_parser_table.c.in \
		${SIP_H} $s/sip_bad_mask
	$(AWK) -f $m/msg_parser.awk module=sip PT=$@ \
		FLAGFILE=$s/sip_bad_mask \
		MC_HASH_SIZE=127 MC_SHORT_SIZE=26 ${SIP_H}

$s/sip_%.h: $m/msg_parser.awk $s/sip_%.h.in ${SIP_H}
	$(AWK) -f $m/msg_parser.awk module=sip PR=$@ ${SIP_H}

$s/sip_%.c: $m/msg_parser.awk $s/sip_%.c.in ${SIP_H}
	$(AWK) -f $m/msg_parser.awk module=sip PR=$@ ${SIP_H}