summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: 79ea2e5ba5d6df02c8faf183b7384fda17bcd60a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# ------------------------------------------------------------------------------
# Common variables

ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AUTOMAKE_OPTIONS = color-tests parallel-tests
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
SUBDIRS = .
lib_LTLIBRARIES =
noinst_DATA =
MANPAGES =
CLEANFILES = $(BUILT_SOURCES)
BUILT_SOURCES =

GCC_COLORS ?= 'ooh, shiny!'
export GCC_COLORS

# remove targets if the command fails
.DELETE_ON_ERROR:

# keep intermediate files
.SECONDARY:

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =

AM_MAKEFLAGS = --no-print-directory
AM_CPPFLAGS =
AM_CFLAGS =

EXTRA_DIST = \
	README \
	COPYING \
	NEWS

# ------------------------------------------------------------------------------
# Version numbers

LIBGUDEV_CURRENT=2
LIBGUDEV_REVISION=0
LIBGUDEV_AGE=2

# ------------------------------------------------------------------------------
# libgudev

libgudev_includedir = $(includedir)/gudev-1.0/gudev

libgudev_include_HEADERS = \
	gudev/gudev.h \
	gudev/gudevenums.h \
	gudev/gudevenumtypes.h \
	gudev/gudevtypes.h \
	gudev/gudevclient.h \
	gudev/gudevdevice.h \
	gudev/gudevenumerator.h

lib_LTLIBRARIES += \
	libgudev-1.0.la

pkgconfig_DATA += \
	gudev-1.0.pc

EXTRA_DIST += \
	gudev-1.0.pc.in \
	gudev/gudevmarshal.list \
	gudev/gudevenumtypes.h.template \
	gudev/gudevenumtypes.c.template \
	scripts/gjs-example.js \
	scripts/seed-example-enum.js \
	scripts/seed-example.js

libgudev_1_0_la_SOURCES = \
	libgudev-1.0.sym \
	gudev/gudevenums.h \
	gudev/gudevenumtypes.h \
	gudev/gudevenumtypes.h\
	gudev/gudevtypes.h \
	gudev/gudevclient.h \
	gudev/gudevclient.c \
	gudev/gudevdevice.h \
	gudev/gudevdevice.c \
	gudev/gudevenumerator.h \
	gudev/gudevenumerator.c \
	gudev/gudevprivate.h

nodist_libgudev_1_0_la_SOURCES = \
	gudev/gudevmarshal.h \
	gudev/gudevmarshal.c \
	gudev/gudevenumtypes.h \
	gudev/gudevenumtypes.c

BUILT_SOURCES += \
	$(nodist_libgudev_1_0_la_SOURCES)

libgudev_1_0_la_CPPFLAGS = \
	$(AM_CPPFLAGS) \
	-I$(top_builddir)/gudev \
	-I$(top_srcdir)/gudev \
	-D_POSIX_PTHREAD_SEMANTICS \
	-D_REENTRANT \
	-D_GUDEV_COMPILATION \
	-DG_LOG_DOMAIN=\"GUdev\"

libgudev_1_0_la_CFLAGS = \
	$(AM_CFLAGS) \
	-fvisibility=default \
	$(LIBUDEV_CFLAGS) \
	$(GLIB_CFLAGS)

libgudev_1_0_la_LIBADD = \
	$(LIBUDEV_LIBS) \
	$(GLIB_LIBS)

libgudev_1_0_la_LDFLAGS = \
	$(AM_LDFLAGS) \
	-version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
	-export-dynamic \
	-no-undefined \
	-Wl,--version-script=$(top_srcdir)/libgudev-1.0.sym

gudev/gudevmarshal.h: gudev/gudevmarshal.list
	$(AM_V_at)$(MKDIR_P) $(dir $@)
	$(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@

gudev/gudevmarshal.c: gudev/gudevmarshal.list
	$(AM_V_at)$(MKDIR_P) $(dir $@)
	$(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
	glib-genmarshal $< --prefix=g_udev_marshal --body >> $@

gudev/gudevenumtypes.%: gudev/gudevenumtypes.%.template gudev/gudevenums.h
	$(AM_V_at)$(MKDIR_P) $(dir $@)
	$(AM_V_GEN)glib-mkenums --template $^ > $@

if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)

gudev/GUdev-1.0.gir: libgudev-1.0.la

gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0

gudev_GUdev_1_0_gir_CFLAGS = \
	$(AM_CFLAGS) \
	$(INCLUDES) \
	-D_GUDEV_COMPILATION \
	-D_GUDEV_WORK_AROUND_DEV_T_BUG \
	-I$(top_srcdir) \
	-I$(top_builddir) \
	-I$(top_srcdir)/gudev \
	-I$(top_builddir)/gudev

gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la

gudev_GUdev_1_0_gir_SCANNERFLAGS = \
	--pkg-export=gudev-1.0 \
	--warn-all

gudev_GUdev_1_0_gir_FILES = \
	gudev/gudev.h \
	gudev/gudevtypes.h \
	gudev/gudevenums.h \
	gudev/gudevenumtypes.h \
	gudev/gudevclient.h \
	gudev/gudevdevice.h \
	gudev/gudevenumerator.h \
	gudev/gudevclient.c \
	gudev/gudevdevice.c \
	gudev/gudevenumerator.c

INTROSPECTION_GIRS = gudev/GUdev-1.0.gir
INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h

girdir = $(datadir)/gir-1.0
gir_DATA = \
	gudev/GUdev-1.0.gir

typelibsdir = $(libdir)/girepository-1.0
typelibs_DATA = \
	gudev/GUdev-1.0.typelib

CLEANFILES += $(gir_DATA) $(typelibs_DATA)
endif # HAVE_INTROSPECTION

# ------------------------------------------------------------------------------
# docs

if ENABLE_GTK_DOC
SUBDIRS += docs
endif

#docs/html:
#	$(AM_V_at)$(MKDIR_P) $(dir $@)
#	$(AM_V_LN)$(LN_S) -f ../gudev/html $@