summaryrefslogtreecommitdiff
path: root/liblightdm-qt/Makefile.am
blob: 2bf17f29d2f774422739121c099c6ac60b708130 (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
common_libadd = \
	-L$(top_builddir)/liblightdm-gobject \
	-llightdm-gobject-1
liblightdm_qt_3_la_LIBADD = \
	$(LIBLIGHTDM_QT4_LIBS) \
	$(common_libadd)
liblightdm_qt5_3_la_LIBADD = \
	$(LIBLIGHTDM_QT5_LIBS) \
	$(common_libadd)

common_cflags = \
	$(WARN_CXXFLAGS) \
	-I$(top_srcdir)/liblightdm-gobject \
	$(GLIB_CFLAGS) \
	-DQT_NO_KEYWORDS
liblightdm_qt_3_la_CXXFLAGS = \
	$(LIBLIGHTDM_QT4_CFLAGS) \
	$(common_cflags)
liblightdm_qt5_3_la_CXXFLAGS = \
	-fPIC \
	-DQT_DISABLE_DEPRECATED_BEFORE="QT_VERSION_CHECK(4, 0, 0)" \
	$(LIBLIGHTDM_QT5_CFLAGS) \
	$(common_cflags)

common_headers = \
	QLightDM/Greeter \
	QLightDM/Power \
	QLightDM/SessionsModel \
	QLightDM/UsersModel \
	QLightDM/greeter.h \
	QLightDM/power.h \
	QLightDM/sessionsmodel.h \
	QLightDM/usersmodel.h

liblightdm_qt_3includedir=$(includedir)/lightdm-qt-3/QLightDM
liblightdm_qt5_3includedir=$(includedir)/lightdm-qt5-3/QLightDM

common_sources = \
	greeter.cpp \
	power.cpp \
	sessionsmodel.cpp \
	usersmodel.cpp
liblightdm_qt_3_la_SOURCES = \
	$(common_sources) \
	$(liblightdm_qt_3include_HEADERS)
liblightdm_qt5_3_la_SOURCES = \
	$(common_sources) \
	$(liblightdm_qt5_3include_HEADERS)

pkgconfigdir = $(libdir)/pkgconfig

CLEANFILES = \
	*_moc*.cpp

DISTCLEANFILES = \
	$(pkgconfig_DATA)

lib_LTLIBRARIES =
BUILT_SOURCES =
pkgconfig_DATA =

if COMPILE_LIBLIGHTDM_QT4
lib_LTLIBRARIES += liblightdm-qt-3.la
liblightdm_qt_3include_HEADERS = $(common_headers)
BUILT_SOURCES += $(common_sources:.cpp=_moc4.cpp)
pkgconfig_DATA += liblightdm-qt-3.pc
endif

if COMPILE_LIBLIGHTDM_QT5
lib_LTLIBRARIES += liblightdm-qt5-3.la
liblightdm_qt5_3include_HEADERS = $(common_headers)
BUILT_SOURCES += $(common_sources:.cpp=_moc5.cpp)
pkgconfig_DATA += liblightdm-qt5-3.pc
endif

# Support pretty printing MOC
AM_V_MOC4 = $(am__v_MOC4_$(V))
am__v_MOC4_ = $(am__v_MOC4_$(AM_DEFAULT_VERBOSITY))
am__v_MOC4_0 = @echo "  MOC4    " $@;
%_moc4.cpp: QLightDM/%.h
	$(AM_V_MOC4) $(MOC4) $< -o $@

AM_V_MOC5 = $(am__v_MOC5_$(V))
am__v_MOC5_ = $(am__v_MOC5_$(AM_DEFAULT_VERBOSITY))
am__v_MOC5_0 = @echo "  MOC5    " $@;
%_moc5.cpp: QLightDM/%.h
	$(AM_V_MOC5) $(MOC5) $< -o $@