|
|
|
@@ -1,164 +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 | # 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) |
| |
58 | echo CONFIG += no-override >> $@ |
| |
59 | endif |
| |
60 | ifeq ($(CONFIG_OPIELOGIN_USEPAM),y) |
57 | ifeq ($(CONFIG_OPIELOGIN_USEPAM),y) |
61 | echo CONFIG += OPIELOGIN_USEPAM >> $@ |
58 | echo CONFIG += OPIELOGIN_USEPAM >> $@ |
62 | endif |
59 | endif |
63 | ifeq ($(CONFIG_LIBQPE_WITHROHFEEDBACK),y) |
60 | ifeq ($(CONFIG_LIBQPE_WITHROHFEEDBACK),y) |
64 | echo CONFIG += LIBQPE_WITHROHFEEDBACK >> $@ |
61 | echo CONFIG += LIBQPE_WITHROHFEEDBACK >> $@ |
65 | endif |
62 | endif |
66 | ifeq ($(CONFIG_OPIE_NO_ERASERECT_FIX),y) |
| |
67 | echo DEFINES += OPIE_NO_ERASE_RECT_HACKFIX >> $@ |
| |
68 | endif |
| |
69 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) |
63 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) |
70 | echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ |
64 | echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ |
71 | endif |
65 | endif |
72 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) |
66 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) |
73 | echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ |
67 | echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ |
74 | endif |
68 | endif |
75 | ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) |
69 | ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) |
76 | echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ |
70 | echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ |
77 | endif |
71 | endif |
78 | ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y) |
72 | ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y) |
79 | echo DEFINES += USE_FILE_NOTIFICATION >> $@ |
73 | echo DEFINES += USE_FILE_NOTIFICATION >> $@ |
80 | endif |
74 | endif |
81 | ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) |
75 | ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) |
82 | echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ |
76 | echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ |
83 | endif |
77 | endif |
84 | ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) |
78 | ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) |
85 | echo DEFINES += OPIE_NEW_MALLOC >> $@ |
79 | echo DEFINES += OPIE_NEW_MALLOC >> $@ |
86 | endif |
80 | endif |
87 | ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) |
81 | ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) |
88 | echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ |
82 | echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ |
89 | endif |
83 | endif |
90 | echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ |
84 | echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ |
91 | ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y) |
85 | ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y) |
92 | echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ |
86 | echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ |
93 | endif |
87 | endif |
94 | ifeq ($(CONFIG_OPIE_TASKBAR_LOCK_KEY_STATE),y) |
88 | ifeq ($(CONFIG_OPIE_TASKBAR_LOCK_KEY_STATE),y) |
95 | echo DEFINES += OPIE_TASKBAR_LOCK_KEY_STATE >> $@ |
89 | echo DEFINES += OPIE_TASKBAR_LOCK_KEY_STATE >> $@ |
96 | endif |
90 | endif |
97 | # Write LIB dirs and INC dirs... |
91 | # Write LIB dirs and INC dirs... |
98 | ifeq ($(CONFIG_LIBETPAN_DEP),y) |
92 | ifeq ($(CONFIG_LIBETPAN_DEP),y) |
99 | echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@ |
93 | echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@ |
100 | echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@ |
94 | echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@ |
101 | endif |
95 | endif |
102 | ifeq ($(CONFIG_LIBPCAP_DEP),y) |
96 | ifeq ($(CONFIG_LIBPCAP_DEP),y) |
103 | echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@ |
97 | echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@ |
104 | echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@ |
98 | echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@ |
105 | endif |
99 | endif |
106 | ifeq ($(CONFIG_LIBSQLITE_DEP),y) |
100 | ifeq ($(CONFIG_LIBSQLITE_DEP),y) |
107 | echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@ |
101 | echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@ |
108 | echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@ |
102 | echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@ |
109 | endif |
103 | endif |
110 | ifeq ($(CONFIG_LIBXINE_DEP),y) |
104 | ifeq ($(CONFIG_LIBXINE_DEP),y) |
111 | echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@ |
105 | echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@ |
112 | echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@ |
106 | echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@ |
113 | endif |
107 | endif |
114 | ifeq ($(CONFIG_LIBBLUEZ_DEP),y) |
108 | ifeq ($(CONFIG_LIBBLUEZ_DEP),y) |
115 | echo LIBBLUEZ_LIB_DIR = $(CONFIG_LIBBLUEZ_LIB_DIR) >> $@ |
109 | echo LIBBLUEZ_LIB_DIR = $(CONFIG_LIBBLUEZ_LIB_DIR) >> $@ |
116 | echo LIBBLUEZ_INC_DIR = $(CONFIG_LIBBLUEZ_INC_DIR) >> $@ |
110 | echo LIBBLUEZ_INC_DIR = $(CONFIG_LIBBLUEZ_INC_DIR) >> $@ |
117 | endif |
111 | endif |
118 | ifeq ($(CONFIG_LIBIPK_DEP),y) |
112 | ifeq ($(CONFIG_LIBIPK_DEP),y) |
119 | echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@ |
113 | echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@ |
120 | echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@ |
114 | echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@ |
121 | endif |
115 | endif |
122 | ifeq ($(CONFIG_LIBSDK_DEP),y) |
116 | ifeq ($(CONFIG_LIBSDK_DEP),y) |
123 | echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@ |
117 | echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@ |
124 | echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@ |
118 | echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@ |
125 | endif |
119 | endif |
126 | ifeq ($(CONFIG_LIBSWORD_DEP),y) |
120 | ifeq ($(CONFIG_LIBSWORD_DEP),y) |
127 | echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@ |
121 | echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@ |
128 | echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@ |
122 | echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@ |
129 | endif |
123 | endif |
130 | ifeq ($(CONFIG_LIBFREETYPE2_DEP),y) |
124 | ifeq ($(CONFIG_LIBFREETYPE2_DEP),y) |
131 | echo LIBFREETYPE2_INC_DIR = $(CONFIG_LIBFREETYPE2_INC_DIR) >> $@ |
125 | echo LIBFREETYPE2_INC_DIR = $(CONFIG_LIBFREETYPE2_INC_DIR) >> $@ |
132 | endif |
126 | endif |
133 | $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages |
127 | $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages |
134 | @echo Generating dependency information... |
128 | @echo Generating dependency information... |
135 | # add to subdir-y, and add descend rules |
129 | # add to subdir-y, and add descend rules |
136 | @cat $(TOPDIR)/packages | grep -v '^#' | \ |
130 | @cat $(TOPDIR)/packages | grep -v '^#' | \ |
137 | awk '{print \ |
131 | awk '{print \ |
138 | ".PHONY : " $$2 "\n" \ |
132 | ".PHONY : " $$2 "\n" \ |
139 | "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ |
133 | "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ |
140 | print $$2 " : " $$2 "/Makefile\n\t+$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends |
134 | print $$2 " : " $$2 "/Makefile\n\t+$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends |
141 | cat $(TOPDIR)/packages | grep -v '^#' | \ |
135 | cat $(TOPDIR)/packages | grep -v '^#' | \ |
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"; }' \ |
136 | 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"; }' \ |
143 | >> $(TOPDIR)/.depends |
137 | >> $(TOPDIR)/.depends |
144 | # interpackage dependency generation |
138 | # interpackage dependency generation |
145 | @cat $(TOPDIR)/packages | \ |
139 | @cat $(TOPDIR)/packages | \ |
146 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends |
140 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends |
147 | |
141 | |
148 | $(TOPDIR)/.depends.cfgs: |
142 | $(TOPDIR)/.depends.cfgs: |
149 | # config.in interdependencies |
143 | # config.in interdependencies |
150 | @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs |
144 | @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs |
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 ) >> $@ |
145 | @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 ) >> $@ |
152 | @-rm -f dirs |
146 | @-rm -f dirs |
153 | |
147 | |
154 | $(QTDIR)/stamp-headers : |
148 | $(QTDIR)/stamp-headers : |
155 | @-rm -f $(QTDIR)/stamp-headers* |
149 | @-rm -f $(QTDIR)/stamp-headers* |
156 | ( cd $(QTDIR)/include; \ |
150 | ( cd $(QTDIR)/include; \ |
157 | $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ |
151 | $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ |
158 | qcopchannel_qws.h qwindowsystem_qws.h \ |
152 | qcopchannel_qws.h qwindowsystem_qws.h \ |
159 | qfontmanager_qws.h qwsdefaultdecoration_qws.h)) |
153 | qfontmanager_qws.h qwsdefaultdecoration_qws.h)) |
160 | touch $@ |
154 | touch $@ |
161 | |
155 | |
162 | $(QTDIR)/stamp-headers-x11 : |
156 | $(QTDIR)/stamp-headers-x11 : |
163 | @-rm -f $(QTDIR)/stamp-headers* |
157 | @-rm -f $(QTDIR)/stamp-headers* |
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) |
158 | 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) |
|