1#/**************************************************************
2# *
3# * Licensed to the Apache Software Foundation (ASF) under one
4# * or more contributor license agreements.  See the NOTICE file
5# * distributed with this work for additional information
6# * regarding copyright ownership.  The ASF licenses this file
7# * to you under the Apache License, Version 2.0 (the
8# * "License"); you may not use this file except in compliance
9# * with the License.  You may obtain a copy of the License at
10# *
11# *   http://www.apache.org/licenses/LICENSE-2.0
12# *
13# * Unless required by applicable law or agreed to in writing,
14# * software distributed under the License is distributed on an
15# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16# * KIND, either express or implied.  See the License for the
17# * specific language governing permissions and limitations
18# * under the License.
19# *
20# *************************************************************/
21
22$(eval $(call gb_Library_Library,serf))
23
24$(eval $(call gb_Library_add_package_headers,serf,serf_inc))
25
26$(eval $(call gb_Library_set_include,serf,\
27	$$(INCLUDE) \
28	-I. \
29	-I$(OUTDIR)/inc/apr \
30	-I$(OUTDIR)/inc/apr-util \
31	-I$(OUTDIR)/inc/external/zlib \
32))
33
34$(eval $(call gb_Library_set_defs,serf,\
35	$$(DEFS) \
36	-DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DWIN32_EXPORTS \
37))
38
39ORIGINAL_DEF_FILE=build/serf.def
40FIXED_DEF_FILE=build/fixed-serf.def
41
42$(call gb_LinkTarget_get_target,$(call gb_Library__get_linktargetname,serf)) : $(FIXED_DEF_FILE)
43$(FIXED_DEF_FILE) : $(ORIGINAL_DEF_FILE)
44	cp $< $@
45	echo serf_bucket_request_set_CL >> $@
46
47$(eval $(call gb_Library_set_ldflags,serf,\
48	$$(LDFLAGS) \
49	-DEF:$(FIXED_DEF_FILE)	\
50))
51
52$(eval $(call gb_Library_add_linked_libs,serf,\
53	apr \
54	apr-util \
55	libeay32 \
56	ssleay32 \
57	zlib \
58    $(gb_STDLIBS) \
59))
60
61$(eval $(call gb_Library_add_cobjects,serf,\
62	serf/$(INPATH)/misc/build/serf-1.2.1/auth/auth \
63	serf/$(INPATH)/misc/build/serf-1.2.1/auth/auth_basic \
64	serf/$(INPATH)/misc/build/serf-1.2.1/auth/auth_digest \
65	serf/$(INPATH)/misc/build/serf-1.2.1/auth/auth_kerb \
66	serf/$(INPATH)/misc/build/serf-1.2.1/auth/auth_kerb_gss \
67	serf/$(INPATH)/misc/build/serf-1.2.1/auth/auth_kerb_sspi \
68	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/aggregate_buckets \
69	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/allocator \
70	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/barrier_buckets \
71	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/buckets \
72	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/bwtp_buckets \
73	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/chunk_buckets \
74	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/dechunk_buckets \
75	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/deflate_buckets \
76	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/file_buckets \
77	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/headers_buckets \
78	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/iovec_buckets \
79	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/limit_buckets \
80	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/mmap_buckets \
81	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/request_buckets \
82	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/response_body_buckets \
83	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/response_buckets \
84	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/simple_buckets \
85	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/socket_buckets \
86	serf/$(INPATH)/misc/build/serf-1.2.1/buckets/ssl_buckets \
87	serf/$(INPATH)/misc/build/serf-1.2.1/context \
88	serf/$(INPATH)/misc/build/serf-1.2.1/incoming \
89	serf/$(INPATH)/misc/build/serf-1.2.1/outgoing \
90	serf/$(INPATH)/misc/build/serf-1.2.1/ssltunnel \
91))
92