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

3
AM_CPPFLAGS =                                                   \
David Zeuthen's avatar
David Zeuthen committed
4 5 6 7 8 9 10 11 12 13 14 15 16
        -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)

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

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

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
33 34 35 36
lib_LTLIBRARIES=libpolkit-gobject-1.la

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

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

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

84
if HAVE_LIBSYSTEMD
85 86 87 88 89 90 91
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
92 93 94
libpolkit_gobject_1_la_CFLAGS =                                        	\
        -D_POLKIT_COMPILATION                                  		\
        $(GLIB_CFLAGS)							\
95
	$(LIBSYSTEMD_CFLAGS)						\
David Zeuthen's avatar
David Zeuthen committed
96 97 98 99
        $(NULL)

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

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

105
if HAVE_INTROSPECTION
106 107 108

INTROSPECTION_GIRS = Polkit-1.0.gir

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

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

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

117 118 119 120 121 122 123 124 125 126 127
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)
128

129
endif # HAVE_INTROSPECTION
130

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

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

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

140 141

-include $(top_srcdir)/git.mk