summaryrefslogtreecommitdiff
path: root/Rules.make
Unidiff
Diffstat (limited to 'Rules.make') (more/less context) (ignore whitespace changes)
-rw-r--r--Rules.make6
1 files changed, 0 insertions, 6 deletions
diff --git a/Rules.make b/Rules.make
index 3fbce76..64237cf 100644
--- a/Rules.make
+++ b/Rules.make
@@ -1,164 +1,158 @@
1.phony: force 1.phony: force
2force: 2force:
3 3
4$(configs) : 4$(configs) :
5 $(call makecfg,$@) 5 $(call makecfg,$@)
6 6
7$(TOPDIR)/gen.pro : $(TOPDIR)/.config 7$(TOPDIR)/gen.pro : $(TOPDIR)/.config
8 echo > $@ 8 echo > $@
9# added for threaded version 9# added for threaded version
10ifneq ($(CONFIG_THREADED),) 10ifneq ($(CONFIG_THREADED),)
11 echo CONFIG += thread >> $@ 11 echo CONFIG += thread >> $@
12else 12else
13 echo CONFIG -= thread >> $@ 13 echo CONFIG -= thread >> $@
14endif 14endif
15# added for auto stripped build 15# added for auto stripped build
16ifneq ($(CONFIG_STRIP),) 16ifneq ($(CONFIG_STRIP),)
17 echo CONFIG += strip >> $@ 17 echo CONFIG += strip >> $@
18endif 18endif
19ifneq ($(CONFIG_DEBUG),) 19ifneq ($(CONFIG_DEBUG),)
20 echo CONFIG += debug >> $@ 20 echo CONFIG += debug >> $@
21 echo CONFIG -= release >> $@ 21 echo CONFIG -= release >> $@
22 echo DEFINES += "QT_COMPONENT_DEBUG=2" >> $@ 22 echo DEFINES += "QT_COMPONENT_DEBUG=2" >> $@
23 echo DEFINES += QT_DEBUG >> $@ 23 echo DEFINES += QT_DEBUG >> $@
24else 24else
25 echo CONFIG -= debug >> $@ 25 echo CONFIG -= debug >> $@
26 echo CONFIG += release >> $@ 26 echo CONFIG += release >> $@
27 echo DEFINES += "OPIE_NO_DEBUG" >> $@ 27 echo DEFINES += "OPIE_NO_DEBUG" >> $@
28endif 28endif
29ifeq ($(CONFIG_STATIC),y) 29ifeq ($(CONFIG_STATIC),y)
30 echo !contains\( TARGET,qpe \) \{ >> $@ 30 echo !contains\( TARGET,qpe \) \{ >> $@
31 echo CONFIG += staticlib >> $@ 31 echo CONFIG += staticlib >> $@
32 echo \} >> $@ 32 echo \} >> $@
33endif 33endif
34ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3 34ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3
35 echo CONFIG -= qt3 >> $@ 35 echo CONFIG -= qt3 >> $@
36else 36else
37 echo CONFIG += qt3 >> $@ 37 echo CONFIG += qt3 >> $@
38endif 38endif
39ifneq ($(CONFIG_QUICK_LAUNCH),) 39ifneq ($(CONFIG_QUICK_LAUNCH),)
40 echo contains\( CONFIG, quick-app \) \{ >> $@ 40 echo contains\( CONFIG, quick-app \) \{ >> $@
41 echo CONFIG -= staticlib >> $@ 41 echo CONFIG -= staticlib >> $@
42 echo CONFIG -= quick-app >> $@ 42 echo CONFIG -= quick-app >> $@
43 echo CONFIG += quick-app-lib >> $@ 43 echo CONFIG += quick-app-lib >> $@
44 echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@ 44 echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@
45 echo \} >> $@ 45 echo \} >> $@
46else 46else
47 echo contains\( CONFIG, quick-app \) \{ >> $@ 47 echo contains\( CONFIG, quick-app \) \{ >> $@
48 echo CONFIG -= quick-app >> $@ 48 echo CONFIG -= quick-app >> $@
49 echo CONFIG += quick-app-bin >> $@ 49 echo CONFIG += quick-app-bin >> $@
50 echo \} >> $@ 50 echo \} >> $@
51endif 51endif
52ifeq ($(CONFIG_SQL_PIM_BACKEND),y) 52ifeq ($(CONFIG_SQL_PIM_BACKEND),y)
53 echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@ 53 echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@
54else 54else
55 echo ENABLE_SQL_PIM_BACKEND=n >> $@ 55 echo ENABLE_SQL_PIM_BACKEND=n >> $@
56endif 56endif
57ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y)
58 echo CONFIG += no-override >> $@
59endif
60ifeq ($(CONFIG_OPIELOGIN_USEPAM),y) 57ifeq ($(CONFIG_OPIELOGIN_USEPAM),y)
61 echo CONFIG += OPIELOGIN_USEPAM >> $@ 58 echo CONFIG += OPIELOGIN_USEPAM >> $@
62endif 59endif
63ifeq ($(CONFIG_LIBQPE_WITHROHFEEDBACK),y) 60ifeq ($(CONFIG_LIBQPE_WITHROHFEEDBACK),y)
64 echo CONFIG += LIBQPE_WITHROHFEEDBACK >> $@ 61 echo CONFIG += LIBQPE_WITHROHFEEDBACK >> $@
65endif 62endif
66ifeq ($(CONFIG_OPIE_NO_ERASERECT_FIX),y)
67 echo DEFINES += OPIE_NO_ERASE_RECT_HACKFIX >> $@
68endif
69ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) 63ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y)
70 echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ 64 echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@
71endif 65endif
72ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) 66ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y)
73 echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ 67 echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@
74endif 68endif
75ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) 69ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y)
76 echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ 70 echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@
77endif 71endif
78ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y) 72ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y)
79 echo DEFINES += USE_FILE_NOTIFICATION >> $@ 73 echo DEFINES += USE_FILE_NOTIFICATION >> $@
80endif 74endif
81ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) 75ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y)
82 echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ 76 echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@
83endif 77endif
84ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) 78ifeq ($(CONFIG_OPIE_NEW_ALLOC),y)
85 echo DEFINES += OPIE_NEW_MALLOC >> $@ 79 echo DEFINES += OPIE_NEW_MALLOC >> $@
86endif 80endif
87ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) 81ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y)
88 echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ 82 echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@
89endif 83endif
90 echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ 84 echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@
91ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y) 85ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y)
92 echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ 86 echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@
93endif 87endif
94ifeq ($(CONFIG_OPIE_TASKBAR_LOCK_KEY_STATE),y) 88ifeq ($(CONFIG_OPIE_TASKBAR_LOCK_KEY_STATE),y)
95 echo DEFINES += OPIE_TASKBAR_LOCK_KEY_STATE >> $@ 89 echo DEFINES += OPIE_TASKBAR_LOCK_KEY_STATE >> $@
96 endif 90 endif
97# Write LIB dirs and INC dirs... 91# Write LIB dirs and INC dirs...
98ifeq ($(CONFIG_LIBETPAN_DEP),y) 92ifeq ($(CONFIG_LIBETPAN_DEP),y)
99 echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@ 93 echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@
100 echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@ 94 echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@
101endif 95endif
102ifeq ($(CONFIG_LIBPCAP_DEP),y) 96ifeq ($(CONFIG_LIBPCAP_DEP),y)
103 echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@ 97 echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@
104 echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@ 98 echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@
105endif 99endif
106ifeq ($(CONFIG_LIBSQLITE_DEP),y) 100ifeq ($(CONFIG_LIBSQLITE_DEP),y)
107 echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@ 101 echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@
108 echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@ 102 echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@
109endif 103endif
110ifeq ($(CONFIG_LIBXINE_DEP),y) 104ifeq ($(CONFIG_LIBXINE_DEP),y)
111 echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@ 105 echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@
112 echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@ 106 echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@
113endif 107endif
114ifeq ($(CONFIG_LIBBLUEZ_DEP),y) 108ifeq ($(CONFIG_LIBBLUEZ_DEP),y)
115 echo LIBBLUEZ_LIB_DIR = $(CONFIG_LIBBLUEZ_LIB_DIR) >> $@ 109 echo LIBBLUEZ_LIB_DIR = $(CONFIG_LIBBLUEZ_LIB_DIR) >> $@
116 echo LIBBLUEZ_INC_DIR = $(CONFIG_LIBBLUEZ_INC_DIR) >> $@ 110 echo LIBBLUEZ_INC_DIR = $(CONFIG_LIBBLUEZ_INC_DIR) >> $@
117endif 111endif
118ifeq ($(CONFIG_LIBIPK_DEP),y) 112ifeq ($(CONFIG_LIBIPK_DEP),y)
119 echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@ 113 echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@
120 echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@ 114 echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@
121endif 115endif
122ifeq ($(CONFIG_LIBSDK_DEP),y) 116ifeq ($(CONFIG_LIBSDK_DEP),y)
123 echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@ 117 echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@
124 echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@ 118 echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@
125endif 119endif
126ifeq ($(CONFIG_LIBSWORD_DEP),y) 120ifeq ($(CONFIG_LIBSWORD_DEP),y)
127 echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@ 121 echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@
128 echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@ 122 echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@
129endif 123endif
130ifeq ($(CONFIG_LIBFREETYPE2_DEP),y) 124ifeq ($(CONFIG_LIBFREETYPE2_DEP),y)
131 echo LIBFREETYPE2_INC_DIR = $(CONFIG_LIBFREETYPE2_INC_DIR) >> $@ 125 echo LIBFREETYPE2_INC_DIR = $(CONFIG_LIBFREETYPE2_INC_DIR) >> $@
132endif 126endif
133$(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages 127$(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages
134 @echo Generating dependency information... 128 @echo Generating dependency information...
135# add to subdir-y, and add descend rules 129# add to subdir-y, and add descend rules
136 @cat $(TOPDIR)/packages | grep -v '^#' | \ 130 @cat $(TOPDIR)/packages | grep -v '^#' | \
137 awk '{print \ 131 awk '{print \
138 ".PHONY : " $$2 "\n" \ 132 ".PHONY : " $$2 "\n" \
139 "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ 133 "subdir-$$(" $$1 ") += " $$2 "\n\n"; \
140 print $$2 " : " $$2 "/Makefile\n\t+$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends 134 print $$2 " : " $$2 "/Makefile\n\t+$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends
141 cat $(TOPDIR)/packages | grep -v '^#' | \ 135 cat $(TOPDIR)/packages | grep -v '^#' | \
142 perl -ne '($$cfg, $$dir, $$pro) = $$_ =~ /^(\S+)\s+(\S+)\s+(\S+)/; if ( -e "$$dir/$$pro" ) { print "$$dir/Makefile : $$dir/$$pro \$$(QMAKE) \$$(OPIEDIR)/gen.pro \$$(OPIEDIR)/.config\n\t\$$(call makefilegen,\$$@)\n\n"; }' \ 136 perl -ne '($$cfg, $$dir, $$pro) = $$_ =~ /^(\S+)\s+(\S+)\s+(\S+)/; if ( -e "$$dir/$$pro" ) { print "$$dir/Makefile : $$dir/$$pro \$$(QMAKE) \$$(OPIEDIR)/gen.pro \$$(OPIEDIR)/.config\n\t\$$(call makefilegen,\$$@)\n\n"; }' \
143 >> $(TOPDIR)/.depends 137 >> $(TOPDIR)/.depends
144# interpackage dependency generation 138# interpackage dependency generation
145 @cat $(TOPDIR)/packages | \ 139 @cat $(TOPDIR)/packages | \
146 $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends 140 $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends
147 141
148$(TOPDIR)/.depends.cfgs: 142$(TOPDIR)/.depends.cfgs:
149# config.in interdependencies 143# config.in interdependencies
150 @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs 144 @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs
151 @cat dirs | ( for i in `cat`; do if [ "`cat dirs|grep $$i 2>/dev/null|wc -l`" -ne "1" ]; then deps=`cat dirs|grep $$i| grep -v "^$$i$$"|for i in \`cat|sed -e's,^$(TOPDIR)/,$$(TOPDIR)/,g'\`; do echo $$i/config.in; done`; echo `echo $$i/config.in|sed -e 's,^$(TOPDIR)/,$$(TOPDIR)/,'` : $$deps; fi; done ) >> $@ 145 @cat dirs | ( for i in `cat`; do if [ "`cat dirs|grep $$i 2>/dev/null|wc -l`" -ne "1" ]; then deps=`cat dirs|grep $$i| grep -v "^$$i$$"|for i in \`cat|sed -e's,^$(TOPDIR)/,$$(TOPDIR)/,g'\`; do echo $$i/config.in; done`; echo `echo $$i/config.in|sed -e 's,^$(TOPDIR)/,$$(TOPDIR)/,'` : $$deps; fi; done ) >> $@
152 @-rm -f dirs 146 @-rm -f dirs
153 147
154$(QTDIR)/stamp-headers : 148$(QTDIR)/stamp-headers :
155 @-rm -f $(QTDIR)/stamp-headers* 149 @-rm -f $(QTDIR)/stamp-headers*
156 ( cd $(QTDIR)/include; \ 150 ( cd $(QTDIR)/include; \
157 $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ 151 $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \
158 qcopchannel_qws.h qwindowsystem_qws.h \ 152 qcopchannel_qws.h qwindowsystem_qws.h \
159 qfontmanager_qws.h qwsdefaultdecoration_qws.h)) 153 qfontmanager_qws.h qwsdefaultdecoration_qws.h))
160 touch $@ 154 touch $@
161 155
162$(QTDIR)/stamp-headers-x11 : 156$(QTDIR)/stamp-headers-x11 :
163 @-rm -f $(QTDIR)/stamp-headers* 157 @-rm -f $(QTDIR)/stamp-headers*
164 cd $(QTDIR)/include; $(patsubst %,ln -sf $(OPIEDIR)/x11/libqpe-x11/qt/%;,qgfx_qws.h qwsmouse_qws.h qcopchannel_qws.h qwindowsystem_qws.h qfontmanager_qws.h qwsdefaultdecoration_qws.h) 158 cd $(QTDIR)/include; $(patsubst %,ln -sf $(OPIEDIR)/x11/libqpe-x11/qt/%;,qgfx_qws.h qwsmouse_qws.h qcopchannel_qws.h qwindowsystem_qws.h qfontmanager_qws.h qwsdefaultdecoration_qws.h)