summaryrefslogtreecommitdiff
path: root/libvirt-designer/Makefile.am
blob: bda4240ead2d9771d73e263cdcf1bc48f834d4be (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

EXTRA_DIST = libvirt-designer.sym
CLEANFILES =

lib_LTLIBRARIES = libvirt-designer-1.0.la

DESIGNER_TEMPLATE_FILES = \
			libvirt-designer-enum-types.h.template \
			libvirt-designer-enum-types.c.template \
			$(NULL)

DESIGNER_GENERATED_ENUM_FILES = \
			libvirt-designer-enum-types.h \
			libvirt-designer-enum-types.c \
			$(NULL)

DESIGNER_GENERATED_FILES = \
			$(DESIGNER_GENERATED_ENUM_FILES) \
			$(NULL)

DESIGNER_HEADER_FILES = \
			libvirt-designer.h \
			libvirt-designer-internal.h \
			libvirt-designer-main.h \
			libvirt-designer-domain.h \
			$(NULL)
DESIGNER_SOURCE_FILES = \
			libvirt-designer-internal.c \
			libvirt-designer-main.c \
			libvirt-designer-domain.c \
			$(NULL)

libvirt_designer_1_0_ladir = $(includedir)/libvirt-designer-1.0/libvirt-designer
libvirt_designer_1_0_la_HEADERS = \
			$(DESIGNER_HEADER_FILES)
libvirt_designer_1_0_la_SOURCES = \
			$(DESIGNER_SOURCE_FILES)
nodist_libvirt_designer_1_0_la_HEADERS = \
			libvirt-designer-enum-types.h
			$(NULL)
nodist_libvirt_designer_1_0_la_SOURCES = \
			libvirt-designer-enum-types.c \
			$(NULL)
libvirt_designer_1_0_la_CFLAGS = \
			-DBINDIR="\"$(bindir)\"" \
			-DDATADIR="\"$(datadir)\"" \
			-DLIBVIRT_DESIGNER_BUILD \
			-DLIBEXECDIR="\"$(libexecdir)\"" \
			-DRUNDIR="\"$(rundir)\"" \
			$(COVERAGE_CFLAGS) \
			-I$(top_srcdir) \
			$(LIBOSINFO_CFLAGS) \
			$(LIBVIRT_GCONFIG_CFLAGS) \
			$(WARN_CFLAGS) \
			$(NULL)
libvirt_designer_1_0_la_LIBADD = \
			$(LIBOSINFO_LIBS) \
			$(LIBVIRT_GCONFIG_LIBS) \
			$(CYGWIN_EXTRA_LIBADD) \
			$(NULL)
libvirt_designer_1_0_la_DEPENDENCIES = \
                        libvirt-designer.sym
libvirt_designer_1_0_la_LDFLAGS = \
			$(WARN_CFLAGS) \
			$(COVERAGE_CFLAGS:-f%=-Wc,f%) \
			$(CYGWIN_EXTRA_LDFLAGS) \
			$(MINGW_EXTRA_LDFLAGS) \
			-Wl,--version-script=$(srcdir)/libvirt-designer.sym \
			-version-info $(LIBVIRT_DESIGNER_VERSION_INFO)


EXTRA_DIST += $(DESIGNER_TEMPLATE_FILES)

BUILT_SOURCES = $(DESIGNER_GENERATED_FILES)
CLEANFILES += $(DESIGNER_GENERATED_FILES)

libvirt-designer-enum-types.h: $(DESIGNER_HEADER_FILES) libvirt-designer-enum-types.h.template
	$(AM_V_GEN) ( $(GLIB_MKENUMS) --template $(srcdir)/libvirt-designer-enum-types.h.template $(DESIGNER_HEADER_FILES:%=$(srcdir)/%) ) | \
            sed -e "s/G_TYPE_VIR_CONFIG/GVIR_CONFIG_TYPE/" -e "s/g_vir/gvir/" > libvirt-designer-enum-types.h

libvirt-designer-enum-types.c: $(DESIGNER_HEADER_FILES) libvirt-designer-enum-types.c.template
	$(AM_V_GEN) ( $(GLIB_MKENUMS) --template $(srcdir)/libvirt-designer-enum-types.c.template $(DESIGNER_HEADER_FILES:%=$(srcdir)/%) ) | \
            sed -e "s/G_TYPE_VIR_CONFIG/GVIR_CONFIG_TYPE/" -e "s/g_vir/gvir/" > libvirt-designer-enum-types.c

check_PROGRAMS = test-designer-domain

TESTS = $(check_PROGRAMS)

test_designer_domain_CFLAGS = \
			-I$(top_srcdir) \
			$(COVERAGE_CFLAGS) \
			-I$(top_srcdir) \
			$(LIBOSINFO_CFLAGS) \
			$(LIBVIRT_GCONFIG_CFLAGS) \
			$(WARN_CFLAGS2) \
			$(NULL)
test_designer_domain_LDADD = \
			libvirt-designer-1.0.la
test_designer_domain_LDFLAGS = \
			$(LIBOSINFO_LIBS) \
			$(LIBVIRT_GCONFIG_LIBS) \
			$(COVERAGE_CFLAGS:-f%=-Wc,f%)

if WITH_INTROSPECTION

LibvirtDesigner-1.0.gir: libvirt-designer-1.0.la $(G_IR_SCANNER) Makefile.am
	$(AM_V_GEN) $(G_IR_SCANNER) \
                --quiet \
                --warn-all \
                --namespace LibvirtDesigner \
                --nsversion 1.0 \
                --include Libosinfo-1.0 \
                --include LibvirtGConfig-1.0 \
                --identifier-prefix=GVirDesigner \
                --symbol-prefix=gvir_designer \
                --library=$(builddir)/libvirt-designer-1.0.la \
                --output $@ \
                -I$(top_srcdir) \
                -I$(top_builddir) \
                --verbose \
                --pkg=libosinfo-1.0 \
                --pkg=libvirt-gconfig-1.0 \
                --c-include="libvirt-designer/libvirt-designer.h" \
                --pkg-export=libvirt-designer-1.0 \
                $(srcdir)/libvirt-designer.h \
                $(DESIGNER_SOURCE_FILES:%=$(srcdir)/%) \
                $(DESIGNER_HEADER_FILES:%=$(srcdir)/%) \
		$(DESIGNER_GENERATED_ENUM_FILES:%=%) \
		$(NULL)

girdir = $(datadir)/gir-1.0
gir_DATA = LibvirtDesigner-1.0.gir

typelibsdir = $(libdir)/girepository-1.0
typelibs_DATA = LibvirtDesigner-1.0.typelib

%.typelib: %.gir
	$(AM_V_GEN)$(G_IR_COMPILER) \
                --includedir=$(builddir) \
                --includedir=$(girdir) \
                -o $@ $<

CLEANFILES += $(gir_DATA) $(typelibs_DATA)

endif # WITH_INTROSPECTION