Makefile.am 2.64 KB
Newer Older
Pekka Pessi's avatar
Pekka Pessi committed
1 2 3
#
# Makefile.am for http module
#
4 5 6
# Copyright (C) 2005,2006 Nokia Corporation
# Contact: Pekka Pessi <pekka.pessi@nokia.com>
# Licensed under LGPL. See file COPYING.
Pekka Pessi's avatar
Pekka Pessi committed
7 8 9 10

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

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

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

19
noinst_LTLIBRARIES = 	libhttp.la
20

21
check_PROGRAMS = 	test_http
Pekka Pessi's avatar
Pekka Pessi committed
22

23
TESTS = 		test_http
Pekka Pessi's avatar
Pekka Pessi committed
24 25 26 27

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

28 29 30
PUBLIC_H = 		sofia-sip/http.h sofia-sip/http_header.h \
			sofia-sip/http_parser.h sofia-sip/http_tag_class.h \
			sofia-sip/http_status.h sofia-sip/http_hclasses.h
Pekka Pessi's avatar
Pekka Pessi committed
31

32
BUILT_H = 		sofia-sip/http_protos.h sofia-sip/http_tag.h
33
BUILT_C = 		http_tag.c http_parser_table.c
Pekka Pessi's avatar
Pekka Pessi committed
34

35
BUILT_SOURCES = 	$(BUILT_H) $(BUILT_C) http_tag_ref.c
Pekka Pessi's avatar
Pekka Pessi committed
36

37
nobase_include_sofia_HEADERS = $(BUILT_H) $(PUBLIC_H)
Pekka Pessi's avatar
Pekka Pessi committed
38

39
libhttp_la_SOURCES = 	$(INTERNAL_H) \
Pekka Pessi's avatar
Pekka Pessi committed
40
			http_parser.c http_header.c \
Pekka Pessi's avatar
Pekka Pessi committed
41
			http_basic.c http_extra.c http_inlined.c \
Pekka Pessi's avatar
Pekka Pessi committed
42
			http_status.c http_tag_class.c \
43
			$(BUILT_SOURCES)
Pekka Pessi's avatar
Pekka Pessi committed
44

45
COVERAGE_INPUT = 	$(libhttp_la_SOURCES) $(include_sofia_HEADERS)
46

47 48 49 50
LDADD = 		libhttp.la \
			../bnf/libbnf.la \
			../msg/libmsg.la \
			../url/liburl.la \
Pekka Pessi's avatar
Pekka Pessi committed
51
			../ipt/libipt.la \
52
			../su/libsu.la
Pekka Pessi's avatar
Pekka Pessi committed
53

54
test_http_LDFLAGS = 	-static
Pekka Pessi's avatar
Pekka Pessi committed
55 56 57 58

# ----------------------------------------------------------------------
# Install and distribution rules

59
EXTRA_DIST =		http.docs \
60 61
			sofia-sip/http_protos.h.in \
			sofia-sip/http_tag.h.in \
62
			http_parser_table.c.in \
63
			http_tag.c.in
Pekka Pessi's avatar
Pekka Pessi committed
64 65 66 67

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

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

70
TAG_DLL_FLAGS = DLLREF=1
Pekka Pessi's avatar
Pekka Pessi committed
71

72
MSG_PARSER_AWK = ${srcdir}/../msg/msg_parser.awk
Pekka Pessi's avatar
Pekka Pessi committed
73

74
AWK_HTTP_AWK = LC_ALL=C ${AWK} -f ${MSG_PARSER_AWK} module=http
Pekka Pessi's avatar
Pekka Pessi committed
75

76
SS_HTTP_H = ${srcdir}/sofia-sip/http.h
Pekka Pessi's avatar
Pekka Pessi committed
77

78 79
${BUILT_H} ${BUILT_C}: ${srcdir}/sofia-sip/http.h ${MSG_PARSER_AWK}

80
sofia-sip/http_protos.h: ${srcdir}/sofia-sip/http_protos.h.in
81
	@-mkdir sofia-sip 2>/dev/null || true
82
	${AWK_HTTP_AWK} PR=$@ TEMPLATE=${srcdir}/sofia-sip/http_protos.h.in ${SS_HTTP_H}
Pekka Pessi's avatar
Pekka Pessi committed
83

84
sofia-sip/http_tag.h: ${srcdir}/sofia-sip/http_tag.h.in
85
	@-mkdir sofia-sip 2>/dev/null || true
86
	${AWK_HTTP_AWK} PR=$@ TEMPLATE=${srcdir}/sofia-sip/http_tag.h.in ${SS_HTTP_H}
87

88
http_tag.c: ${srcdir}/http_tag.c.in
89
	${AWK_HTTP_AWK} PR=$@ TEMPLATE=${srcdir}/http_tag.c.in ${SS_HTTP_H}
90

91
http_parser_table.c: ${srcdir}/http_parser_table.c.in
92
	${AWK_HTTP_AWK} PT=$@ TEMPLATE=${srcdir}/http_parser_table.c.in \
93
		MC_HASH_SIZE=127 ${SS_HTTP_H}