2013-12-22 04:41:30 +04:00
# Copyright (C) 2011,2013 Colin Walters <walters@verbum.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
2014-01-03 22:15:12 +04:00
i n c l u d e M a k e f i l e - d e c l s . a m
2018-11-13 18:57:50 +03:00
i n c l u d e M a k e f i l e - e x t r a . i n c
2014-01-03 22:15:12 +04:00
2016-10-19 21:24:40 +03:00
primaryname = rpm-ostree
2015-04-09 00:20:50 +03:00
SUBDIRS += .
i f E N A B L E _ G T K _ D O C
2016-03-09 19:20:06 +03:00
SUBDIRS += api-doc
2015-04-09 00:20:50 +03:00
e n d i f
2017-11-13 06:45:20 +03:00
RPM_OSTREE_GITREV = $( shell if command -v git >/dev/null 2>& 1 && test -e $( srcdir) /.git; then git describe --abbrev= 42 --tags --always HEAD; fi )
2017-01-19 20:38:40 +03:00
2014-01-03 22:15:12 +04:00
ACLOCAL_AMFLAGS += -I m4 ${ ACLOCAL_FLAGS }
AM_CPPFLAGS += -DDATADIR= '"$(datadir)"' \
2013-12-22 04:41:30 +04:00
-DLIBEXECDIR= '"$(libexecdir)"' \
-DLOCALEDIR= \" $( datadir) /locale\" \
2017-12-15 20:01:46 +03:00
-DSYSCONFDIR= '"$(sysconfdir)"' \
-DRPM_OSTREE_FEATURES= '"$(RPM_OSTREE_FEATURES)"' \
2017-01-19 20:38:40 +03:00
-DRPM_OSTREE_GITREV= '"$(RPM_OSTREE_GITREV)"' \
2019-03-22 18:14:51 +03:00
-DGLIB_VERSION_MIN_REQUIRED= GLIB_VERSION_2_56 -DGLIB_VERSION_MAX_ALLOWED= GLIB_VERSION_2_56
2020-11-22 22:55:06 +03:00
# We make some C warnings always a hard error; these should never happen in our code.
# These flags are not valid for C++.
warn_only_c_flags = -Werror= strict-prototypes \
-Werror= missing-prototypes \
-Werror= implicit-function-declaration \
-Werror= int-conversion \
-Werror= incompatible-pointer-types \
-Werror= int-conversion \
$( NULL)
2017-12-15 17:52:48 +03:00
# Keep this in sync with the AM_CFLAGS in libostree; see
# that project for more information about e.g. -fno-strict-aliasing
2020-11-22 22:55:06 +03:00
AM_CFLAGS += -std= gnu11 -fno-strict-aliasing $( WARN_CFLAGS) $( warn_only_c_flags)
# Our default CXX flags
2021-01-26 22:18:36 +03:00
AM_CXXFLAGS += -std= c++17 -fno-strict-aliasing $( WARN_CFLAGS)
2013-12-22 04:41:30 +04:00
EXTRA_DIST += autogen.sh COPYING
2017-02-12 07:25:53 +03:00
GITIGNOREFILES += build-aux/ gtk-doc.make config.h.in aclocal.m4 insttree/ rpm-ostreed
2016-03-10 22:36:44 +03:00
2015-04-28 04:22:58 +03:00
SED_SUBST = sed \
-e 's,[@]libexecdir[@],$(libexecdir),g' \
2016-10-19 21:24:40 +03:00
-e 's,[@]primaryname[@],$(primaryname),g' \
2016-05-27 21:46:46 +03:00
-e 's,[@]bindir[@],$(bindir),g' \
2015-04-28 04:22:58 +03:00
$( NULL)
2015-02-15 21:56:14 +03:00
libglnx_srcpath := $( srcdir) /libglnx
2015-04-14 04:25:05 +03:00
libglnx_cflags := $( PKGDEP_GIO_UNIX_CFLAGS) -I$( libglnx_srcpath) -fvisibility= hidden
2015-04-28 04:22:58 +03:00
libglnx_ldflags :=
2015-02-15 21:56:14 +03:00
libglnx_libs := $( PKGDEP_GIO_UNIX_LIBS)
2015-03-20 03:45:30 +03:00
i n c l u d e $( INTROSPECTION_MAKEFILE )
GIRS =
TYPELIBS = $( GIRS:.gir= .typelib)
2018-06-06 00:49:48 +03:00
# These bits were originally based on gnome:librsvg/Makefile.am
# but have been adapted to non-recursive Automake, and additionally
# the "cargo vendor" bits for us live in packaging/Makefile.dist-packaging.
.PHONY : check -local -cargo clean -local -cargo use -git -not -dist -hook
2018-05-31 23:31:22 +03:00
i f R U S T _ D E B U G
CARGO_RELEASE_ARGS =
e l s e
CARGO_RELEASE_ARGS = --release
e n d i f
2018-06-05 17:59:35 +03:00
check-local-cargo :
2018-05-31 23:31:22 +03:00
cd $( srcdir) /rust && CARGO_TARGET_DIR = $( abs_top_builddir) /target cargo test
2018-06-06 00:49:48 +03:00
CHECK_LOCAL_HOOKS += check-local-cargo
2018-05-31 23:31:22 +03:00
2018-06-05 17:59:35 +03:00
clean-local-cargo :
2018-05-31 23:31:22 +03:00
cd $( srcdir) /rust && CARGO_TARGET_DIR = $( abs_top_builddir) /target cargo clean
2018-06-06 00:49:48 +03:00
CLEAN_LOCAL_HOOKS += clean-local-cargo
2018-05-31 23:31:22 +03:00
2018-06-06 00:49:48 +03:00
use-git-not-dist-hook :
@echo
@echo 'ERROR: rpm-ostree does not use/support "make dist"; see packaging/Makefile.dist-packaging' 1>& 2
@echo
@exit 1
DIST_HOOKS += use-git-not-dist-hook
2018-06-09 15:10:17 +03:00
GITIGNOREFILES += target/
2018-05-31 23:31:22 +03:00
2020-04-29 20:52:23 +03:00
# From coreos-assembler
GITIGNOREFILES += "fastbuild*.qcow2" _kola_temp/
2015-09-11 16:33:46 +03:00
i n c l u d e l i b g l n x / M a k e f i l e - l i b g l n x . a m . i n c
2015-02-15 21:56:14 +03:00
noinst_LTLIBRARIES += libglnx.la
2015-04-17 21:03:24 +03:00
i n c l u d e M a k e f i l e - l i b p r i v . a m
2015-03-20 03:45:30 +03:00
i n c l u d e M a k e f i l e - l i b . a m
2015-04-28 04:22:58 +03:00
i n c l u d e M a k e f i l e - d a e m o n . a m
2013-12-22 04:41:30 +04:00
i n c l u d e M a k e f i l e - r p m - o s t r e e . a m
2014-07-16 17:02:45 +04:00
i n c l u d e M a k e f i l e - t e s t s . a m
2014-03-25 16:24:19 +04:00
i n c l u d e M a k e f i l e - m a n . a m
2019-03-06 20:31:36 +03:00
i n c l u d e M a k e f i l e - b a s h . a m
2016-03-10 22:36:44 +03:00
- i n c l u d e $( top_srcdir ) / g i t . m k