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