Makefile.am 4.94 KB
Newer Older
David Zeuthen's avatar
David Zeuthen committed
1 2
NULL =

3
AM_CFLAGS = -std=gnu99 $(WARN_CFLAGS)
4
AM_CPPFLAGS =                                                   \
David Zeuthen's avatar
David Zeuthen committed
5 6 7 8 9 10 11 12 13 14 15 16 17
        -I$(top_builddir)/src                                   \
        -I$(top_srcdir)/src                                     \
        -DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\"               \
        -DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\"               \
        -DPACKAGE_DATA_DIR=\""$(datadir)"\"                     \
        -DPACKAGE_BIN_DIR=\""$(bindir)"\"                       \
        -DPACKAGE_LOCALSTATE_DIR=\""$(localstatedir)"\"         \
        -DPACKAGE_LOCALE_DIR=\""$(localedir)"\"                 \
        -DPACKAGE_LIB_DIR=\""$(libdir)"\"                       \
        -D_POSIX_PTHREAD_SEMANTICS                              \
        -D_REENTRANT                                            \
        $(NULL)

18
BUILT_SOURCES = 						\
19
	polkitenumtypes.c		polkitenumtypes.h	\
20
	$(NULL)
David Zeuthen's avatar
David Zeuthen committed
21

22
enum_headers = polkitcheckauthorizationflags.h polkiterror.h polkitimplicitauthorization.h polkitauthorityfeatures.h
23 24 25 26 27 28 29 30 31 32 33

polkitenumtypes.h: $(enum_headers) polkitenumtypes.h.template
	( top_builddir=`cd $(top_builddir) && pwd`; \
	 cd $(srcdir) && glib-mkenums --template polkitenumtypes.h.template $(enum_headers)) > \
	   polkitenumtypes.h.tmp && mv polkitenumtypes.h.tmp polkitenumtypes.h

polkitenumtypes.c: $(enum_headers) polkitenumtypes.c.template
	( top_builddir=`cd $(top_builddir) && pwd`; \
	 cd $(srcdir) && glib-mkenums --template polkitenumtypes.c.template $(enum_headers)) > \
	   polkitenumtypes.c.tmp && mv polkitenumtypes.c.tmp polkitenumtypes.c

David Zeuthen's avatar
David Zeuthen committed
34 35 36 37
lib_LTLIBRARIES=libpolkit-gobject-1.la

libpolkit_gobject_1includedir=$(includedir)/polkit-1/polkit

38 39
libpolkit_gobject_1include_HEADERS =                        				\
        polkit.h									\
David Zeuthen's avatar
David Zeuthen committed
40
        polkitprivate.h									\
41
        polkittypes.h									\
42
	polkitenumtypes.h								\
43
	polkitactiondescription.h							\
44
	polkitauthorityfeatures.h							\
45
	polkitdetails.h									\
46 47
	polkitauthority.h								\
	polkiterror.h									\
48 49
	polkitsubject.h									\
	polkitunixprocess.h								\
50
	polkitunixsession.h								\
51
	polkitsystembusname.h								\
52 53 54
	polkitidentity.h								\
	polkitunixuser.h								\
	polkitunixgroup.h								\
55
	polkitunixnetgroup.h								\
56
	polkitauthorizationresult.h							\
57
	polkitcheckauthorizationflags.h							\
58
	polkitimplicitauthorization.h							\
59
	polkittemporaryauthorization.h							\
60
	polkitpermission.h								\
David Zeuthen's avatar
David Zeuthen committed
61 62
        $(NULL)

63
libpolkit_gobject_1_la_SOURCES =                                   			\
64
	$(BUILT_SOURCES)								\
65 66
        polkit.h									\
	polkitactiondescription.c		polkitactiondescription.h		\
67
	polkitauthorityfeatures.h		polkitauthorityfeatures.c		\
68
	polkitdetails.c				polkitdetails.h				\
69 70
	polkitauthority.c			polkitauthority.h			\
	polkiterror.c				polkiterror.h				\
71 72 73
	polkitsubject.c				polkitsubject.h				\
	polkitunixprocess.c			polkitunixprocess.h			\
	polkitsystembusname.c			polkitsystembusname.h			\
74 75 76
	polkitidentity.c			polkitidentity.h			\
	polkitunixuser.c			polkitunixuser.h			\
	polkitunixgroup.c			polkitunixgroup.h			\
77
	polkitunixnetgroup.c			polkitunixnetgroup.h			\
78
	polkitauthorizationresult.c		polkitauthorizationresult.h		\
79
	polkitcheckauthorizationflags.c		polkitcheckauthorizationflags.h		\
80
	polkitimplicitauthorization.c		polkitimplicitauthorization.h		\
81
	polkittemporaryauthorization.c		polkittemporaryauthorization.h		\
82
	polkitpermission.c			polkitpermission.h			\
David Zeuthen's avatar
David Zeuthen committed
83 84
        $(NULL)

85
if HAVE_LIBSYSTEMD
86 87 88 89 90 91 92
libpolkit_gobject_1_la_SOURCES += \
	polkitunixsession-systemd.c		polkitunixsession.h
else
libpolkit_gobject_1_la_SOURCES += \
	polkitunixsession.c			polkitunixsession.h
endif

David Zeuthen's avatar
David Zeuthen committed
93 94 95
libpolkit_gobject_1_la_CFLAGS =                                        	\
        -D_POLKIT_COMPILATION                                  		\
        $(GLIB_CFLAGS)							\
96
	$(LIBSYSTEMD_CFLAGS)						\
David Zeuthen's avatar
David Zeuthen committed
97 98 99 100
        $(NULL)

libpolkit_gobject_1_la_LIBADD =                               		\
        $(GLIB_LIBS)							\
101
	$(LIBSYSTEMD_LIBS)						\
David Zeuthen's avatar
David Zeuthen committed
102 103
        $(NULL)

104 105
libpolkit_gobject_1_la_LDFLAGS = -export-symbols-regex '(^polkit_.*)'

106
if HAVE_INTROSPECTION
107 108 109

INTROSPECTION_GIRS = Polkit-1.0.gir

110 111
Polkit-1.0.gir: libpolkit-gobject-1.la

112
girdir = $(INTROSPECTION_GIRDIR)
113 114
gir_DATA = Polkit-1.0.gir

115
typelibsdir = $(INTROSPECTION_TYPELIBDIR)
116 117
typelibs_DATA = Polkit-1.0.typelib

118 119 120 121 122 123 124 125 126 127 128
Polkit_1_0_gir_INCLUDES = Gio-2.0
Polkit_1_0_gir_SCANNERFLAGS = --c-include='polkit/polkit.h'
Polkit_1_0_gir_CFLAGS = \
	$(libpolkit_gobject_1_la_CFLAGS)	\
	-D_POLKIT_COMPILATION			\
	-I.. -I$(top_srcdir)/src
Polkit_1_0_gir_LIBS = libpolkit-gobject-1.la
Polkit_1_0_gir_FILES = $(libpolkit_gobject_1_la_SOURCES)
Polkit_1_0_gir_EXPORT_PACKAGES = polkit-gobject-1

include $(INTROSPECTION_MAKEFILE)
129

130
endif # HAVE_INTROSPECTION
131

132
EXTRA_DIST = polkitenumtypes.h.template polkitenumtypes.c.template
133 134
CLEANFILES = $(gir_DATA) $(typelibs_DATA)

135
dist-hook :
136
	(for i in $(polkit_built_sources) $(BUILT_SOURCES) ; do rm -f $(distdir)/$$i ; done)
David Zeuthen's avatar
David Zeuthen committed
137 138

clean-local :
139
	rm -f *~ $(polkit_built_sources) $(BUILT_SOURCES)
140

141 142

-include $(top_srcdir)/git.mk