]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - compat/Makefile.am
SourceFormat Enforcement
[thirdparty/squid.git] / compat / Makefile.am
index 4e0eac8ba59353624c22641222bbdf820d08e85a..85a34dcd833a4b23b11f64d9c9c1886b678e6ec5 100644 (file)
+## Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+##
+## Squid software is distributed under GPLv2+ license and includes
+## contributions from numerous individuals and organizations.
+## Please see the COPYING and CONTRIBUTORS files for details.
+
 #
 #  Makefile for the Squid Portability Library
 #
 
-# Housekeeping, shared by all Squid Makefiles.
-# TODO: make this set by configure?
-AM_CFLAGS = @SQUID_CFLAGS@
-AM_CXXFLAGS = @SQUID_CXXFLAGS@
-DEFS = @DEFS@
-CLEANFILES = 
-
-INCLUDES = \
-       -I$(top_srcdir) \
-       -I$(top_srcdir)/src \
-       -I$(top_srcdir)/include \
-       -I$(top_builddir)/include \
-       -I$(top_builddir)/lib \
-       @SQUID_CPPUNIT_INC@
+include $(top_srcdir)/src/Common.am
 
-$(OBJS): $(top_srcdir)/include/version.h $(top_srcdir)/include/autoconf.h
+AUTOMAKE_OPTIONS = subdir-objects
 
 # Ideally this would be 100% inline functions and macro wrappers.
 
 # Port Specific Configurations
 
-noinst_LTLIBRARIES = libcompat.la
-
-libcompat_la_SOURCES = \
+noinst_LTLIBRARIES = libcompat-squid.la
+libcompat_squid_la_SOURCES = \
+       assert.cc \
        assert.h \
+       cmsg.h \
+       compat.cc \
        compat.h \
        compat_shared.h \
+       cpu.h \
+       cppunit.h \
+       debug.cc \
+       debug.h \
+       drand48.h \
+       eui64_aton.h \
+       eui64_aton.c \
        fdsetsize.h \
+       getaddrinfo.cc \
+       getaddrinfo.h \
+       getnameinfo.cc \
+       getnameinfo.h \
+       GnuRegex.c \
+       GnuRegex.h \
+       inet_ntop.cc \
+       inet_ntop.h \
+       inet_pton.cc \
+       inet_pton.h \
+       initgroups.h \
+       memrchr.cc \
+       memrchr.h \
        osdetect.h \
+       psignal.h \
+       shm.cc \
+       shm.h \
+       statvfs.h \
+       statvfs.cc \
+       stdio.h \
        stdvarargs.h \
+       strnstr.cc \
+       strtoll.h \
+       strnrchr.h \
+       strnrchr.c \
+       tempnam.h \
+       types.h \
        valgrind.h \
+       xalloc.cc \
+       xalloc.h \
+       xis.h \
+       xstrerror.cc \
+       xstrerror.h \
+       xstring.cc \
+       xstring.h \
+       xstrto.cc \
+       xstrto.h \
        \
        os/aix.h \
+       os/android.h \
        os/dragonfly.h \
        os/freebsd.h \
        os/hpux.h \
        os/linux.h \
-       os/mswin.h \
+       os/macosx.h \
+       os/mswindows.h \
+       mswindows.cc \
+       os/netbsd.h \
        os/next.h \
        os/openbsd.h \
+       os/opensolaris_10_netdb.h \
        os/os2.h \
        os/qnx.h \
        os/sgi.h \
        os/solaris.h \
-       os/sunos.h \
-       os/windows.h \
-       \
-       assert.cc \
-       compat.cc \
-       GnuRegex.h \
-       GnuRegex.c
+       os/sunos.h
+
+libcompat_squid_la_LIBADD= $(LTLIBOBJS)
 
+check_PROGRAMS += testPreCompiler
+TESTS += testPreCompiler
 
-check_PROGRAMS= testHeaders
-TESTS= $(check_PROGRAMS)
+testPreCompiler_SOURCES= \
+       testPreCompiler.h \
+       testPreCompiler.cc
+testPreCompiler_LDADD= $(SQUID_CPPUNIT_LA) $(SQUID_CPPUNIT_LIBS)
+testPreCompiler_LDFLAGS=
+
+# os/ subdir prevents us using src/TestHeaders.am
+#
+TESTS += testHeaders
 
 ## Special Universal .h dependency test script
 ## aborts if error encountered
-testHeaders: $(top_srcdir)/compat/*.h $(top_srcdir)/compat/os/*.h
-       $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "$(top_srcdir)/compat/" || exit 1
-       $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "$(top_srcdir)/compat/os/" || exit 1
+testHeaders: $(srcdir)/*.h $(srcdir)/os/*.h
+       $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" $^ || exit 1
+
+CLEANFILES += testHeaders
 
-## No such file...
-testHeaders.c:
-       touch testHeaders.c
-CLEANFILES += testHeaders.c
+.PHONY: testHeaders