|
|
|
@@ -1,128 +1,131 @@ |
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 | ifeq ($(CONFIG_STATIC),y) |
| |
26 | echo CONFIG += staticlib >> $@ |
| |
27 | endif |
26 | ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3 |
28 | ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3 |
27 | echo CONFIG -= qt3 >> $@ |
29 | echo CONFIG -= qt3 >> $@ |
28 | else |
30 | else |
29 | echo CONFIG += qt3 >> $@ |
31 | echo CONFIG += qt3 >> $@ |
30 | endif |
32 | endif |
31 | ifneq ($(CONFIG_QUICK_LAUNCH),) |
33 | ifneq ($(CONFIG_QUICK_LAUNCH),) |
32 | echo contains\( CONFIG, quick-app \) \{ >> $@ |
34 | echo contains\( CONFIG, quick-app \) \{ >> $@ |
| |
35 | echo CONFIG -= staticlib >> $@ |
33 | echo CONFIG -= quick-app >> $@ |
36 | echo CONFIG -= quick-app >> $@ |
34 | echo CONFIG += quick-app-lib >> $@ |
37 | echo CONFIG += quick-app-lib >> $@ |
35 | echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@ |
38 | echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@ |
36 | echo \} >> $@ |
39 | echo \} >> $@ |
37 | else |
40 | else |
38 | echo contains\( CONFIG, quick-app \) \{ >> $@ |
41 | echo contains\( CONFIG, quick-app \) \{ >> $@ |
39 | echo CONFIG -= quick-app >> $@ |
42 | echo CONFIG -= quick-app >> $@ |
40 | echo CONFIG += quick-app-bin >> $@ |
43 | echo CONFIG += quick-app-bin >> $@ |
41 | echo \} >> $@ |
44 | echo \} >> $@ |
42 | endif |
45 | endif |
43 | ifeq ($(CONFIG_SQL_PIM_BACKEND),y) |
46 | ifeq ($(CONFIG_SQL_PIM_BACKEND),y) |
44 | echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@ |
47 | echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@ |
45 | else |
48 | else |
46 | echo ENABLE_SQL_PIM_BACKEND=n >> $@ |
49 | echo ENABLE_SQL_PIM_BACKEND=n >> $@ |
47 | endif |
50 | endif |
48 | ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y) |
51 | ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y) |
49 | echo CONFIG += no-override >> $@ |
52 | echo CONFIG += no-override >> $@ |
50 | endif |
53 | endif |
51 | ifeq ($(CONFIG_OPIE_NO_ERASERECT_FIX),y) |
54 | ifeq ($(CONFIG_OPIE_NO_ERASERECT_FIX),y) |
52 | echo DEFINES += OPIE_NO_ERASE_RECT_HACKFIX >> $@ |
55 | echo DEFINES += OPIE_NO_ERASE_RECT_HACKFIX >> $@ |
53 | endif |
56 | endif |
54 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) |
57 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) |
55 | echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ |
58 | echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ |
56 | endif |
59 | endif |
57 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) |
60 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) |
58 | echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ |
61 | echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ |
59 | endif |
62 | endif |
60 | ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) |
63 | ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) |
61 | echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ |
64 | echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ |
62 | endif |
65 | endif |
63 | ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y) |
66 | ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y) |
64 | echo DEFINES += USE_FILE_NOTIFICATION >> $@ |
67 | echo DEFINES += USE_FILE_NOTIFICATION >> $@ |
65 | endif |
68 | endif |
66 | ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) |
69 | ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) |
67 | echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ |
70 | echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ |
68 | endif |
71 | endif |
69 | ifeq ($(CONFIG_OPIE_HIGH_RES_SMALL_PHY),y) |
72 | ifeq ($(CONFIG_OPIE_HIGH_RES_SMALL_PHY),y) |
70 | echo DEFINES += OPIE_HIGH_RES_SMALL_PHY >> $@ |
73 | echo DEFINES += OPIE_HIGH_RES_SMALL_PHY >> $@ |
71 | endif |
74 | endif |
72 | ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) |
75 | ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) |
73 | echo DEFINES += OPIE_NEW_MALLOC >> $@ |
76 | echo DEFINES += OPIE_NEW_MALLOC >> $@ |
74 | endif |
77 | endif |
75 | ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) |
78 | ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) |
76 | echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ |
79 | echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ |
77 | endif |
80 | endif |
78 | echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ |
81 | echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ |
79 | ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y) |
82 | ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y) |
80 | echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ |
83 | echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ |
81 | endif |
84 | endif |
82 | # Write LIB dirs and INC dirs... |
85 | # Write LIB dirs and INC dirs... |
83 | ifeq ($(CONFIG_LIBETPAN_DEP),y) |
86 | ifeq ($(CONFIG_LIBETPAN_DEP),y) |
84 | echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@ |
87 | echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@ |
85 | echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@ |
88 | echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@ |
86 | endif |
89 | endif |
87 | ifeq ($(CONFIG_LIBPCAP_DEP),y) |
90 | ifeq ($(CONFIG_LIBPCAP_DEP),y) |
88 | echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@ |
91 | echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@ |
89 | echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@ |
92 | echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@ |
90 | endif |
93 | endif |
91 | ifeq ($(CONFIG_LIBSQLITE_DEP),y) |
94 | ifeq ($(CONFIG_LIBSQLITE_DEP),y) |
92 | echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@ |
95 | echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@ |
93 | echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@ |
96 | echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@ |
94 | endif |
97 | endif |
95 | ifeq ($(CONFIG_LIBXINE_DEP),y) |
98 | ifeq ($(CONFIG_LIBXINE_DEP),y) |
96 | echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@ |
99 | echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@ |
97 | echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@ |
100 | echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@ |
98 | endif |
101 | endif |
99 | ifeq ($(CONFIG_LIBIPK_DEP),y) |
102 | ifeq ($(CONFIG_LIBIPK_DEP),y) |
100 | echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@ |
103 | echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@ |
101 | echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@ |
104 | echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@ |
102 | endif |
105 | endif |
103 | ifeq ($(CONFIG_LIBSDK_DEP),y) |
106 | ifeq ($(CONFIG_LIBSDK_DEP),y) |
104 | echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@ |
107 | echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@ |
105 | echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@ |
108 | echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@ |
106 | endif |
109 | endif |
107 | ifeq ($(CONFIG_LIBSWORD_DEP),y) |
110 | ifeq ($(CONFIG_LIBSWORD_DEP),y) |
108 | echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@ |
111 | echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@ |
109 | echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@ |
112 | echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@ |
110 | endif |
113 | endif |
111 | $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages |
114 | $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages |
112 | @echo Generating dependency information... |
115 | @echo Generating dependency information... |
113 | # add to subdir-y, and add descend rules |
116 | # add to subdir-y, and add descend rules |
114 | @cat $(TOPDIR)/packages | grep -v '^#' | \ |
117 | @cat $(TOPDIR)/packages | grep -v '^#' | \ |
115 | awk '{print \ |
118 | awk '{print \ |
116 | ".PHONY : " $$2 "\n" \ |
119 | ".PHONY : " $$2 "\n" \ |
117 | "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ |
120 | "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ |
118 | print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends |
121 | print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends |
119 | cat $(TOPDIR)/packages | grep -v '^#' | \ |
122 | cat $(TOPDIR)/packages | grep -v '^#' | \ |
120 | 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"; }' \ |
123 | 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"; }' \ |
121 | >> $(TOPDIR)/.depends |
124 | >> $(TOPDIR)/.depends |
122 | # interpackage dependency generation |
125 | # interpackage dependency generation |
123 | @cat $(TOPDIR)/packages | \ |
126 | @cat $(TOPDIR)/packages | \ |
124 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends |
127 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends |
125 | |
128 | |
126 | $(TOPDIR)/.depends.cfgs: |
129 | $(TOPDIR)/.depends.cfgs: |
127 | # config.in interdependencies |
130 | # config.in interdependencies |
128 | @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs |
131 | @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs |
|