summaryrefslogtreecommitdiff
path: root/src/Makefile.in
blob: 04b308ed379f8b1436c63a95b4ed800249549a6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#
# neon source directory Makefile
# 
# Use the NEON_NORMAL_BUILD or NEON_LIBTOOL_BUILD autoconf 
# macros to set up this Makefile correctly.
#

SHELL = @SHELL@

# Installation paths
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@

# Build paths
VPATH = @srcdir@
top_builddir = ..
top_srcdir = @top_srcdir@

# Toolchain settings.
CC = @CC@
AR = @AR@
RANLIB = @RANLIB@
LIBTOOL = @LIBTOOL@

# Flags
CPPFLAGS = @DEFS@ @CPPFLAGS@
CFLAGS = @CFLAGS@ @NEON_CFLAGS@
LDFLAGS = @LDFLAGS@
NEON_LINK_FLAGS = @NEON_LINK_FLAGS@
# Note: don't substitute @LIBS@ in here; during a bundled
# build of this directory, @LIBS@ may include -lneon.
LIBS = @NEON_LIBS@

COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS)
LINK = $(LIBTOOL) --quiet --mode=link $(CC) $(LDFLAGS)

NEON_BASEOBJS = ne_request.@NEON_OBJEXT@ ne_session.@NEON_OBJEXT@ 	    \
	ne_basic.@NEON_OBJEXT@  ne_string.@NEON_OBJEXT@ 		    \
	ne_uri.@NEON_OBJEXT@ ne_dates.@NEON_OBJEXT@ ne_alloc.@NEON_OBJEXT@  \
	ne_md5.@NEON_OBJEXT@ ne_utils.@NEON_OBJEXT@    \
	ne_socket.@NEON_OBJEXT@ ne_auth.@NEON_OBJEXT@ 			    \
	ne_cookies.@NEON_OBJEXT@ ne_redirect.@NEON_OBJEXT@		    \
	ne_compress.@NEON_OBJEXT@

NEON_DAVOBJS = $(NEON_BASEOBJS) \
	ne_207.@NEON_OBJEXT@ ne_xml.@NEON_OBJEXT@ \
	ne_props.@NEON_OBJEXT@ ne_locks.@NEON_OBJEXT@

OBJECTS = @NEONOBJS@ @NEON_EXTRAOBJS@

.SUFFIXES:
.SUFFIXES: .c .lo .o

NEON_TARGET = @NEON_TARGET@

# Thanks to gettext for this neat trick.
all: all-@NEON_BUILD_BUNDLED@

all-yes: $(NEON_TARGET)
all-no:
	@echo "Bundled neon build not being used."

.c.lo:
	$(LIBTOOL) --quiet --mode=compile $(COMPILE) -c $< -o $@
.c.o:
	$(COMPILE) -c $< -o $@

libneon.la: $(OBJECTS)
	$(LINK) -rpath $(libdir) $(NEON_LINK_FLAGS) -o $@ $(OBJECTS) $(LIBS)

libneon.a: $(OBJECTS)
	$(AR) cru $@ $(OBJECTS)
	$(RANLIB) $@

clean:
	rm -f $(NEON_TARGET) *.o *.lo
	rm -rf .libs

c++.c:
	find . -name ne_\*.h -print | sed 's/.*/#include "&"/;/ne_private/d' > $@
	echo "int main(void) {}" >> $@

check-c++: c++.c
	c++ -I. c++.c

check-incl:
	@for f in ne_*.h; do \
	 echo Checking $$f...; \
	 echo "#include \"$$f\"" > checkincl.c; \
	 $(COMPILE) -c checkincl.c -o checkincl.o || exit 1; done

neonreq = ne_request.h ne_session.h ne_utils.h ne_string.h ne_socket.h \
	ne_alloc.h $(top_builddir)/config.h ne_private.h

ne_request.@NEON_OBJEXT@: ne_request.c $(neonreq) ne_i18n.h ne_private.h \
	ne_uri.h

ne_session.@NEON_OBJEXT@: ne_session.c ne_session.h ne_alloc.h \
	ne_utils.h ne_private.h $(top_builddir)/config.h

ne_openssl.@NEON_OBJEXT@: ne_openssl.c ne_session.h ne_ssl.h ne_privssl.h \
	ne_private.h $(top_builddir)/config.h

ne_socket.@NEON_OBJEXT@: ne_socket.c ne_socket.h $(top_builddir)/config.h \
	ne_privssl.h ne_string.h

ne_auth.@NEON_OBJEXT@: ne_auth.c ne_auth.h $(neonreq) \
	ne_dates.h ne_md5.h ne_uri.h 

ne_basic.@NEON_OBJEXT@: ne_basic.c ne_basic.h $(neonreq)

ne_utils.@NEON_OBJEXT@: ne_utils.c $(top_builddir)/config.h \
	ne_utils.h ne_dates.h

ne_xml.@NEON_OBJEXT@: ne_xml.c ne_xml.h ne_string.h ne_utils.h \
	$(top_builddir)/config.h

ne_207.@NEON_OBJEXT@: ne_207.c ne_207.h ne_xml.h \
	$(top_builddir)/config.h ne_utils.h ne_i18n.h

ne_string.@NEON_OBJEXT@: ne_string.c ne_string.h ne_alloc.h \
	$(top_builddir)/config.h

ne_alloc.@NEON_OBJEXT@: ne_alloc.c ne_alloc.h $(top_builddir)/config.h

ne_dates.@NEON_OBJEXT@: ne_dates.c ne_dates.h $(top_builddir)/config.h

ne_uri.@NEON_OBJEXT@: ne_uri.c ne_uri.h ne_utils.h ne_string.h ne_alloc.h \
	$(top_builddir)/config.h

ne_md5.@NEON_OBJEXT@: ne_md5.c ne_md5.h $(top_builddir)/config.h

ne_props.@NEON_OBJEXT@: ne_props.c $(top_builddir)/config.h \
	ne_props.h ne_207.h ne_xml.h $(neonreq)

ne_locks.@NEON_OBJEXT@: ne_locks.c $(neonreq) ne_locks.h ne_207.h ne_xml.h

ne_redirect.@NEON_OBJEXT@: ne_redirect.c $(neonreq) ne_redirect.h \
	ne_uri.h ne_private.h

ne_cookies.@NEON_OBJEXT@: ne_cookies.c $(neonreq) ne_cookies.h ne_uri.h \
	ne_private.h

ne_compress.@NEON_OBJEXT@: ne_compress.c $(neonreq) ne_compress.h

ne_acl.@NEON_OBJEXT@: ne_acl.c ne_acl.h $(neonreq)