|
|
|
@@ -1,155 +1,158 @@ |
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 | ifneq ($(CONFIG_DEBUG),) |
15 | ifneq ($(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 >> $@ |
20 | else |
20 | else |
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" >> $@ |
24 | endif |
24 | endif |
25 | |
25 | |
26 | ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3 |
26 | ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3 |
27 | echo CONFIG -= qt3 >> $@ |
27 | echo CONFIG -= qt3 >> $@ |
28 | else |
28 | else |
29 | echo CONFIG += qt3 >> $@ |
29 | echo CONFIG += qt3 >> $@ |
30 | endif |
30 | endif |
31 | ifneq ($(CONFIG_QUICK_LAUNCH),) |
31 | ifneq ($(CONFIG_QUICK_LAUNCH),) |
32 | echo contains\( CONFIG, quick-app \) \{ >> $@ |
32 | echo contains\( CONFIG, quick-app \) \{ >> $@ |
33 | echo CONFIG -= quick-app >> $@ |
33 | echo CONFIG -= quick-app >> $@ |
34 | echo CONFIG += quick-app-lib >> $@ |
34 | echo CONFIG += quick-app-lib >> $@ |
35 | echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@ |
35 | echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@ |
36 | echo \} >> $@ |
36 | echo \} >> $@ |
37 | else |
37 | else |
38 | echo contains\( CONFIG, quick-app \) \{ >> $@ |
38 | echo contains\( CONFIG, quick-app \) \{ >> $@ |
39 | echo CONFIG -= quick-app >> $@ |
39 | echo CONFIG -= quick-app >> $@ |
40 | echo CONFIG += quick-app-bin >> $@ |
40 | echo CONFIG += quick-app-bin >> $@ |
41 | echo \} >> $@ |
41 | echo \} >> $@ |
42 | endif |
42 | endif |
43 | ifeq ($(CONFIG_SQL_PIM_BACKEND),y) |
43 | ifeq ($(CONFIG_SQL_PIM_BACKEND),y) |
44 | echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@ |
44 | echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@ |
45 | else |
45 | else |
46 | echo ENABLE_SQL_PIM_BACKEND=n >> $@ |
46 | echo ENABLE_SQL_PIM_BACKEND=n >> $@ |
47 | endif |
47 | endif |
48 | ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y) |
48 | ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y) |
49 | echo CONFIG += no-override >> $@ |
49 | echo CONFIG += no-override >> $@ |
50 | endif |
50 | endif |
51 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) |
51 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) |
52 | echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ |
52 | echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ |
53 | endif |
53 | endif |
54 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) |
54 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) |
55 | echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ |
55 | echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ |
56 | endif |
56 | endif |
57 | ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) |
57 | ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) |
58 | echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ |
58 | echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ |
59 | endif |
59 | endif |
| |
60 | ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y) |
| |
61 | echo DEFINES += USE_FILE_NOTIFICATION >> $@ |
| |
62 | endif |
60 | ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) |
63 | ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) |
61 | echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ |
64 | echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ |
62 | endif |
65 | endif |
63 | ifeq ($(CONFIG_OPIE_HIGH_RES_SMALL_PHY),y) |
66 | ifeq ($(CONFIG_OPIE_HIGH_RES_SMALL_PHY),y) |
64 | echo DEFINES += OPIE_HIGH_RES_SMALL_PHY >> $@ |
67 | echo DEFINES += OPIE_HIGH_RES_SMALL_PHY >> $@ |
65 | endif |
68 | endif |
66 | ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) |
69 | ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) |
67 | echo DEFINES += OPIE_NEW_MALLOC >> $@ |
70 | echo DEFINES += OPIE_NEW_MALLOC >> $@ |
68 | endif |
71 | endif |
69 | ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) |
72 | ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) |
70 | echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ |
73 | echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ |
71 | endif |
74 | endif |
72 | echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ |
75 | echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ |
73 | ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y) |
76 | ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y) |
74 | echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ |
77 | echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ |
75 | endif |
78 | endif |
76 | # Write LIB dirs and INC dirs... |
79 | # Write LIB dirs and INC dirs... |
77 | ifeq ($(CONFIG_LIBETPAN_DEP),y) |
80 | ifeq ($(CONFIG_LIBETPAN_DEP),y) |
78 | echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@ |
81 | echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@ |
79 | echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@ |
82 | echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@ |
80 | endif |
83 | endif |
81 | ifeq ($(CONFIG_LIBPCAP_DEP),y) |
84 | ifeq ($(CONFIG_LIBPCAP_DEP),y) |
82 | echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@ |
85 | echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@ |
83 | echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@ |
86 | echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@ |
84 | endif |
87 | endif |
85 | ifeq ($(CONFIG_LIBSQLITE_DEP),y) |
88 | ifeq ($(CONFIG_LIBSQLITE_DEP),y) |
86 | echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@ |
89 | echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@ |
87 | echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@ |
90 | echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@ |
88 | endif |
91 | endif |
89 | ifeq ($(CONFIG_LIBXINE_DEP),y) |
92 | ifeq ($(CONFIG_LIBXINE_DEP),y) |
90 | echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@ |
93 | echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@ |
91 | echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@ |
94 | echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@ |
92 | endif |
95 | endif |
93 | ifeq ($(CONFIG_LIBIPK_DEP),y) |
96 | ifeq ($(CONFIG_LIBIPK_DEP),y) |
94 | echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@ |
97 | echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@ |
95 | echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@ |
98 | echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@ |
96 | endif |
99 | endif |
97 | ifeq ($(CONFIG_LIBSDK_DEP),y) |
100 | ifeq ($(CONFIG_LIBSDK_DEP),y) |
98 | echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@ |
101 | echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@ |
99 | echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@ |
102 | echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@ |
100 | endif |
103 | endif |
101 | $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages |
104 | $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages |
102 | @echo Generating dependency information... |
105 | @echo Generating dependency information... |
103 | # add to subdir-y, and add descend rules |
106 | # add to subdir-y, and add descend rules |
104 | @cat $(TOPDIR)/packages | grep -v '^#' | \ |
107 | @cat $(TOPDIR)/packages | grep -v '^#' | \ |
105 | awk '{print \ |
108 | awk '{print \ |
106 | ".PHONY : " $$2 "\n" \ |
109 | ".PHONY : " $$2 "\n" \ |
107 | "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ |
110 | "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ |
108 | print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends |
111 | print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends |
109 | cat $(TOPDIR)/packages | grep -v '^#' | \ |
112 | cat $(TOPDIR)/packages | grep -v '^#' | \ |
110 | 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"; }' \ |
113 | 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"; }' \ |
111 | >> $(TOPDIR)/.depends |
114 | >> $(TOPDIR)/.depends |
112 | # interpackage dependency generation |
115 | # interpackage dependency generation |
113 | @cat $(TOPDIR)/packages | \ |
116 | @cat $(TOPDIR)/packages | \ |
114 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends |
117 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends |
115 | |
118 | |
116 | $(TOPDIR)/.depends.cfgs: |
119 | $(TOPDIR)/.depends.cfgs: |
117 | # config.in interdependencies |
120 | # config.in interdependencies |
118 | @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs |
121 | @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs |
119 | @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 ) >> $@ |
122 | @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 ) >> $@ |
120 | @-rm -f dirs |
123 | @-rm -f dirs |
121 | |
124 | |
122 | $(QTDIR)/stamp-headers : |
125 | $(QTDIR)/stamp-headers : |
123 | @-rm -f $(QTDIR)/stamp-headers* |
126 | @-rm -f $(QTDIR)/stamp-headers* |
124 | ( cd $(QTDIR)/include; \ |
127 | ( cd $(QTDIR)/include; \ |
125 | $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ |
128 | $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ |
126 | qcopchannel_qws.h qwindowsystem_qws.h \ |
129 | qcopchannel_qws.h qwindowsystem_qws.h \ |
127 | qfontmanager_qws.h qwsdefaultdecoration_qws.h)) |
130 | qfontmanager_qws.h qwsdefaultdecoration_qws.h)) |
128 | touch $@ |
131 | touch $@ |
129 | |
132 | |
130 | $(QTDIR)/stamp-headers-x11 : |
133 | $(QTDIR)/stamp-headers-x11 : |
131 | @-rm -f $(QTDIR)/stamp-headers* |
134 | @-rm -f $(QTDIR)/stamp-headers* |
132 | 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) |
135 | 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) |
133 | touch $@ |
136 | touch $@ |
134 | |
137 | |
135 | $(OPIEDIR)/stamp-headers : |
138 | $(OPIEDIR)/stamp-headers : |
136 | @-rm -f $(OPIEDIR)/stamp-headers* |
139 | @-rm -f $(OPIEDIR)/stamp-headers* |
137 | mkdir -p $(TOPDIR)/include/qpe \ |
140 | mkdir -p $(TOPDIR)/include/qpe \ |
138 | $(TOPDIR)/include/qtopia \ |
141 | $(TOPDIR)/include/qtopia \ |
139 | $(TOPDIR)/include/opie \ |
142 | $(TOPDIR)/include/opie \ |
140 | $(TOPDIR)/include/opie2 \ |
143 | $(TOPDIR)/include/opie2 \ |
141 | $(TOPDIR)/include/qtopia/private \ |
144 | $(TOPDIR)/include/qtopia/private \ |
142 | $(TOPDIR)/include/sl |
145 | $(TOPDIR)/include/sl |
143 | ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) |
146 | ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) |
144 | ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) |
147 | ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) |
145 | ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) |
148 | ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) |
146 | ifeq ($(CONFIG_LIBOPIE),y) |
149 | ifeq ($(CONFIG_LIBOPIE),y) |
147 | # libopie1 |
150 | # libopie1 |
148 | ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) |
151 | ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) |
149 | ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) |
152 | ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) |
150 | ( cd include/opie && ln -sf ../../libopie/big-screen/*.h .; ) |
153 | ( cd include/opie && ln -sf ../../libopie/big-screen/*.h .; ) |
151 | endif |
154 | endif |
152 | # libopie2 |
155 | # libopie2 |
153 | ( cd include/opie2 && ln -sf ../../libopie2/opiecore/*.h .; ) |
156 | ( cd include/opie2 && ln -sf ../../libopie2/opiecore/*.h .; ) |
154 | ( cd include/opie2 && ln -sf ../../libopie2/opiecore/device/*.h .; ) |
157 | ( cd include/opie2 && ln -sf ../../libopie2/opiecore/device/*.h .; ) |
155 | ( cd include/opie2 && ln -sf ../../libopie2/opiemm/*.h .; ) |
158 | ( cd include/opie2 && ln -sf ../../libopie2/opiemm/*.h .; ) |
|