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