Makefile.am 4.88 KB
Newer Older
David Zeuthen's avatar
David Zeuthen committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
NULL =

INCLUDES =                                                      \
        -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
	polkitsubject.c				polkitsubject.h				\
	polkitunixprocess.c			polkitunixprocess.h			\
72
	polkitunixsession.c			polkitunixsession.h			\
73
	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 85 86 87 88 89 90 91 92 93
        $(NULL)

libpolkit_gobject_1_la_CFLAGS =                                        	\
        -D_POLKIT_COMPILATION                                  		\
        $(GLIB_CFLAGS)							\
        $(NULL)

libpolkit_gobject_1_la_LIBADD =                               		\
        $(GLIB_LIBS)							\
        $(NULL)

94 95
libpolkit_gobject_1_la_LDFLAGS = -export-symbols-regex '(^polkit_.*)'

96 97
if HAVE_INTROSPECTION
girdir = $(INTROSPECTION_GIRDIR)
98 99
gir_DATA = Polkit-1.0.gir

100
typelibsdir = $(INTROSPECTION_TYPELIBDIR)
101 102
typelibs_DATA = Polkit-1.0.typelib

103 104
Polkit-1.0.gir: libpolkit-gobject-1.la $(INTROSPECTION_SCANNER) Makefile.am
	$(INTROSPECTION_SCANNER) -v 				\
105
		--warn-all					\
106 107 108 109 110 111 112 113
		--namespace Polkit 				\
		--nsversion=1.0 				\
		--include=Gio-2.0 				\
		--library=polkit-gobject-1 			\
		--output $@ 					\
		--pkg=glib-2.0 					\
		--pkg=gobject-2.0 				\
		--pkg=gio-2.0 					\
114
		--pkg-export=polkit-gobject-1			\
115
		--libtool=$(top_builddir)/libtool		\
116
		--c-include='polkit/polkit.h'			\
117 118
                -I$(top_srcdir)/src	 			\
	        -D_POLKIT_COMPILATION                   	\
119
		$(libpolkit_gobject_1_la_SOURCES)		\
120 121
		$(NULL)

122 123
Polkit-1.0.typelib: Polkit-1.0.gir $(INTROSPECTION_COMPILER)
	$(INTROSPECTION_COMPILER) $< -o $@
124

125
endif # HAVE_INTROSPECTION
126

127
EXTRA_DIST = polkitenumtypes.h.template polkitenumtypes.c.template
128 129
CLEANFILES = $(gir_DATA) $(typelibs_DATA)

130
dist-hook :
131
	(for i in $(polkit_built_sources) $(BUILT_SOURCES) ; do rm -f $(distdir)/$$i ; done)
David Zeuthen's avatar
David Zeuthen committed
132 133

clean-local :
134
	rm -f *~ $(polkit_built_sources) $(BUILT_SOURCES)
135