summaryrefslogtreecommitdiff
path: root/Rules.make
Unidiff
Diffstat (limited to 'Rules.make') (more/less context) (ignore whitespace changes)
-rw-r--r--Rules.make4
1 files changed, 3 insertions, 1 deletions
diff --git a/Rules.make b/Rules.make
index 0dce8d5..e89b129 100644
--- a/Rules.make
+++ b/Rules.make
@@ -1,311 +1,313 @@
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
15ifneq ($(CONFIG_DEBUG),) 15ifneq ($(CONFIG_DEBUG),)
16 echo CONFIG += debug >> $@ 16 echo CONFIG += debug >> $@
17 echo CONFIG -= release >> $@ 17 echo CONFIG -= release >> $@
18 echo DEFINES += "QT_COMPONENT_DEBUG=2" >> $@ 18 echo DEFINES += "QT_COMPONENT_DEBUG=2" >> $@
19 echo DEFINES += QT_DEBUG >> $@ 19 echo DEFINES += QT_DEBUG >> $@
20else 20else
21 echo CONFIG -= debug >> $@ 21 echo CONFIG -= debug >> $@
22 echo CONFIG += release >> $@ 22 echo CONFIG += release >> $@
23 echo DEFINES += "OPIE_NO_DEBUG" >> $@ 23 echo DEFINES += "OPIE_NO_DEBUG" >> $@
24endif 24endif
25ifeq ($(CONFIG_STATIC),y) 25ifeq ($(CONFIG_STATIC),y)
26 echo !contains\( TARGET,qpe \) \{ >> $@ 26 echo !contains\( TARGET,qpe \) \{ >> $@
27 echo CONFIG += staticlib >> $@ 27 echo CONFIG += staticlib >> $@
28 echo \} >> $@ 28 echo \} >> $@
29endif 29endif
30ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3 30ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3
31 echo CONFIG -= qt3 >> $@ 31 echo CONFIG -= qt3 >> $@
32else 32else
33 echo CONFIG += qt3 >> $@ 33 echo CONFIG += qt3 >> $@
34endif 34endif
35ifneq ($(CONFIG_QUICK_LAUNCH),) 35ifneq ($(CONFIG_QUICK_LAUNCH),)
36 echo contains\( CONFIG, quick-app \) \{ >> $@ 36 echo contains\( CONFIG, quick-app \) \{ >> $@
37 echo CONFIG -= staticlib >> $@ 37 echo CONFIG -= staticlib >> $@
38 echo CONFIG -= quick-app >> $@ 38 echo CONFIG -= quick-app >> $@
39 echo CONFIG += quick-app-lib >> $@ 39 echo CONFIG += quick-app-lib >> $@
40 echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@ 40 echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@
41 echo \} >> $@ 41 echo \} >> $@
42else 42else
43 echo contains\( CONFIG, quick-app \) \{ >> $@ 43 echo contains\( CONFIG, quick-app \) \{ >> $@
44 echo CONFIG -= quick-app >> $@ 44 echo CONFIG -= quick-app >> $@
45 echo CONFIG += quick-app-bin >> $@ 45 echo CONFIG += quick-app-bin >> $@
46 echo \} >> $@ 46 echo \} >> $@
47endif 47endif
48ifeq ($(CONFIG_SQL_PIM_BACKEND),y) 48ifeq ($(CONFIG_SQL_PIM_BACKEND),y)
49 echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@ 49 echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@
50else 50else
51 echo ENABLE_SQL_PIM_BACKEND=n >> $@ 51 echo ENABLE_SQL_PIM_BACKEND=n >> $@
52endif 52endif
53ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y) 53ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y)
54 echo CONFIG += no-override >> $@ 54 echo CONFIG += no-override >> $@
55endif 55endif
56ifeq ($(CONFIG_OPIE_NO_ERASERECT_FIX),y) 56ifeq ($(CONFIG_OPIE_NO_ERASERECT_FIX),y)
57 echo DEFINES += OPIE_NO_ERASE_RECT_HACKFIX >> $@ 57 echo DEFINES += OPIE_NO_ERASE_RECT_HACKFIX >> $@
58endif 58endif
59ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) 59ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y)
60 echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ 60 echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@
61endif 61endif
62ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) 62ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y)
63 echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ 63 echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@
64endif 64endif
65ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) 65ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y)
66 echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ 66 echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@
67endif 67endif
68ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y) 68ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y)
69 echo DEFINES += USE_FILE_NOTIFICATION >> $@ 69 echo DEFINES += USE_FILE_NOTIFICATION >> $@
70endif 70endif
71ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) 71ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y)
72 echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ 72 echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@
73endif 73endif
74ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) 74ifeq ($(CONFIG_OPIE_NEW_ALLOC),y)
75 echo DEFINES += OPIE_NEW_MALLOC >> $@ 75 echo DEFINES += OPIE_NEW_MALLOC >> $@
76endif 76endif
77ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) 77ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y)
78 echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ 78 echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@
79endif 79endif
80 echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ 80 echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@
81ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y) 81ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y)
82 echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ 82 echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@
83endif 83endif
84ifeq ($(CONFIG_OPIE_TASKBAR_LOCK_KEY_STATE),y) 84ifeq ($(CONFIG_OPIE_TASKBAR_LOCK_KEY_STATE),y)
85 echo DEFINES += OPIE_TASKBAR_LOCK_KEY_STATE >> $@ 85 echo DEFINES += OPIE_TASKBAR_LOCK_KEY_STATE >> $@
86 endif 86 endif
87# Write LIB dirs and INC dirs... 87# Write LIB dirs and INC dirs...
88ifeq ($(CONFIG_LIBETPAN_DEP),y) 88ifeq ($(CONFIG_LIBETPAN_DEP),y)
89 echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@ 89 echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@
90 echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@ 90 echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@
91endif 91endif
92ifeq ($(CONFIG_LIBPCAP_DEP),y) 92ifeq ($(CONFIG_LIBPCAP_DEP),y)
93 echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@ 93 echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@
94 echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@ 94 echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@
95endif 95endif
96ifeq ($(CONFIG_LIBSQLITE_DEP),y) 96ifeq ($(CONFIG_LIBSQLITE_DEP),y)
97 echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@ 97 echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@
98 echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@ 98 echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@
99endif 99endif
100ifeq ($(CONFIG_LIBXINE_DEP),y) 100ifeq ($(CONFIG_LIBXINE_DEP),y)
101 echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@ 101 echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@
102 echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@ 102 echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@
103endif 103endif
104ifeq ($(CONFIG_LIBIPK_DEP),y) 104ifeq ($(CONFIG_LIBIPK_DEP),y)
105 echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@ 105 echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@
106 echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@ 106 echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@
107endif 107endif
108ifeq ($(CONFIG_LIBSDK_DEP),y) 108ifeq ($(CONFIG_LIBSDK_DEP),y)
109 echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@ 109 echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@
110 echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@ 110 echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@
111endif 111endif
112ifeq ($(CONFIG_LIBSWORD_DEP),y) 112ifeq ($(CONFIG_LIBSWORD_DEP),y)
113 echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@ 113 echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@
114 echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@ 114 echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@
115endif 115endif
116$(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages 116$(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages
117 @echo Generating dependency information... 117 @echo Generating dependency information...
118# add to subdir-y, and add descend rules 118# add to subdir-y, and add descend rules
119 @cat $(TOPDIR)/packages | grep -v '^#' | \ 119 @cat $(TOPDIR)/packages | grep -v '^#' | \
120 awk '{print \ 120 awk '{print \
121 ".PHONY : " $$2 "\n" \ 121 ".PHONY : " $$2 "\n" \
122 "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ 122 "subdir-$$(" $$1 ") += " $$2 "\n\n"; \
123 print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends 123 print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends
124 cat $(TOPDIR)/packages | grep -v '^#' | \ 124 cat $(TOPDIR)/packages | grep -v '^#' | \
125 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"; }' \ 125 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"; }' \
126 >> $(TOPDIR)/.depends 126 >> $(TOPDIR)/.depends
127# interpackage dependency generation 127# interpackage dependency generation
128 @cat $(TOPDIR)/packages | \ 128 @cat $(TOPDIR)/packages | \
129 $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends 129 $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends
130 130
131$(TOPDIR)/.depends.cfgs: 131$(TOPDIR)/.depends.cfgs:
132# config.in interdependencies 132# config.in interdependencies
133 @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs 133 @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs
134 @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 ) >> $@ 134 @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 ) >> $@
135 @-rm -f dirs 135 @-rm -f dirs
136 136
137$(QTDIR)/stamp-headers : 137$(QTDIR)/stamp-headers :
138 @-rm -f $(QTDIR)/stamp-headers* 138 @-rm -f $(QTDIR)/stamp-headers*
139 ( cd $(QTDIR)/include; \ 139 ( cd $(QTDIR)/include; \
140 $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ 140 $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \
141 qcopchannel_qws.h qwindowsystem_qws.h \ 141 qcopchannel_qws.h qwindowsystem_qws.h \
142 qfontmanager_qws.h qwsdefaultdecoration_qws.h)) 142 qfontmanager_qws.h qwsdefaultdecoration_qws.h))
143 touch $@ 143 touch $@
144 144
145$(QTDIR)/stamp-headers-x11 : 145$(QTDIR)/stamp-headers-x11 :
146 @-rm -f $(QTDIR)/stamp-headers* 146 @-rm -f $(QTDIR)/stamp-headers*
147 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) 147 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)
148 touch $@ 148 touch $@
149 149
150$(OPIEDIR)/stamp-headers : 150$(OPIEDIR)/stamp-headers :
151 @-rm -f $(OPIEDIR)/stamp-headers* 151 @-rm -f $(OPIEDIR)/stamp-headers*
152 mkdir -p $(TOPDIR)/include/qpe \ 152 mkdir -p $(TOPDIR)/include/qpe \
153 $(TOPDIR)/include/qtopia \ 153 $(TOPDIR)/include/qtopia \
154 $(TOPDIR)/include/opie \ 154 $(TOPDIR)/include/opie \
155 $(TOPDIR)/include/opie2 \ 155 $(TOPDIR)/include/opie2 \
156 $(TOPDIR)/include/opie2/private \
156 $(TOPDIR)/include/qtopia/private \ 157 $(TOPDIR)/include/qtopia/private \
157 $(TOPDIR)/include/sl 158 $(TOPDIR)/include/sl
158 ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) 159 ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; )
159 ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) 160 ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; )
160 ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) 161 ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; )
161ifeq ($(CONFIG_LIBOPIE),y) 162ifeq ($(CONFIG_LIBOPIE),y)
162 # libopie1 163 # libopie1
163 ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) 164 ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; )
164 ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) 165 ( cd include/opie && ln -sf ../../libopie/pim/*.h .; )
165 ( cd include/opie && ln -sf ../../libopie/big-screen/*.h .; ) 166 ( cd include/opie && ln -sf ../../libopie/big-screen/*.h .; )
166endif 167endif
167 # libopie2 168 # libopie2
168 ( cd include/opie2 && ln -sf ../../libopie2/opiecore/*.h .; ) 169 ( cd include/opie2 && ln -sf ../../libopie2/opiecore/*.h .; )
169 ( cd include/opie2 && ln -sf ../../libopie2/opiecore/device/*.h .; ) 170 ( cd include/opie2 && ln -sf ../../libopie2/opiecore/device/*.h .; )
170 ( cd include/opie2 && ln -sf ../../libopie2/opiemm/*.h .; ) 171 ( cd include/opie2 && ln -sf ../../libopie2/opiemm/*.h .; )
171 ( cd include/opie2 && ln -sf ../../libopie2/opiedb/*.h .; ) 172 ( cd include/opie2 && ln -sf ../../libopie2/opiedb/*.h .; )
172 ( cd include/opie2 && ln -sf ../../libopie2/opienet/*.h .; ) 173 ( cd include/opie2 && ln -sf ../../libopie2/opienet/*.h .; )
173 ( cd include/opie2 && ln -sf ../../libopie2/opiepim/*.h .; ) 174 ( cd include/opie2 && ln -sf ../../libopie2/opiepim/*.h .; )
174 ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/*.h .; ) 175 ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/*.h .; )
175 ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/backends/*.h .; ) 176 ( cd include/opie2 && ln -sf ../../libopie2/opiepim/backend/*.h .; )
177 ( cd include/opie2/private && ln -sf ../../../libopie2/opiepim/private/*.h .; )
176 ( cd include/opie2 && ln -sf ../../libopie2/opiepim/ui/*.h .; ) 178 ( cd include/opie2 && ln -sf ../../libopie2/opiepim/ui/*.h .; )
177 ( cd include/opie2 && ln -sf ../../libopie2/opieui/*.h .; ) 179 ( cd include/opie2 && ln -sf ../../libopie2/opieui/*.h .; )
178 ( cd include/opie2 && ln -sf ../../libopie2/opieui/fileselector/*.h .; ) 180 ( cd include/opie2 && ln -sf ../../libopie2/opieui/fileselector/*.h .; )
179 ( cd include/opie2 && ln -sf ../../libopie2/opieui/big-screen/*.h .; ) 181 ( cd include/opie2 && ln -sf ../../libopie2/opieui/big-screen/*.h .; )
180 ( cd include/opie2 && ln -sf ../../libopie2/opiesecurity/*.h .; ) 182 ( cd include/opie2 && ln -sf ../../libopie2/opiesecurity/*.h .; )
181 # auxilliary libraries 183 # auxilliary libraries
182 ( cd include/opie2 && ln -sf ../../libqtaux/*.h .; ) 184 ( cd include/opie2 && ln -sf ../../libqtaux/*.h .; )
183 ( cd include/sl && ln -sf ../../libslcompat/*.h .; ) 185 ( cd include/sl && ln -sf ../../libslcompat/*.h .; )
184 ( cd include/ && ln -sf ../noncore/net/ftplib/*.h .; ) 186 ( cd include/ && ln -sf ../noncore/net/ftplib/*.h .; )
185 ( cd include/ && ln -sf ../inputmethods/pickboard/pickboardcfg.h .; ) 187 ( cd include/ && ln -sf ../inputmethods/pickboard/pickboardcfg.h .; )
186 ( cd include/ && ln -sf ../inputmethods/pickboard/pickboardpicks.h .; ) 188 ( cd include/ && ln -sf ../inputmethods/pickboard/pickboardpicks.h .; )
187 # all 189 # all
188ifeq ($(CONFIG_LIBOPIE),y) 190ifeq ($(CONFIG_LIBOPIE),y)
189 ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ 191 ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \
190 ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done ) 192 ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done )
191endif 193endif
192 ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opieui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ 194 ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opieui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \
193 ln -sf ../../libopie2/opieui/$$generatedHeader $$generatedHeader; done ) 195 ln -sf ../../libopie2/opieui/$$generatedHeader $$generatedHeader; done )
194 ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opiepim/ui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ 196 ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opiepim/ui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \
195 ln -sf ../../libopie2/opiepim/ui/$$generatedHeader $$generatedHeader; done ) 197 ln -sf ../../libopie2/opiepim/ui/$$generatedHeader $$generatedHeader; done )
196 ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h 198 ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h
197 touch $@ 199 touch $@
198 200
199$(OPIEDIR)/stamp-headers-x11 : 201$(OPIEDIR)/stamp-headers-x11 :
200 @-rm -f $(OPIEDIR)/stamp-headers* 202 @-rm -f $(OPIEDIR)/stamp-headers*
201 mkdir -p $(TOPDIR)/include/qpe $(TOPDIR)/include/qtopia \ 203 mkdir -p $(TOPDIR)/include/qpe $(TOPDIR)/include/qtopia \
202 $(TOPDIR)/include/opie $(TOPDIR)/include/qtopia/private 204 $(TOPDIR)/include/opie $(TOPDIR)/include/qtopia/private
203 ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) 205 ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; )
204 ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) 206 ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; )
205 ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) 207 ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; )
206 ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) 208 ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; )
207 ( cd include/opie && ln -sf ../../libsql/*.h .; ) 209 ( cd include/opie && ln -sf ../../libsql/*.h .; )
208 ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) 210 ( cd include/opie && ln -sf ../../libopie/pim/*.h .; )
209 ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ 211 ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \
210 ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done ) 212 ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done )
211 ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h 213 ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h
212 ( cd include/qpe; ln -sf ../../x11/libqpe-x11/qpe/*.h .; ) 214 ( cd include/qpe; ln -sf ../../x11/libqpe-x11/qpe/*.h .; )
213 touch $@ 215 touch $@
214 216
215$(TOPDIR)/library/custom.h : $(TOPDIR)/.config 217$(TOPDIR)/library/custom.h : $(TOPDIR)/.config
216 @-rm -f $@ 218 @-rm -f $@
217 @$(if $(patsubst "%",%,$(CONFIG_CUSTOMFILE)),\ 219 @$(if $(patsubst "%",%,$(CONFIG_CUSTOMFILE)),\
218 ln -sf $(patsubst "%",%,$(CONFIG_CUSTOMFILE)) $@) 220 ln -sf $(patsubst "%",%,$(CONFIG_CUSTOMFILE)) $@)
219 @touch $@ 221 @touch $@
220 222
221$(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf $(TOPDIR)/scripts/kconfig/conf $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/qmake/qmake: 223$(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf $(TOPDIR)/scripts/kconfig/conf $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/qmake/qmake:
222 @$(call descend,$(shell dirname $@),$(shell basename $@)) 224 @$(call descend,$(shell dirname $@),$(shell basename $@))
223 225
224menuconfig: $(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf ./config.in 226menuconfig: $(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf ./config.in
225 $(TOPDIR)/scripts/kconfig/mconf ./config.in 227 $(TOPDIR)/scripts/kconfig/mconf ./config.in
226 @touch ./.config.stamp 228 @touch ./.config.stamp
227 229
228xconfig: $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in 230xconfig: $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in
229 $(TOPDIR)/scripts/kconfig/qconf ./config.in 231 $(TOPDIR)/scripts/kconfig/qconf ./config.in
230 @touch .config.stamp 232 @touch .config.stamp
231 233
232gconfig: $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in 234gconfig: $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in
233 $(TOPDIR)/scripts/kconfig/gconf ./config.in 235 $(TOPDIR)/scripts/kconfig/gconf ./config.in
234 @touch .config.stamp 236 @touch .config.stamp
235 237
236config: $(TOPDIR)/scripts/kconfig/conf ./config.in 238config: $(TOPDIR)/scripts/kconfig/conf ./config.in
237 $(TOPDIR)/scripts/kconfig/conf ./config.in 239 $(TOPDIR)/scripts/kconfig/conf ./config.in
238 @touch .config.stamp 240 @touch .config.stamp
239 241
240oldconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in 242oldconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in
241 $(TOPDIR)/scripts/kconfig/conf -o ./config.in 243 $(TOPDIR)/scripts/kconfig/conf -o ./config.in
242 @touch .config.stamp 244 @touch .config.stamp
243 245
244randconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in 246randconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in
245 $(TOPDIR)/scripts/kconfig/conf -r ./config.in 247 $(TOPDIR)/scripts/kconfig/conf -r ./config.in
246 @touch .config.stamp 248 @touch .config.stamp
247 249
248allyesconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in 250allyesconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in
249 $(TOPDIR)/scripts/kconfig/conf -y ./config.in 251 $(TOPDIR)/scripts/kconfig/conf -y ./config.in
250 @touch .config.stamp 252 @touch .config.stamp
251 253
252allnoconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in 254allnoconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in
253 $(TOPDIR)/scripts/kconfig/conf -n ./config.in 255 $(TOPDIR)/scripts/kconfig/conf -n ./config.in
254 @touch .config.stamp 256 @touch .config.stamp
255 257
256defconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in 258defconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in
257 $(TOPDIR)/scripts/kconfig/conf -d ./config.in 259 $(TOPDIR)/scripts/kconfig/conf -d ./config.in
258 @touch .config.stamp 260 @touch .config.stamp
259 261
260$(TOPDIR)/qmake/qmake : $(TOPDIR)/mkspecs/default 262$(TOPDIR)/qmake/qmake : $(TOPDIR)/mkspecs/default
261 263
262$(TOPDIR)/mkspecs/default : 264$(TOPDIR)/mkspecs/default :
263 ln -sf linux-g++ $@ 265 ln -sf linux-g++ $@
264 266
265$(TOPDIR)/scripts/subst : force 267$(TOPDIR)/scripts/subst : force
266 @( \ 268 @( \
267 echo 's,\$$QPE_VERSION,$(QPE_VERSION),g'; \ 269 echo 's,\$$QPE_VERSION,$(QPE_VERSION),g'; \
268 echo 's,\$$OPIE_VERSION,$(OPIE_VERSION),g'; \ 270 echo 's,\$$OPIE_VERSION,$(OPIE_VERSION),g'; \
269 echo 's,\$$QTE_VERSION,$(QTE_VERSION),g'; \ 271 echo 's,\$$QTE_VERSION,$(QTE_VERSION),g'; \
270 echo 's,\$$QTE_REVISION,$(QTE_REVISION),g'; \ 272 echo 's,\$$QTE_REVISION,$(QTE_REVISION),g'; \
271 echo 's,\$$SUB_VERSION,$(SUB_VERSION),g'; \ 273 echo 's,\$$SUB_VERSION,$(SUB_VERSION),g'; \
272 echo 's,\$$EXTRAVERSION,$(EXTRAVERSION),g'; \ 274 echo 's,\$$EXTRAVERSION,$(EXTRAVERSION),g'; \
273 echo 's,\$$QTE_BASEVERSION,$(QTE_BASEVERSION),g'; \ 275 echo 's,\$$QTE_BASEVERSION,$(QTE_BASEVERSION),g'; \
274 ) > $@ || ( rm -f $@; exit 1 ) 276 ) > $@ || ( rm -f $@; exit 1 )
275 277
276$(TOPDIR)/scripts/filesubst : force 278$(TOPDIR)/scripts/filesubst : force
277 @( \ 279 @( \
278 echo 's,\$$OPIEDIR/root/,/,g'; \ 280 echo 's,\$$OPIEDIR/root/,/,g'; \
279 echo 's,$(OPIEDIR)/root/,/,g'; \ 281 echo 's,$(OPIEDIR)/root/,/,g'; \
280 echo 's,\$$OPIEDIR,$(prefix),g'; \ 282 echo 's,\$$OPIEDIR,$(prefix),g'; \
281 echo 's,$(OPIEDIR),$(prefix),g'; \ 283 echo 's,$(OPIEDIR),$(prefix),g'; \
282 echo 's,\$$QTDIR,$(prefix),g'; \ 284 echo 's,\$$QTDIR,$(prefix),g'; \
283 echo 's,$(QTDIR),$(prefix),g'; \ 285 echo 's,$(QTDIR),$(prefix),g'; \
284 echo 's,^\(\./\)*root/,/,g'; \ 286 echo 's,^\(\./\)*root/,/,g'; \
285 echo 's,^\(\./\)*etc/,$(prefix)/etc/,g'; \ 287 echo 's,^\(\./\)*etc/,$(prefix)/etc/,g'; \
286 echo 's,^\(\./\)*lib/,$(prefix)/lib/,g'; \ 288 echo 's,^\(\./\)*lib/,$(prefix)/lib/,g'; \
287 echo 's,^\(\./\)*bin/,$(prefix)/bin/,g'; \ 289 echo 's,^\(\./\)*bin/,$(prefix)/bin/,g'; \
288 echo 's,^\(\./\)*pics/,$(prefix)/pics/,g'; \ 290 echo 's,^\(\./\)*pics/,$(prefix)/pics/,g'; \
289 echo 's,^\(\./\)*sounds/,$(prefix)/sounds/,g'; \ 291 echo 's,^\(\./\)*sounds/,$(prefix)/sounds/,g'; \
290 echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \ 292 echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \
291 echo 's,^\(\./\)*plugins/,$(prefix)/plugins/,g'; \ 293 echo 's,^\(\./\)*plugins/,$(prefix)/plugins/,g'; \
292 echo 's,^\(\./\)*apps/,$(prefix)/apps/,g'; \ 294 echo 's,^\(\./\)*apps/,$(prefix)/apps/,g'; \
293 echo 's,^\(\./\)*share/,$(prefix)/share/,g'; \ 295 echo 's,^\(\./\)*share/,$(prefix)/share/,g'; \
294 echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \ 296 echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \
295 echo 's,^\(\./\)*help/,$(prefix)/help/,g'; \ 297 echo 's,^\(\./\)*help/,$(prefix)/help/,g'; \
296 ) > $@ || ( rm -f $@; exit 1 ) 298 ) > $@ || ( rm -f $@; exit 1 )
297 299
298## general rules ## 300## general rules ##
299 301
300define descend 302define descend
301 $(MAKE) $(if $(QMAKE),QMAKE=$(QMAKE)) -C $(1) $(2) 303 $(MAKE) $(if $(QMAKE),QMAKE=$(QMAKE)) -C $(1) $(2)
302endef 304endef
303 305
304define makefilegen 306define makefilegen
305 cd $(if $(1),$(shell dirname $(1))); $(TOPDIR)/qmake/qmake $(3) -o $(if $(1),$(shell basename $(1))) `cat $(OPIEDIR)/packages | grep " \`echo $(1)|sed -e 's,/Makefile$$,,'\`" | \ 307 cd $(if $(1),$(shell dirname $(1))); $(TOPDIR)/qmake/qmake $(3) -o $(if $(1),$(shell basename $(1))) `cat $(OPIEDIR)/packages | grep " \`echo $(1)|sed -e 's,/Makefile$$,,'\`" | \
306 head -1 | awk '{print $$3}'` 308 head -1 | awk '{print $$3}'`
307endef 309endef
308 310
309define makecfg 311define makecfg
310 $(TOPDIR)/scripts/makecfg.pl $1 $(OPIEDIR) 312 $(TOPDIR)/scripts/makecfg.pl $1 $(OPIEDIR)
311endef 313endef