Radix cross Linux

The main Radix cross Linux repository contains the build scripts of packages, which have the most complete and common functionality for desktop machines

452 Commits   2 Branches   1 Tag

PACKAGE_NAME    = @PACKAGE_NAME@
PACKAGE_VERSION = @PACKAGE_VERSION@

prefix          = @prefix@
exec_prefix     = @prefix@

sysconfdir      = @sysconfdir@

bindir          = @bindir@
sbindir         = @sbindir@
libdir          = @libdir@
libexecdir      = @libexecdir@
localstatedir   = @localstatedir@
runstatedir     = @runstatedir@
sharedstatedir  = @sharedstatedir@

localedir       = @localedir@

includedir      = @includedir@
oldincludedir   = @oldincludedir@

datadir         = @datadir@
datarootdir     = @datarootdir@
docdir          = @datarootdir@/doc/@PACKAGE_NAME@-@PACKAGE_VERSION@

dvidir          = @dvidir@
htmldir         = @dvidir@/html
mandir          = @mandir@
pdfdir          = @pdfdir@
psdir           = @psdir@
infodir         = @infodir@

INSTALL         = @INSTALL@
INSTALL_DATA    = ${INSTALL} -m 644
LN_S            = @LN_S@


CC          = @CC@
AR          = @AR@
RANLIB      = @RANLIB@
STRIP       = @STRIP@

CFLAGS      = @CFLAGS@
LDFLAGS     = @LDFLAGS@
LIBS        = @LIBS@

APR_CFLAGS  = @APR_CFLAGS@
APR_LDFLAGS = @APR_LDFLAGS@
APR_LIBS    = @APR_LIBS@

DEFS      = -pthread -DNDEBUG -DLINUX -D_REENTRANT -D_GNU_SOURCE

SO_VERSION = $(shell echo $(PACKAGE_VERSION) | cut -f1,2 -d'.')

SOURCES = context.c \
          incoming.c \
          outgoing.c \
          ssltunnel.c \
          buckets/aggregate_buckets.c \
          buckets/allocator.c \
          buckets/barrier_buckets.c \
          buckets/buckets.c \
          buckets/bwtp_buckets.c \
          buckets/chunk_buckets.c \
          buckets/dechunk_buckets.c \
          buckets/deflate_buckets.c \
          buckets/file_buckets.c \
          buckets/headers_buckets.c \
          buckets/iovec_buckets.c \
          buckets/limit_buckets.c \
          buckets/mmap_buckets.c \
          buckets/request_buckets.c \
          buckets/response_body_buckets.c \
          buckets/response_buckets.c \
          buckets/simple_buckets.c \
          buckets/socket_buckets.c \
          buckets/ssl_buckets.c \
          auth/auth.c \
          auth/auth_basic.c \
          auth/auth_digest.c \
          auth/auth_spnego.c \
          auth/auth_spnego_gss.c \
          auth/auth_spnego_sspi.c

SO_OBJECTS = $(SOURCES:.c=.os)

AR_OBJECTS = $(SOURCES:.c=.o)


.SUFFIXES:
.SUFFIXES: .o .os .c
%.o : %.c
	$(CC) $(CFLAGS) $(APR_CFLAGS) $(DEFS) -c $< -o $@

%.os : %.c
	$(CC) $(CFLAGS) $(APR_CFLAGS) -fPIC $(DEFS) -c $< -o $@


all: libserf-1.a libserf-1.so.$(SO_VERSION).0

libserf-1.a: $(AR_OBJECTS)
	$(AR) rc $@ $^
	$(RANLIB) $@

libserf-1.so.$(SO_VERSION).0: $(SO_OBJECTS)
	$(CC) $(LDFLAGS) $(APR_LDFLAGS) -o $@ -pthread -shared -Wl,-soname=libserf-1.so.1 $^ $(APR_LIBS) $(LIBS)
	@ln -sf libserf-1.so.$(SO_VERSION).0 libserf-1.so.1
	@ln -sf libserf-1.so.$(SO_VERSION).0 libserf-1.so

install: libserf-1.a libserf-1.so.$(SO_VERSION).0 serf.h serf_bucket_types.h serf_bucket_util.h
	@mkdir -p $(DESTDIR)$(includedir)/serf-1
	$(INSTALL_DATA) serf.h $(DESTDIR)$(includedir)/serf-1
	$(INSTALL_DATA) serf_bucket_types.h $(DESTDIR)$(includedir)/serf-1
	$(INSTALL_DATA) serf_bucket_util.h $(DESTDIR)$(includedir)/serf-1
	@mkdir -p $(DESTDIR)$(libdir)
	$(INSTALL) -m 644 libserf-1.a $(DESTDIR)$(libdir)
	$(INSTALL) -m 755 libserf-1.so.$(SO_VERSION).0 $(DESTDIR)$(libdir)
	@$(LN_S) -fr $(DESTDIR)$(libdir)/libserf-1.so.$(SO_VERSION).0 $(DESTDIR)$(libdir)/libserf-1.so.1
	@$(LN_S) -fr $(DESTDIR)$(libdir)/libserf-1.so.$(SO_VERSION).0 $(DESTDIR)$(libdir)/libserf-1.so
	@mkdir -p $(DESTDIR)$(libdir)/pkgconfig
	$(INSTALL_DATA) serf-1.pc $(DESTDIR)$(libdir)/pkgconfig
	@mkdir -p $(DESTDIR)$(docdir)
	$(INSTALL_DATA) LICENSE NOTICE README STATUS design-guide.txt $(DESTDIR)$(docdir)

clean:
	rm -f *.{o,os} auth/*.{o,os} buckets/*.{o,os} libserf-1.a libserf-1.so*

distclean:
	@rm -f *~
	@rm -rf autom4te.cache
	@rm -f aclocal.m4
	@rm -f config.h.in config.h
	@rm -f config.log config.status config.cache
	@rm -f config.guess config.sub
	@rm -f configure
	@rm -f Makefile
	@rm -f serf-1.pc