author | zecke <zecke> | 2004-04-08 11:20:25 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-08 11:20:25 (UTC) |
commit | 30cd4f984ea142ae4320de5718d58b7cf083befb (patch) (unidiff) | |
tree | f2335257392536c77d018c6653c495a235b0638d /Rules.make | |
parent | 2ab70064958916733daf1b5f095cef562b2e9163 (diff) | |
download | opie-30cd4f984ea142ae4320de5718d58b7cf083befb.zip opie-30cd4f984ea142ae4320de5718d58b7cf083befb.tar.gz opie-30cd4f984ea142ae4320de5718d58b7cf083befb.tar.bz2 |
Write out the LIB and INC Dir for the dependencies into
the .pro
Now the apps can pick it up if they want
-rw-r--r-- | Rules.make | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -1,267 +1,292 @@ | |||
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_QT_QWS_ALLOW_CLOCK),y) | 60 | ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) |
61 | echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ | 61 | echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ |
62 | endif | 62 | endif |
63 | ifeq ($(CONFIG_OPIE_HIGH_RES_SMALL_PHY),y) | 63 | ifeq ($(CONFIG_OPIE_HIGH_RES_SMALL_PHY),y) |
64 | echo DEFINES += OPIE_HIGH_RES_SMALL_PHY >> $@ | 64 | echo DEFINES += OPIE_HIGH_RES_SMALL_PHY >> $@ |
65 | endif | 65 | endif |
66 | ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) | 66 | ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) |
67 | echo DEFINES += OPIE_NEW_MALLOC >> $@ | 67 | echo DEFINES += OPIE_NEW_MALLOC >> $@ |
68 | endif | 68 | endif |
69 | ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) | 69 | ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) |
70 | echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ | 70 | echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ |
71 | endif | 71 | endif |
72 | echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ | 72 | echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ |
73 | ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y) | 73 | ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y) |
74 | echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ | 74 | echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ |
75 | endif | 75 | endif |
76 | # Write LIB dirs and INC dirs... | ||
77 | ifeq ($(CONFIG_LIBETPAN_DEP),y) | ||
78 | echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@ | ||
79 | echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@ | ||
80 | endif | ||
81 | ifeq ($(CONFIG_LIBPCAP_DEP),y) | ||
82 | echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@ | ||
83 | echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@ | ||
84 | endif | ||
85 | ifeq ($(CONFIG_LIBSQLITE_DEP),y) | ||
86 | echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@ | ||
87 | echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@ | ||
88 | endif | ||
89 | ifeq ($(CONFIG_LIBXINE_DEP),y) | ||
90 | echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@ | ||
91 | echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@ | ||
92 | endif | ||
93 | ifeq ($(CONFIG_LIBIPK_DEP),y) | ||
94 | echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@ | ||
95 | echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@ | ||
96 | endif | ||
97 | ifeq ($(CONFIG_LIBSDK_DEP),y) | ||
98 | echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@ | ||
99 | echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@ | ||
100 | endif | ||
76 | $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages | 101 | $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages |
77 | @echo Generating dependency information... | 102 | @echo Generating dependency information... |
78 | # add to subdir-y, and add descend rules | 103 | # add to subdir-y, and add descend rules |
79 | @cat $(TOPDIR)/packages | grep -v '^#' | \ | 104 | @cat $(TOPDIR)/packages | grep -v '^#' | \ |
80 | awk '{print \ | 105 | awk '{print \ |
81 | ".PHONY : " $$2 "\n" \ | 106 | ".PHONY : " $$2 "\n" \ |
82 | "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ | 107 | "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ |
83 | print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends | 108 | print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends |
84 | cat $(TOPDIR)/packages | grep -v '^#' | \ | 109 | cat $(TOPDIR)/packages | grep -v '^#' | \ |
85 | 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"; }' \ | 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"; }' \ |
86 | >> $(TOPDIR)/.depends | 111 | >> $(TOPDIR)/.depends |
87 | # interpackage dependency generation | 112 | # interpackage dependency generation |
88 | @cat $(TOPDIR)/packages | \ | 113 | @cat $(TOPDIR)/packages | \ |
89 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends | 114 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends |
90 | 115 | ||
91 | $(TOPDIR)/.depends.cfgs: | 116 | $(TOPDIR)/.depends.cfgs: |
92 | # config.in interdependencies | 117 | # config.in interdependencies |
93 | @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs | 118 | @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs |
94 | @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 ) >> $@ | 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 ) >> $@ |
95 | @-rm -f dirs | 120 | @-rm -f dirs |
96 | 121 | ||
97 | $(QTDIR)/stamp-headers : | 122 | $(QTDIR)/stamp-headers : |
98 | @-rm -f $(QTDIR)/stamp-headers* | 123 | @-rm -f $(QTDIR)/stamp-headers* |
99 | ( cd $(QTDIR)/include; \ | 124 | ( cd $(QTDIR)/include; \ |
100 | $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ | 125 | $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ |
101 | qcopchannel_qws.h qwindowsystem_qws.h \ | 126 | qcopchannel_qws.h qwindowsystem_qws.h \ |
102 | qfontmanager_qws.h qwsdefaultdecoration_qws.h)) | 127 | qfontmanager_qws.h qwsdefaultdecoration_qws.h)) |
103 | touch $@ | 128 | touch $@ |
104 | 129 | ||
105 | $(QTDIR)/stamp-headers-x11 : | 130 | $(QTDIR)/stamp-headers-x11 : |
106 | @-rm -f $(QTDIR)/stamp-headers* | 131 | @-rm -f $(QTDIR)/stamp-headers* |
107 | 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) | 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) |
108 | touch $@ | 133 | touch $@ |
109 | 134 | ||
110 | $(OPIEDIR)/stamp-headers : | 135 | $(OPIEDIR)/stamp-headers : |
111 | @-rm -f $(OPIEDIR)/stamp-headers* | 136 | @-rm -f $(OPIEDIR)/stamp-headers* |
112 | mkdir -p $(TOPDIR)/include/qpe \ | 137 | mkdir -p $(TOPDIR)/include/qpe \ |
113 | $(TOPDIR)/include/qtopia \ | 138 | $(TOPDIR)/include/qtopia \ |
114 | $(TOPDIR)/include/opie \ | 139 | $(TOPDIR)/include/opie \ |
115 | $(TOPDIR)/include/opie2 \ | 140 | $(TOPDIR)/include/opie2 \ |
116 | $(TOPDIR)/include/qtopia/private \ | 141 | $(TOPDIR)/include/qtopia/private \ |
117 | $(TOPDIR)/include/sl | 142 | $(TOPDIR)/include/sl |
118 | ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) | 143 | ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) |
119 | ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) | 144 | ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) |
120 | ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) | 145 | ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) |
121 | ifeq ($(CONFIG_LIBOPIE),y) | 146 | ifeq ($(CONFIG_LIBOPIE),y) |
122 | # libopie1 | 147 | # libopie1 |
123 | ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) | 148 | ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) |
124 | ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) | 149 | ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) |
125 | ( cd include/opie && ln -sf ../../libopie/big-screen/*.h .; ) | 150 | ( cd include/opie && ln -sf ../../libopie/big-screen/*.h .; ) |
126 | endif | 151 | endif |
127 | # libopie2 | 152 | # libopie2 |
128 | ( cd include/opie2 && ln -sf ../../libopie2/opiecore/*.h .; ) | 153 | ( cd include/opie2 && ln -sf ../../libopie2/opiecore/*.h .; ) |
129 | ( cd include/opie2 && ln -sf ../../libopie2/opiecore/device/*.h .; ) | 154 | ( cd include/opie2 && ln -sf ../../libopie2/opiecore/device/*.h .; ) |
130 | ( cd include/opie2 && ln -sf ../../libopie2/opiemm/*.h .; ) | 155 | ( cd include/opie2 && ln -sf ../../libopie2/opiemm/*.h .; ) |
131 | ( cd include/opie2 && ln -sf ../../libopie2/opiedb/*.h .; ) | 156 | ( cd include/opie2 && ln -sf ../../libopie2/opiedb/*.h .; ) |
132 | ( cd include/opie2 && ln -sf ../../libopie2/opienet/*.h .; ) | 157 | ( cd include/opie2 && ln -sf ../../libopie2/opienet/*.h .; ) |
133 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/*.h .; ) | 158 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/*.h .; ) |
134 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/*.h .; ) | 159 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/*.h .; ) |
135 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/backends/*.h .; ) | 160 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/backends/*.h .; ) |
136 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/ui/*.h .; ) | 161 | ( cd include/opie2 && ln -sf ../../libopie2/opiepim/ui/*.h .; ) |
137 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/*.h .; ) | 162 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/*.h .; ) |
138 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/fileselector/*.h .; ) | 163 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/fileselector/*.h .; ) |
139 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/big-screen/*.h .; ) | 164 | ( cd include/opie2 && ln -sf ../../libopie2/opieui/big-screen/*.h .; ) |
140 | # auxilliary libraries | 165 | # auxilliary libraries |
141 | ( cd include/opie2 && ln -sf ../../libqtaux/*.h .; ) | 166 | ( cd include/opie2 && ln -sf ../../libqtaux/*.h .; ) |
142 | ( cd include/sl && ln -sf ../../libslcompat/*.h .; ) | 167 | ( cd include/sl && ln -sf ../../libslcompat/*.h .; ) |
143 | # all | 168 | # all |
144 | ifeq ($(CONFIG_LIBOPIE),y) | 169 | ifeq ($(CONFIG_LIBOPIE),y) |
145 | ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ | 170 | ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ |
146 | ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done ) | 171 | ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done ) |
147 | endif | 172 | endif |
148 | ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opieui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ | 173 | ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opieui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ |
149 | ln -sf ../../libopie2/opieui/$$generatedHeader $$generatedHeader; done ) | 174 | ln -sf ../../libopie2/opieui/$$generatedHeader $$generatedHeader; done ) |
150 | ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opiepim/ui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ | 175 | ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opiepim/ui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ |
151 | ln -sf ../../libopie2/opiepim/ui/$$generatedHeader $$generatedHeader; done ) | 176 | ln -sf ../../libopie2/opiepim/ui/$$generatedHeader $$generatedHeader; done ) |
152 | ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h | 177 | ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h |
153 | touch $@ | 178 | touch $@ |
154 | 179 | ||
155 | $(OPIEDIR)/stamp-headers-x11 : | 180 | $(OPIEDIR)/stamp-headers-x11 : |
156 | @-rm -f $(OPIEDIR)/stamp-headers* | 181 | @-rm -f $(OPIEDIR)/stamp-headers* |
157 | mkdir -p $(TOPDIR)/include/qpe $(TOPDIR)/include/qtopia \ | 182 | mkdir -p $(TOPDIR)/include/qpe $(TOPDIR)/include/qtopia \ |
158 | $(TOPDIR)/include/opie $(TOPDIR)/include/qtopia/private | 183 | $(TOPDIR)/include/opie $(TOPDIR)/include/qtopia/private |
159 | ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) | 184 | ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) |
160 | ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) | 185 | ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) |
161 | ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) | 186 | ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) |
162 | ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) | 187 | ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) |
163 | ( cd include/opie && ln -sf ../../libsql/*.h .; ) | 188 | ( cd include/opie && ln -sf ../../libsql/*.h .; ) |
164 | ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) | 189 | ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) |
165 | ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ | 190 | ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ |
166 | ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done ) | 191 | ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done ) |
167 | ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h | 192 | ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h |
168 | ( cd include/qpe; ln -sf ../../x11/libqpe-x11/qpe/*.h .; ) | 193 | ( cd include/qpe; ln -sf ../../x11/libqpe-x11/qpe/*.h .; ) |
169 | touch $@ | 194 | touch $@ |
170 | 195 | ||
171 | $(TOPDIR)/library/custom.h : $(TOPDIR)/.config | 196 | $(TOPDIR)/library/custom.h : $(TOPDIR)/.config |
172 | @-rm -f $@ | 197 | @-rm -f $@ |
173 | @$(if $(patsubst "%",%,$(CONFIG_CUSTOMFILE)),\ | 198 | @$(if $(patsubst "%",%,$(CONFIG_CUSTOMFILE)),\ |
174 | ln -sf $(patsubst "%",%,$(CONFIG_CUSTOMFILE)) $@) | 199 | ln -sf $(patsubst "%",%,$(CONFIG_CUSTOMFILE)) $@) |
175 | @touch $@ | 200 | @touch $@ |
176 | 201 | ||
177 | $(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: | 202 | $(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: |
178 | @$(call descend,$(shell dirname $@),$(shell basename $@)) | 203 | @$(call descend,$(shell dirname $@),$(shell basename $@)) |
179 | 204 | ||
180 | menuconfig: $(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf ./config.in | 205 | menuconfig: $(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf ./config.in |
181 | $(TOPDIR)/scripts/kconfig/mconf ./config.in | 206 | $(TOPDIR)/scripts/kconfig/mconf ./config.in |
182 | @touch ./.config.stamp | 207 | @touch ./.config.stamp |
183 | 208 | ||
184 | xconfig: $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in | 209 | xconfig: $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in |
185 | $(TOPDIR)/scripts/kconfig/qconf ./config.in | 210 | $(TOPDIR)/scripts/kconfig/qconf ./config.in |
186 | @touch .config.stamp | 211 | @touch .config.stamp |
187 | 212 | ||
188 | gconfig: $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in | 213 | gconfig: $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in |
189 | $(TOPDIR)/scripts/kconfig/gconf ./config.in | 214 | $(TOPDIR)/scripts/kconfig/gconf ./config.in |
190 | @touch .config.stamp | 215 | @touch .config.stamp |
191 | 216 | ||
192 | config: $(TOPDIR)/scripts/kconfig/conf ./config.in | 217 | config: $(TOPDIR)/scripts/kconfig/conf ./config.in |
193 | $(TOPDIR)/scripts/kconfig/conf ./config.in | 218 | $(TOPDIR)/scripts/kconfig/conf ./config.in |
194 | @touch .config.stamp | 219 | @touch .config.stamp |
195 | 220 | ||
196 | oldconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in | 221 | oldconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
197 | $(TOPDIR)/scripts/kconfig/conf -o ./config.in | 222 | $(TOPDIR)/scripts/kconfig/conf -o ./config.in |
198 | @touch .config.stamp | 223 | @touch .config.stamp |
199 | 224 | ||
200 | randconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in | 225 | randconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
201 | $(TOPDIR)/scripts/kconfig/conf -r ./config.in | 226 | $(TOPDIR)/scripts/kconfig/conf -r ./config.in |
202 | @touch .config.stamp | 227 | @touch .config.stamp |
203 | 228 | ||
204 | allyesconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in | 229 | allyesconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
205 | $(TOPDIR)/scripts/kconfig/conf -y ./config.in | 230 | $(TOPDIR)/scripts/kconfig/conf -y ./config.in |
206 | @touch .config.stamp | 231 | @touch .config.stamp |
207 | 232 | ||
208 | allnoconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in | 233 | allnoconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
209 | $(TOPDIR)/scripts/kconfig/conf -n ./config.in | 234 | $(TOPDIR)/scripts/kconfig/conf -n ./config.in |
210 | @touch .config.stamp | 235 | @touch .config.stamp |
211 | 236 | ||
212 | defconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in | 237 | defconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in |
213 | $(TOPDIR)/scripts/kconfig/conf -d ./config.in | 238 | $(TOPDIR)/scripts/kconfig/conf -d ./config.in |
214 | @touch .config.stamp | 239 | @touch .config.stamp |
215 | 240 | ||
216 | $(TOPDIR)/qmake/qmake : $(TOPDIR)/mkspecs/default | 241 | $(TOPDIR)/qmake/qmake : $(TOPDIR)/mkspecs/default |
217 | 242 | ||
218 | $(TOPDIR)/mkspecs/default : | 243 | $(TOPDIR)/mkspecs/default : |
219 | ln -sf linux-g++ $@ | 244 | ln -sf linux-g++ $@ |
220 | 245 | ||
221 | $(TOPDIR)/scripts/subst : force | 246 | $(TOPDIR)/scripts/subst : force |
222 | @( \ | 247 | @( \ |
223 | echo 's,\$$QPE_VERSION,$(QPE_VERSION),g'; \ | 248 | echo 's,\$$QPE_VERSION,$(QPE_VERSION),g'; \ |
224 | echo 's,\$$OPIE_VERSION,$(OPIE_VERSION),g'; \ | 249 | echo 's,\$$OPIE_VERSION,$(OPIE_VERSION),g'; \ |
225 | echo 's,\$$QTE_VERSION,$(QTE_VERSION),g'; \ | 250 | echo 's,\$$QTE_VERSION,$(QTE_VERSION),g'; \ |
226 | echo 's,\$$QTE_REVISION,$(QTE_REVISION),g'; \ | 251 | echo 's,\$$QTE_REVISION,$(QTE_REVISION),g'; \ |
227 | echo 's,\$$SUB_VERSION,$(SUB_VERSION),g'; \ | 252 | echo 's,\$$SUB_VERSION,$(SUB_VERSION),g'; \ |
228 | echo 's,\$$EXTRAVERSION,$(EXTRAVERSION),g'; \ | 253 | echo 's,\$$EXTRAVERSION,$(EXTRAVERSION),g'; \ |
229 | echo 's,\$$QTE_BASEVERSION,$(QTE_BASEVERSION),g'; \ | 254 | echo 's,\$$QTE_BASEVERSION,$(QTE_BASEVERSION),g'; \ |
230 | ) > $@ || ( rm -f $@; exit 1 ) | 255 | ) > $@ || ( rm -f $@; exit 1 ) |
231 | 256 | ||
232 | $(TOPDIR)/scripts/filesubst : force | 257 | $(TOPDIR)/scripts/filesubst : force |
233 | @( \ | 258 | @( \ |
234 | echo 's,\$$OPIEDIR/root/,/,g'; \ | 259 | echo 's,\$$OPIEDIR/root/,/,g'; \ |
235 | echo 's,$(OPIEDIR)/root/,/,g'; \ | 260 | echo 's,$(OPIEDIR)/root/,/,g'; \ |
236 | echo 's,\$$OPIEDIR,$(prefix),g'; \ | 261 | echo 's,\$$OPIEDIR,$(prefix),g'; \ |
237 | echo 's,$(OPIEDIR),$(prefix),g'; \ | 262 | echo 's,$(OPIEDIR),$(prefix),g'; \ |
238 | echo 's,\$$QTDIR,$(prefix),g'; \ | 263 | echo 's,\$$QTDIR,$(prefix),g'; \ |
239 | echo 's,$(QTDIR),$(prefix),g'; \ | 264 | echo 's,$(QTDIR),$(prefix),g'; \ |
240 | echo 's,^\(\./\)*root/,/,g'; \ | 265 | echo 's,^\(\./\)*root/,/,g'; \ |
241 | echo 's,^\(\./\)*etc/,$(prefix)/etc/,g'; \ | 266 | echo 's,^\(\./\)*etc/,$(prefix)/etc/,g'; \ |
242 | echo 's,^\(\./\)*lib/,$(prefix)/lib/,g'; \ | 267 | echo 's,^\(\./\)*lib/,$(prefix)/lib/,g'; \ |
243 | echo 's,^\(\./\)*bin/,$(prefix)/bin/,g'; \ | 268 | echo 's,^\(\./\)*bin/,$(prefix)/bin/,g'; \ |
244 | echo 's,^\(\./\)*pics/,$(prefix)/pics/,g'; \ | 269 | echo 's,^\(\./\)*pics/,$(prefix)/pics/,g'; \ |
245 | echo 's,^\(\./\)*sounds/,$(prefix)/sounds/,g'; \ | 270 | echo 's,^\(\./\)*sounds/,$(prefix)/sounds/,g'; \ |
246 | echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \ | 271 | echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \ |
247 | echo 's,^\(\./\)*plugins/,$(prefix)/plugins/,g'; \ | 272 | echo 's,^\(\./\)*plugins/,$(prefix)/plugins/,g'; \ |
248 | echo 's,^\(\./\)*apps/,$(prefix)/apps/,g'; \ | 273 | echo 's,^\(\./\)*apps/,$(prefix)/apps/,g'; \ |
249 | echo 's,^\(\./\)*share/,$(prefix)/share/,g'; \ | 274 | echo 's,^\(\./\)*share/,$(prefix)/share/,g'; \ |
250 | echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \ | 275 | echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \ |
251 | echo 's,^\(\./\)*help/,$(prefix)/help/,g'; \ | 276 | echo 's,^\(\./\)*help/,$(prefix)/help/,g'; \ |
252 | ) > $@ || ( rm -f $@; exit 1 ) | 277 | ) > $@ || ( rm -f $@; exit 1 ) |
253 | 278 | ||
254 | ## general rules ## | 279 | ## general rules ## |
255 | 280 | ||
256 | define descend | 281 | define descend |
257 | $(MAKE) $(if $(QMAKE),QMAKE=$(QMAKE)) -C $(1) $(2) | 282 | $(MAKE) $(if $(QMAKE),QMAKE=$(QMAKE)) -C $(1) $(2) |
258 | endef | 283 | endef |
259 | 284 | ||
260 | define makefilegen | 285 | define makefilegen |
261 | 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$$,,'\`" | \ | 286 | 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$$,,'\`" | \ |
262 | head -1 | awk '{print $$3}'` | 287 | head -1 | awk '{print $$3}'` |
263 | endef | 288 | endef |
264 | 289 | ||
265 | define makecfg | 290 | define makecfg |
266 | $(TOPDIR)/scripts/makecfg.pl $1 $(OPIEDIR) | 291 | $(TOPDIR)/scripts/makecfg.pl $1 $(OPIEDIR) |
267 | endef | 292 | endef |