Makefile.am 1.96 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
#
# Makefile.am for http module
#

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

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

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

Pekka Pessi's avatar
Pekka Pessi committed
16
noinst_LTLIBRARIES = 	libhttp.la
17

18
noinst_PROGRAMS = 	test_http
Pekka Pessi's avatar
Pekka Pessi committed
19

20
TESTS = 		test_http
Pekka Pessi's avatar
Pekka Pessi committed
21 22 23 24 25 26 27 28 29 30 31 32

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

PUBLIC_H = http.h http_header.h http_parser.h \
	   http_tag_class.h http_dll.h http_status.h http_hclasses.h

BUILT_H = http_protos.h http_tag.h 
BUILT_C = http_tag.c http_tag_ref.c http_parser_table.c

BUILT_SOURCES = $(BUILT_H) $(BUILT_C)

33
include_sofia_HEADERS = 	$(BUILT_H) $(PUBLIC_H) 
Pekka Pessi's avatar
Pekka Pessi committed
34

Pekka Pessi's avatar
Pekka Pessi committed
35
libhttp_la_SOURCES = 	$(INTERNAL_H) \
Pekka Pessi's avatar
Pekka Pessi committed
36 37 38 39 40
			http_parser.c http_header.c \
			http_basic.c http_extra.c \
			http_status.c http_tag_class.c \
			$(BUILT_C)

41
COVERAGE_INPUT = 	$(libhttp_la_SOURCES) $(include_sofia_HEADERS)
42

Pekka Pessi's avatar
Pekka Pessi committed
43 44 45 46 47
LDADD = 		libhttp.la \
			../bnf/libbnf.la \
			../msg/libmsg.la \
			../url/liburl.la \
			../su/libsu.la
Pekka Pessi's avatar
Pekka Pessi committed
48

49
test_http_LDFLAGS = 	-static
Pekka Pessi's avatar
Pekka Pessi committed
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64

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

EXTRA_DIST =		Doxyfile http.docs \
			http_parser_table.c.in \
			http_protos.h.in \
			http_tag.c.in \
			http_tag.h.in 

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

include ../sofia.am

65
TAG_DLL_FLAGS = DLLREF=1
Pekka Pessi's avatar
Pekka Pessi committed
66

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

69
AWK_HTTP_AWK = $(AWK) -f $(MSG_PARSER_AWK) module=http
Pekka Pessi's avatar
Pekka Pessi committed
70

71 72 73 74
http_tag.h: http_tag.h.in $(MSG_PARSER_AWK)
http_protos.h: http_protos.h.in $(MSG_PARSER_AWK)
http_tag.c: http_tag.c.in $(MSG_PARSER_AWK)
http_parser_table.c: http_parser_table.c.in $(MSG_PARSER_AWK)
Pekka Pessi's avatar
Pekka Pessi committed
75

76 77
http_tag.c http_protos.h http_tag.h: http.h
	$(AWK_HTTP_AWK) PR=$@ TEMPLATE=$(srcdir)/$@.in $<
Pekka Pessi's avatar
Pekka Pessi committed
78

79
http_parser_table.c: http.h
80
	$(AWK_HTTP_AWK) PT=$@ MC_HASH_SIZE=127 $<