1# 2# neon source directory Makefile 3# 4# Use the NEON_NORMAL_BUILD or NEON_LIBTOOL_BUILD autoconf 5# macros to set up this Makefile correctly. 6# 7 8SHELL = @SHELL@ 9 10# Installation paths 11prefix = @prefix@ 12exec_prefix = @exec_prefix@ 13libdir = @libdir@ 14 15# Build paths 16VPATH = @srcdir@ 17top_builddir = .. 18top_srcdir = @top_srcdir@ 19 20# Toolchain settings. 21CC = @CC@ 22AR = @AR@ 23RANLIB = @RANLIB@ 24LIBTOOL = @LIBTOOL@ 25 26# Flags 27CPPFLAGS = @DEFS@ @CPPFLAGS@ 28CFLAGS = @CFLAGS@ -I$(top_builddir) -I$(top_srcdir)/../expat/lib @NEON_CFLAGS@ 29LDFLAGS = -L$(top_builddir)/../expat @LDFLAGS@ 30NEON_LINK_FLAGS = @NEON_LINK_FLAGS@ 31# Note: don't substitute @LIBS@ in here; during a bundled 32# build of this directory, @LIBS@ may include -lneon. 33LIBS = @NEON_LIBS@ @NEON_LTLIBS@ 34 35COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) -I$(top_builddir) -I$(top_srcdir)/../expat/lib @NEON_CFLAGS@ 36LINK = $(LIBTOOL) --quiet --mode=link $(CC) $(LDFLAGS) 37 38NEON_BASEOBJS = ne_request.@NEON_OBJEXT@ ne_session.@NEON_OBJEXT@ \ 39 ne_basic.@NEON_OBJEXT@ ne_string.@NEON_OBJEXT@ \ 40 ne_uri.@NEON_OBJEXT@ ne_dates.@NEON_OBJEXT@ ne_alloc.@NEON_OBJEXT@ \ 41 ne_md5.@NEON_OBJEXT@ ne_utils.@NEON_OBJEXT@ \ 42 ne_socket.@NEON_OBJEXT@ ne_auth.@NEON_OBJEXT@ \ 43 ne_cookies.@NEON_OBJEXT@ ne_redirect.@NEON_OBJEXT@ \ 44 ne_compress.@NEON_OBJEXT@ 45 46NEON_DAVOBJS = $(NEON_BASEOBJS) \ 47 ne_207.@NEON_OBJEXT@ ne_xml.@NEON_OBJEXT@ \ 48 ne_props.@NEON_OBJEXT@ ne_locks.@NEON_OBJEXT@ 49 50OBJECTS = @NEONOBJS@ @NEON_EXTRAOBJS@ 51 52.SUFFIXES: 53.SUFFIXES: .c .lo .o 54 55NEON_TARGET = @NEON_TARGET@ 56 57# Thanks to gettext for this neat trick. 58all: all-@NEON_BUILD_BUNDLED@ libneon.a 59 60all-yes: $(NEON_TARGET) 61all-no: 62 @echo "Bundled neon build not being used." 63 64.c.lo: 65 $(LIBTOOL) --quiet --mode=compile $(COMPILE) -c $< -o $@ 66.c.o: 67 $(COMPILE) -c $< -o $@ 68 69libneon.la: $(OBJECTS) 70 $(LINK) -rpath $(libdir) $(NEON_LINK_FLAGS) -o $@ $(OBJECTS) $(LIBS) 71 72libneon.a: $(OBJECTS) 73 $(AR) cru $@ $(addsuffix .o, $(basename $(OBJECTS))) 74 $(RANLIB) $@ 75 76clean: 77 rm -f $(NEON_TARGET) *.o *.lo 78 rm -rf .libs 79 80c++.c: 81 find . -name ne_\*.h -print | sed 's/.*/#include "&"/;/ne_private/d' > $@ 82 echo "int main(void) {}" >> $@ 83 84check-c++: c++.c 85 c++ -I. c++.c 86 87check-incl: 88 @for f in ne_*.h; do \ 89 echo Checking $$f...; \ 90 echo "#include \"$$f\"" > checkincl.c; \ 91 $(COMPILE) -c checkincl.c -o checkincl.o || exit 1; done 92 93neonreq = ne_request.h ne_session.h ne_utils.h ne_string.h ne_socket.h \ 94 ne_alloc.h $(top_builddir)/config.h ne_private.h 95 96ne_request.@NEON_OBJEXT@: ne_request.c $(neonreq) ne_i18n.h ne_private.h \ 97 ne_uri.h 98 99ne_session.@NEON_OBJEXT@: ne_session.c ne_session.h ne_alloc.h \ 100 ne_utils.h ne_private.h $(top_builddir)/config.h 101 102ne_openssl.@NEON_OBJEXT@: ne_openssl.c ne_session.h ne_ssl.h ne_privssl.h \ 103 ne_private.h $(top_builddir)/config.h 104 105ne_socket.@NEON_OBJEXT@: ne_socket.c ne_socket.h $(top_builddir)/config.h \ 106 ne_privssl.h ne_string.h 107 108ne_auth.@NEON_OBJEXT@: ne_auth.c ne_auth.h $(neonreq) \ 109 ne_dates.h ne_md5.h ne_uri.h 110 111ne_basic.@NEON_OBJEXT@: ne_basic.c ne_basic.h $(neonreq) 112 113ne_utils.@NEON_OBJEXT@: ne_utils.c $(top_builddir)/config.h \ 114 ne_utils.h ne_dates.h 115 116ne_xml.@NEON_OBJEXT@: ne_xml.c ne_xml.h ne_string.h ne_utils.h \ 117 $(top_builddir)/config.h 118 119ne_207.@NEON_OBJEXT@: ne_207.c ne_207.h ne_xml.h \ 120 $(top_builddir)/config.h ne_utils.h ne_i18n.h 121 122ne_string.@NEON_OBJEXT@: ne_string.c ne_string.h ne_alloc.h \ 123 $(top_builddir)/config.h 124 125ne_alloc.@NEON_OBJEXT@: ne_alloc.c ne_alloc.h $(top_builddir)/config.h 126 127ne_dates.@NEON_OBJEXT@: ne_dates.c ne_dates.h $(top_builddir)/config.h 128 129ne_uri.@NEON_OBJEXT@: ne_uri.c ne_uri.h ne_utils.h ne_string.h ne_alloc.h \ 130 $(top_builddir)/config.h 131 132ne_md5.@NEON_OBJEXT@: ne_md5.c ne_md5.h $(top_builddir)/config.h 133 134ne_props.@NEON_OBJEXT@: ne_props.c $(top_builddir)/config.h \ 135 ne_props.h ne_207.h ne_xml.h $(neonreq) 136 137ne_locks.@NEON_OBJEXT@: ne_locks.c $(neonreq) ne_locks.h ne_207.h ne_xml.h 138 139ne_redirect.@NEON_OBJEXT@: ne_redirect.c $(neonreq) ne_redirect.h \ 140 ne_uri.h ne_private.h 141 142ne_cookies.@NEON_OBJEXT@: ne_cookies.c $(neonreq) ne_cookies.h ne_uri.h \ 143 ne_private.h 144 145ne_compress.@NEON_OBJEXT@: ne_compress.c $(neonreq) ne_compress.h 146 147ne_acl.@NEON_OBJEXT@: ne_acl.c ne_acl.h $(neonreq) 148