|
|
|
@@ -1,257 +1,258 @@ |
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 | ifneq ($(CONFIG_DEBUG),) |
9 | ifneq ($(CONFIG_DEBUG),) |
10 | echo CONFIG += debug >> $@ |
10 | echo CONFIG += debug >> $@ |
11 | echo CONFIG -= release >> $@ |
11 | echo CONFIG -= release >> $@ |
12 | echo DEFINES += "QT_COMPONENT_DEBUG=2" >> $@ |
12 | echo DEFINES += "QT_COMPONENT_DEBUG=2" >> $@ |
13 | echo DEFINES += QT_DEBUG >> $@ |
13 | echo DEFINES += QT_DEBUG >> $@ |
14 | else |
14 | else |
15 | echo CONFIG -= debug >> $@ |
15 | echo CONFIG -= debug >> $@ |
16 | echo CONFIG += release >> $@ |
16 | echo CONFIG += release >> $@ |
| |
17 | echo DEFINES += "OPIE_NO_DEBUG" >> $@ |
17 | endif |
18 | endif |
18 | ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3 |
19 | ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3 |
19 | echo CONFIG -= qt3 >> $@ |
20 | echo CONFIG -= qt3 >> $@ |
20 | else |
21 | else |
21 | echo CONFIG += qt3 >> $@ |
22 | echo CONFIG += qt3 >> $@ |
22 | endif |
23 | endif |
23 | ifneq ($(CONFIG_QUICK_LAUNCH),) |
24 | ifneq ($(CONFIG_QUICK_LAUNCH),) |
24 | echo contains\( CONFIG, quick-app \) \{ >> $@ |
25 | echo contains\( CONFIG, quick-app \) \{ >> $@ |
25 | echo CONFIG -= quick-app >> $@ |
26 | echo CONFIG -= quick-app >> $@ |
26 | echo CONFIG += quick-app-lib >> $@ |
27 | echo CONFIG += quick-app-lib >> $@ |
27 | echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@ |
28 | echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@ |
28 | echo \} >> $@ |
29 | echo \} >> $@ |
29 | else |
30 | else |
30 | echo contains\( CONFIG, quick-app \) \{ >> $@ |
31 | echo contains\( CONFIG, quick-app \) \{ >> $@ |
31 | echo CONFIG -= quick-app >> $@ |
32 | echo CONFIG -= quick-app >> $@ |
32 | echo CONFIG += quick-app-bin >> $@ |
33 | echo CONFIG += quick-app-bin >> $@ |
33 | echo \} >> $@ |
34 | echo \} >> $@ |
34 | endif |
35 | endif |
35 | ifeq ($(CONFIG_SQL_PIM_BACKEND),y) |
36 | ifeq ($(CONFIG_SQL_PIM_BACKEND),y) |
36 | echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@ |
37 | echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@ |
37 | else |
38 | else |
38 | echo ENABLE_SQL_PIM_BACKEND=n >> $@ |
39 | echo ENABLE_SQL_PIM_BACKEND=n >> $@ |
39 | endif |
40 | endif |
40 | ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y) |
41 | ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y) |
41 | echo CONFIG += no-override >> $@ |
42 | echo CONFIG += no-override >> $@ |
42 | endif |
43 | endif |
43 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) |
44 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) |
44 | echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ |
45 | echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ |
45 | endif |
46 | endif |
46 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) |
47 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) |
47 | echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ |
48 | echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ |
48 | endif |
49 | endif |
49 | ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) |
50 | ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) |
50 | echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ |
51 | echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ |
51 | endif |
52 | endif |
52 | ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) |
53 | ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) |
53 | echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ |
54 | echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ |
54 | endif |
55 | endif |
55 | ifeq ($(CONFIG_OPIE_HIGH_RES_SMALL_PHY),y) |
56 | ifeq ($(CONFIG_OPIE_HIGH_RES_SMALL_PHY),y) |
56 | echo DEFINES += OPIE_HIGH_RES_SMALL_PHY >> $@ |
57 | echo DEFINES += OPIE_HIGH_RES_SMALL_PHY >> $@ |
57 | endif |
58 | endif |
58 | ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) |
59 | ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) |
59 | echo DEFINES += OPIE_NEW_MALLOC >> $@ |
60 | echo DEFINES += OPIE_NEW_MALLOC >> $@ |
60 | endif |
61 | endif |
61 | ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) |
62 | ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) |
62 | echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ |
63 | echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ |
63 | endif |
64 | endif |
64 | echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ |
65 | echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ |
65 | echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ |
66 | echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ |
66 | $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages |
67 | $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages |
67 | @echo Generating dependency information... |
68 | @echo Generating dependency information... |
68 | # add to subdir-y, and add descend rules |
69 | # add to subdir-y, and add descend rules |
69 | @cat $(TOPDIR)/packages | grep -v '^#' | \ |
70 | @cat $(TOPDIR)/packages | grep -v '^#' | \ |
70 | awk '{print \ |
71 | awk '{print \ |
71 | ".PHONY : " $$2 "\n" \ |
72 | ".PHONY : " $$2 "\n" \ |
72 | "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ |
73 | "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ |
73 | print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends |
74 | print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends |
74 | cat $(TOPDIR)/packages | grep -v '^#' | \ |
75 | cat $(TOPDIR)/packages | grep -v '^#' | \ |
75 | 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"; }' \ |
76 | 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"; }' \ |
76 | >> $(TOPDIR)/.depends |
77 | >> $(TOPDIR)/.depends |
77 | # interpackage dependency generation |
78 | # interpackage dependency generation |
78 | @cat $(TOPDIR)/packages | \ |
79 | @cat $(TOPDIR)/packages | \ |
79 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends |
80 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends |
80 | |
81 | |
81 | $(TOPDIR)/.depends.cfgs: |
82 | $(TOPDIR)/.depends.cfgs: |
82 | # config.in interdependencies |
83 | # config.in interdependencies |
83 | @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs |
84 | @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs |
84 | @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 ) >> $@ |
85 | @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 ) >> $@ |
85 | @-rm -f dirs |
86 | @-rm -f dirs |
86 | |
87 | |
87 | $(QTDIR)/stamp-headers : |
88 | $(QTDIR)/stamp-headers : |
88 | @-rm -f $(QTDIR)/stamp-headers* |
89 | @-rm -f $(QTDIR)/stamp-headers* |
89 | ( cd $(QTDIR)/include; \ |
90 | ( cd $(QTDIR)/include; \ |
90 | $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ |
91 | $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ |
91 | qcopchannel_qws.h qwindowsystem_qws.h \ |
92 | qcopchannel_qws.h qwindowsystem_qws.h \ |
92 | qfontmanager_qws.h qwsdefaultdecoration_qws.h)) |
93 | qfontmanager_qws.h qwsdefaultdecoration_qws.h)) |
93 | touch $@ |
94 | touch $@ |
94 | |
95 | |
95 | $(QTDIR)/stamp-headers-x11 : |
96 | $(QTDIR)/stamp-headers-x11 : |
96 | @-rm -f $(QTDIR)/stamp-headers* |
97 | @-rm -f $(QTDIR)/stamp-headers* |
97 | 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) |
98 | 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) |
98 | touch $@ |
99 | touch $@ |
99 | |
100 | |
100 | $(OPIEDIR)/stamp-headers : |
101 | $(OPIEDIR)/stamp-headers : |
101 | @-rm -f $(OPIEDIR)/stamp-headers* |
102 | @-rm -f $(OPIEDIR)/stamp-headers* |
102 | mkdir -p $(TOPDIR)/include/qpe \ |
103 | mkdir -p $(TOPDIR)/include/qpe \ |
103 | $(TOPDIR)/include/qtopia \ |
104 | $(TOPDIR)/include/qtopia \ |
104 | $(TOPDIR)/include/opie \ |
105 | $(TOPDIR)/include/opie \ |
105 | $(TOPDIR)/include/opie2 \ |
106 | $(TOPDIR)/include/opie2 \ |
106 | $(TOPDIR)/include/qtopia/private \ |
107 | $(TOPDIR)/include/qtopia/private \ |
107 | $(TOPDIR)/include/sl |
108 | $(TOPDIR)/include/sl |
108 | ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) |
109 | ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) |
109 | ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) |
110 | ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) |
110 | ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) |
111 | ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) |
111 | ifeq ($(CONFIG_LIBOPIE),y) |
112 | ifeq ($(CONFIG_LIBOPIE),y) |
112 | # libopie1 |
113 | # libopie1 |
113 | ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) |
114 | ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) |
114 | ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) |
115 | ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) |
115 | ( cd include/opie && ln -sf ../../libopie/big-screen/*.h .; ) |
116 | ( cd include/opie && ln -sf ../../libopie/big-screen/*.h .; ) |
116 | endif |
117 | endif |
117 | # libopie2 |
118 | # libopie2 |
118 | ( cd include/opie2 && ln -sf ../../libopie2/opiecore/*.h .; ) |
119 | ( cd include/opie2 && ln -sf ../../libopie2/opiecore/*.h .; ) |
119 | ( cd include/opie2 && ln -sf ../../libopie2/opiecore/device/*.h .; ) |
120 | ( cd include/opie2 && ln -sf ../../libopie2/opiecore/device/*.h .; ) |
120 | ( cd include/opie2 && ln -sf ../../libopie2/opiemm/*.h .; ) |
121 | ( cd include/opie2 && ln -sf ../../libopie2/opiemm/*.h .; ) |
121 | ( cd include/opie2 && ln -sf ../../libopie2/opiedb/*.h .; ) |
122 | ( cd include/opie2 && ln -sf ../../libopie2/opiedb/*.h .; ) |
122 | ( cd include/opie2 && ln -sf ../../libopie2/opienet/*.h .; ) |
123 | ( cd include/opie2 && ln -sf ../../libopie2/opienet/*.h .; ) |
123 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/*.h .; ) |
124 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/*.h .; ) |
124 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/*.h .; ) |
125 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/*.h .; ) |
125 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/backends/*.h .; ) |
126 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/backends/*.h .; ) |
126 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/ui/*.h .; ) |
127 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/ui/*.h .; ) |
127 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/*.h .; ) |
128 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/*.h .; ) |
128 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/fileselector/*.h .; ) |
129 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/fileselector/*.h .; ) |
129 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/big-screen/*.h .; ) |
130 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/big-screen/*.h .; ) |
130 | # auxilliary libraries |
131 | # auxilliary libraries |
131 | ( cd include/opie2 && ln -sf ../../libqtaux/*.h .; ) |
132 | ( cd include/opie2 && ln -sf ../../libqtaux/*.h .; ) |
132 | ( cd include/sl && ln -sf ../../libslcompat/*.h .; ) |
133 | ( cd include/sl && ln -sf ../../libslcompat/*.h .; ) |
133 | # all |
134 | # all |
134 | ifeq ($(CONFIG_LIBOPIE),y) |
135 | ifeq ($(CONFIG_LIBOPIE),y) |
135 | ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ |
136 | ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ |
136 | ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done ) |
137 | ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done ) |
137 | endif |
138 | endif |
138 | ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opieui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ |
139 | ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opieui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ |
139 | ln -sf ../../libopie2/opieui/$$generatedHeader $$generatedHeader; done ) |
140 | ln -sf ../../libopie2/opieui/$$generatedHeader $$generatedHeader; done ) |
140 | ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opiepim/ui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ |
141 | ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opiepim/ui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ |
141 | ln -sf ../../libopie2/opiepim/ui/$$generatedHeader $$generatedHeader; done ) |
142 | ln -sf ../../libopie2/opiepim/ui/$$generatedHeader $$generatedHeader; done ) |
142 | ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h |
143 | ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h |
143 | touch $@ |
144 | touch $@ |
144 | |
145 | |
145 | $(OPIEDIR)/stamp-headers-x11 : |
146 | $(OPIEDIR)/stamp-headers-x11 : |
146 | @-rm -f $(OPIEDIR)/stamp-headers* |
147 | @-rm -f $(OPIEDIR)/stamp-headers* |
147 | mkdir -p $(TOPDIR)/include/qpe $(TOPDIR)/include/qtopia \ |
148 | mkdir -p $(TOPDIR)/include/qpe $(TOPDIR)/include/qtopia \ |
148 | $(TOPDIR)/include/opie $(TOPDIR)/include/qtopia/private |
149 | $(TOPDIR)/include/opie $(TOPDIR)/include/qtopia/private |
149 | ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) |
150 | ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) |
150 | ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) |
151 | ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) |
151 | ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) |
152 | ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) |
152 | ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) |
153 | ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) |
153 | ( cd include/opie && ln -sf ../../libsql/*.h .; ) |
154 | ( cd include/opie && ln -sf ../../libsql/*.h .; ) |
154 | ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) |
155 | ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) |
155 | ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ |
156 | ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ |
156 | ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done ) |
157 | ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done ) |
157 | ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h |
158 | ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h |
158 | ( cd include/qpe; ln -sf ../../x11/libqpe-x11/qpe/*.h .; ) |
159 | ( cd include/qpe; ln -sf ../../x11/libqpe-x11/qpe/*.h .; ) |
159 | touch $@ |
160 | touch $@ |
160 | |
161 | |
161 | $(TOPDIR)/library/custom.h : $(TOPDIR)/.config |
162 | $(TOPDIR)/library/custom.h : $(TOPDIR)/.config |
162 | @-rm -f $@ |
163 | @-rm -f $@ |
163 | @$(if $(patsubst "%",%,$(CONFIG_CUSTOMFILE)),\ |
164 | @$(if $(patsubst "%",%,$(CONFIG_CUSTOMFILE)),\ |
164 | ln -sf $(patsubst "%",%,$(CONFIG_CUSTOMFILE)) $@) |
165 | ln -sf $(patsubst "%",%,$(CONFIG_CUSTOMFILE)) $@) |
165 | @touch $@ |
166 | @touch $@ |
166 | |
167 | |
167 | $(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: |
168 | $(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: |
168 | @$(call descend,$(shell dirname $@),$(shell basename $@)) |
169 | @$(call descend,$(shell dirname $@),$(shell basename $@)) |
169 | |
170 | |
170 | menuconfig: $(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf ./config.in |
171 | menuconfig: $(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf ./config.in |
171 | $(TOPDIR)/scripts/kconfig/mconf ./config.in |
172 | $(TOPDIR)/scripts/kconfig/mconf ./config.in |
172 | @touch ./.config.stamp |
173 | @touch ./.config.stamp |
173 | |
174 | |
174 | xconfig: $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in |
175 | xconfig: $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in |
175 | $(TOPDIR)/scripts/kconfig/qconf ./config.in |
176 | $(TOPDIR)/scripts/kconfig/qconf ./config.in |
176 | @touch .config.stamp |
177 | @touch .config.stamp |
177 | |
178 | |
178 | gconfig: $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in |
179 | gconfig: $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in |
179 | $(TOPDIR)/scripts/kconfig/gconf ./config.in |
180 | $(TOPDIR)/scripts/kconfig/gconf ./config.in |
180 | @touch .config.stamp |
181 | @touch .config.stamp |
181 | |
182 | |
182 | config: $(TOPDIR)/scripts/kconfig/conf ./config.in |
183 | config: $(TOPDIR)/scripts/kconfig/conf ./config.in |
183 | $(TOPDIR)/scripts/kconfig/conf ./config.in |
184 | $(TOPDIR)/scripts/kconfig/conf ./config.in |
184 | @touch .config.stamp |
185 | @touch .config.stamp |
185 | |
186 | |
186 | oldconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
187 | oldconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
187 | $(TOPDIR)/scripts/kconfig/conf -o ./config.in |
188 | $(TOPDIR)/scripts/kconfig/conf -o ./config.in |
188 | @touch .config.stamp |
189 | @touch .config.stamp |
189 | |
190 | |
190 | randconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
191 | randconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
191 | $(TOPDIR)/scripts/kconfig/conf -r ./config.in |
192 | $(TOPDIR)/scripts/kconfig/conf -r ./config.in |
192 | @touch .config.stamp |
193 | @touch .config.stamp |
193 | |
194 | |
194 | allyesconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
195 | allyesconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
195 | $(TOPDIR)/scripts/kconfig/conf -y ./config.in |
196 | $(TOPDIR)/scripts/kconfig/conf -y ./config.in |
196 | @touch .config.stamp |
197 | @touch .config.stamp |
197 | |
198 | |
198 | allnoconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
199 | allnoconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
199 | $(TOPDIR)/scripts/kconfig/conf -n ./config.in |
200 | $(TOPDIR)/scripts/kconfig/conf -n ./config.in |
200 | @touch .config.stamp |
201 | @touch .config.stamp |
201 | |
202 | |
202 | defconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
203 | defconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
203 | $(TOPDIR)/scripts/kconfig/conf -d ./config.in |
204 | $(TOPDIR)/scripts/kconfig/conf -d ./config.in |
204 | @touch .config.stamp |
205 | @touch .config.stamp |
205 | |
206 | |
206 | $(TOPDIR)/qmake/qmake : $(TOPDIR)/mkspecs/default |
207 | $(TOPDIR)/qmake/qmake : $(TOPDIR)/mkspecs/default |
207 | |
208 | |
208 | $(TOPDIR)/mkspecs/default : |
209 | $(TOPDIR)/mkspecs/default : |
209 | ln -sf linux-g++ $@ |
210 | ln -sf linux-g++ $@ |
210 | |
211 | |
211 | $(TOPDIR)/scripts/subst : force |
212 | $(TOPDIR)/scripts/subst : force |
212 | @( \ |
213 | @( \ |
213 | echo 's,\$$QPE_VERSION,$(QPE_VERSION),g'; \ |
214 | echo 's,\$$QPE_VERSION,$(QPE_VERSION),g'; \ |
214 | echo 's,\$$OPIE_VERSION,$(OPIE_VERSION),g'; \ |
215 | echo 's,\$$OPIE_VERSION,$(OPIE_VERSION),g'; \ |
215 | echo 's,\$$QTE_VERSION,$(QTE_VERSION),g'; \ |
216 | echo 's,\$$QTE_VERSION,$(QTE_VERSION),g'; \ |
216 | echo 's,\$$QTE_REVISION,$(QTE_REVISION),g'; \ |
217 | echo 's,\$$QTE_REVISION,$(QTE_REVISION),g'; \ |
217 | echo 's,\$$SUB_VERSION,$(SUB_VERSION),g'; \ |
218 | echo 's,\$$SUB_VERSION,$(SUB_VERSION),g'; \ |
218 | echo 's,\$$EXTRAVERSION,$(EXTRAVERSION),g'; \ |
219 | echo 's,\$$EXTRAVERSION,$(EXTRAVERSION),g'; \ |
219 | echo 's,\$$QTE_BASEVERSION,$(QTE_BASEVERSION),g'; \ |
220 | echo 's,\$$QTE_BASEVERSION,$(QTE_BASEVERSION),g'; \ |
220 | ) > $@ || ( rm -f $@; exit 1 ) |
221 | ) > $@ || ( rm -f $@; exit 1 ) |
221 | |
222 | |
222 | $(TOPDIR)/scripts/filesubst : force |
223 | $(TOPDIR)/scripts/filesubst : force |
223 | @( \ |
224 | @( \ |
224 | echo 's,\$$OPIEDIR/root/,/,g'; \ |
225 | echo 's,\$$OPIEDIR/root/,/,g'; \ |
225 | echo 's,$(OPIEDIR)/root/,/,g'; \ |
226 | echo 's,$(OPIEDIR)/root/,/,g'; \ |
226 | echo 's,\$$OPIEDIR,$(prefix),g'; \ |
227 | echo 's,\$$OPIEDIR,$(prefix),g'; \ |
227 | echo 's,$(OPIEDIR),$(prefix),g'; \ |
228 | echo 's,$(OPIEDIR),$(prefix),g'; \ |
228 | echo 's,\$$QTDIR,$(prefix),g'; \ |
229 | echo 's,\$$QTDIR,$(prefix),g'; \ |
229 | echo 's,$(QTDIR),$(prefix),g'; \ |
230 | echo 's,$(QTDIR),$(prefix),g'; \ |
230 | echo 's,^\(\./\)*root/,/,g'; \ |
231 | echo 's,^\(\./\)*root/,/,g'; \ |
231 | echo 's,^\(\./\)*etc/,$(prefix)/etc/,g'; \ |
232 | echo 's,^\(\./\)*etc/,$(prefix)/etc/,g'; \ |
232 | echo 's,^\(\./\)*lib/,$(prefix)/lib/,g'; \ |
233 | echo 's,^\(\./\)*lib/,$(prefix)/lib/,g'; \ |
233 | echo 's,^\(\./\)*bin/,$(prefix)/bin/,g'; \ |
234 | echo 's,^\(\./\)*bin/,$(prefix)/bin/,g'; \ |
234 | echo 's,^\(\./\)*pics/,$(prefix)/pics/,g'; \ |
235 | echo 's,^\(\./\)*pics/,$(prefix)/pics/,g'; \ |
235 | echo 's,^\(\./\)*sounds/,$(prefix)/sounds/,g'; \ |
236 | echo 's,^\(\./\)*sounds/,$(prefix)/sounds/,g'; \ |
236 | echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \ |
237 | echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \ |
237 | echo 's,^\(\./\)*plugins/,$(prefix)/plugins/,g'; \ |
238 | echo 's,^\(\./\)*plugins/,$(prefix)/plugins/,g'; \ |
238 | echo 's,^\(\./\)*apps/,$(prefix)/apps/,g'; \ |
239 | echo 's,^\(\./\)*apps/,$(prefix)/apps/,g'; \ |
239 | echo 's,^\(\./\)*share/,$(prefix)/share/,g'; \ |
240 | echo 's,^\(\./\)*share/,$(prefix)/share/,g'; \ |
240 | echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \ |
241 | echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \ |
241 | echo 's,^\(\./\)*help/,$(prefix)/help/,g'; \ |
242 | echo 's,^\(\./\)*help/,$(prefix)/help/,g'; \ |
242 | ) > $@ || ( rm -f $@; exit 1 ) |
243 | ) > $@ || ( rm -f $@; exit 1 ) |
243 | |
244 | |
244 | ## general rules ## |
245 | ## general rules ## |
245 | |
246 | |
246 | define descend |
247 | define descend |
247 | $(MAKE) $(if $(QMAKE),QMAKE=$(QMAKE)) -C $(1) $(2) |
248 | $(MAKE) $(if $(QMAKE),QMAKE=$(QMAKE)) -C $(1) $(2) |
248 | endef |
249 | endef |
249 | |
250 | |
250 | define makefilegen |
251 | define makefilegen |
251 | 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$$,,'\`" | \ |
252 | 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$$,,'\`" | \ |
252 | head -1 | awk '{print $$3}'` |
253 | head -1 | awk '{print $$3}'` |
253 | endef |
254 | endef |
254 | |
255 | |
255 | define makecfg |
256 | define makecfg |
256 | $(TOPDIR)/scripts/makecfg.pl $1 $(OPIEDIR) |
257 | $(TOPDIR)/scripts/makecfg.pl $1 $(OPIEDIR) |
257 | endef |
258 | endef |
|