Modules.am 1.44 KB
Newer Older
zorglub's avatar
zorglub committed
1
2
3
4
5
6
7
8
9
10
11
## Howto
# For each Q_OBJECT:
#   - Add it without extension to TOMOC
#   - Add the moc.cpp to BUILT_SOURCES and nodist_SOURCES_qt4
#   - Add the cpp to SOURCES_qt4
#   - Add the hpp to EXTRA_DIST
# For each UI
#   - Add it without extension to TOUI
#   - Add it to EXTRA_DIST

TOUI = ui/input_stats
zorglub's avatar
zorglub committed
12
13
UIH := $(TOUI:%=%.h)

zorglub's avatar
zorglub committed
14
15
TOMOC = main_interface \
	dialogs_provider \
zorglub's avatar
zorglub committed
16
	input_manager \
zorglub's avatar
zorglub committed
17
18
19
	dialogs/playlist \
	dialogs/streaminfo \
	components/infopanels
zorglub's avatar
zorglub committed
20
21
22
23
24
MOCCPP := $(TOMOC:%=%.moc.cpp)

if ENABLE_QT4

BUILT_SOURCES += $(UIH) 
zorglub's avatar
zorglub committed
25
26
27
28
29
30
31
BUILT_SOURCES +=  \
		main_interface.moc.cpp \
		dialogs_provider.moc.cpp \
		input_manager.moc.cpp \
		dialogs/playlist.moc.cpp \
		dialogs/streaminfo.moc.cpp \
		components/infopanels.moc.cpp
zorglub's avatar
zorglub committed
32
33
34
35
36
37
38

$(MOCCPP): %.moc.cpp: %.hpp
	@echo "MOC $< -> $@"
	moc -o $@ $<

$(UIH): %.h: %.ui 
	@echo "UIC $< -> $@"
zorglub's avatar
zorglub committed
39
40
41
42
43
44
45
46
47
48
49
	rm -f $@
	echo "#define Q_(a,b) _(a)" > $@
	uic -tr "Q_" $< >> $@

nodist_SOURCES_qt4 = \
		main_interface.moc.cpp \
		dialogs_provider.moc.cpp \
		input_manager.moc.cpp \
		dialogs/playlist.moc.cpp \
		dialogs/streaminfo.moc.cpp \
		components/infopanels.moc.cpp
zorglub's avatar
zorglub committed
50
51

endif
zorglub's avatar
zorglub committed
52
53
54
55

SOURCES_qt4 = 	qt4.cpp \
		main_interface.cpp \
		dialogs_provider.cpp \
zorglub's avatar
zorglub committed
56
		input_manager.cpp \
zorglub's avatar
zorglub committed
57
		dialogs/playlist.cpp \
zorglub's avatar
zorglub committed
58
59
		dialogs/streaminfo.cpp \
		components/infopanels.cpp
zorglub's avatar
zorglub committed
60
61
62
63
64
		$(NULL)

EXTRA_DIST += \
	qt4.hpp \
	main_interface.hpp \
zorglub's avatar
zorglub committed
65
66
67
68
69
70
	dialogs_provider.hpp \
	input_manager.hpp \
	dialogs/playlist.hpp \
	dialogs/streaminfo.hpp \
	components/infopanels.hpp \
	ui/input_stats.ui