author | zecke <zecke> | 2002-06-21 11:18:31 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-21 11:18:31 (UTC) |
commit | 3be39e6c8af27a43d4b09bf08b4c739c342b5de3 (patch) (unidiff) | |
tree | d543a53a003ac69ac38f365ffd2a67499e3fa3d5 | |
parent | da8fdc855382e3b6e945aa1aeb429e5737e0792d (diff) | |
download | opie-3be39e6c8af27a43d4b09bf08b4c739c342b5de3.zip opie-3be39e6c8af27a43d4b09bf08b4c739c342b5de3.tar.gz opie-3be39e6c8af27a43d4b09bf08b4c739c342b5de3.tar.bz2 |
fix the makefile
-rw-r--r-- | Makefile | 78 | ||||
-rwxr-xr-x | configure | 2 |
2 files changed, 44 insertions, 36 deletions
@@ -1,83 +1,91 @@ | |||
1 | default: dynamic | 1 | indefault: dynamic |
2 | 2 | ||
3 | all: default docs | 3 | all: default docs |
4 | 4 | ||
5 | LIBS=library libopie | 5 | LIBS=library libopie |
6 | 6 | ||
7 | COMPONENTS=$(LOCALCOMPONENTS) inputmethods/keyboard \ | 7 | COMPONENTS=$(LOCALCOMPONENTS) inputmethods/keyboard \ |
8 | inputmethods/pickboard \ | 8 | inputmethods/pickboard \ |
9 | inputmethods/handwriting \ | 9 | inputmethods/handwriting \ |
10 | inputmethods/unikeyboard \ | 10 | inputmethods/unikeyboard \ |
11 | inputmethods/jumpx \ | 11 | inputmethods/jumpx \ |
12 | inputmethods/kjumpx \ | 12 | inputmethods/kjumpx \ |
13 | inputmethods/dvorak \ | 13 | inputmethods/dvorak \ |
14 | launcher/batteryapplet \ | 14 | core/applets/batteryapplet \ |
15 | launcher/batteryapplet-ipaq \ | 15 | core/applets/batteryapplet-ipaq \ |
16 | launcher/irdaapplet \ | 16 | core/applets/irdaapplet \ |
17 | launcher/volumeapplet \ | 17 | core/applets/volumeapplet \ |
18 | launcher/clockapplet \ | 18 | core/applets/clockapplet \ |
19 | launcher/netmonapplet \ | 19 | core/applets/netmonapplet \ |
20 | launcher/screenshotapplet \ | 20 | core/applets/screenshotapplet \ |
21 | launcher/clipboardapplet \ | 21 | core/applets/clipboardapplet \ |
22 | launcher/cardmon \ | 22 | core/applets/cardmon \ |
23 | launcher/obex \ | 23 | core/applets/obex \ |
24 | launcher/vmemo \ | 24 | core/applets/vmemo \ |
25 | netsetup/dialup \ | 25 | noncore/net/netsetup/dialup \ |
26 | netsetup/lan \ | 26 | noncore/net/netsetup/lan \ |
27 | opiemail/ifaces/pop3 opiemail/ifaces/smtp \ | 27 | core/multimedia/opieplayer/libmpeg3 \ |
28 | core/opieplayer/libmpeg3 \ | 28 | core/multimedia/opieplayer/libmad \ |
29 | core/opieplayer/libmad \ | 29 | core/multimedia/opieplayer/wavplugin \ |
30 | core/opieplayer/wavplugin \ | ||
31 | noncore/mail/libmail \ | 30 | noncore/mail/libmail \ |
32 | noncore/mail/bend \ | 31 | noncore/mail/bend \ |
33 | 32 | ||
34 | APPS=$(LOCALAPPS) core/addressbook calculator clock datebook \ | 33 | APPS=$(LOCALAPPS) core/pim/addressbook noncore/tools/calculator \ |
35 | filebrowser helpbrowser minesweep core/opieplayer \ | 34 | noncore/tools/clock core/pim/datebook core/apps/filebrowser \ |
36 | settings/light-and-power \ | 35 | core/apps/helpbrowser noncore/games/minesweep \ |
37 | settings/language \ | 36 | core/multimedia/opieplayer core/settings/light-and-power \ |
38 | settings/rotation \ | 37 | noncore/settings/language \ |
39 | settings/appearance \ | 38 | noncore/settings/rotation \ |
40 | settings/security \ | 39 | noncore/settings/appearance \ |
41 | settings/sound \ | 40 | core/settings/security \ |
42 | settings/systemtime \ | 41 | noncore/settings/sound \ |
43 | settings/mediummount \ | 42 | core/settings/systemtime \ |
44 | settings/tabmanager \ | 43 | noncore/settings/mediummount \ |
45 | solitaire spreadsheet tetrix textedit \ | 44 | noncore/settings/tabmanager \ |
46 | todo wordgame embeddedkonsole launcher sysinfo \ | 45 | noncore/games/solitaire noncore/apps/spreadsheet \ |
47 | parashoot snake citytime showimg netsetup core/wlansetup tableviewer \ | 46 | noncore/games/tetrix core/apps/textedit \ |
48 | core/oipkg mindbreaker go qasteroids qcop fifteen keypebble today opiemail/converter opiemail \ | 47 | core/pim/todo noncore/games/wordgame core/apps/embeddedkonsole \ |
49 | noncore/tictac noncore/opieftp noncore/drawpad noncore/kcheckers noncore/appskey noncore/qpdf \ | 48 | core/launcher core/apps/sysinfo \ |
50 | noncore/kpacman noncore/advancedfm noncore/kbill noncore/remote noncore/opie-sh \ | 49 | noncore/games/parashoot noncore/games/snake core/settings/citytime \ |
50 | noncore/multimedia/showimg noncore/net/netsetup core/settings/wlansetup \ | ||
51 | noncore/apps/tableviewer core/apps/oipkg noncore/games/mindbreaker \ | ||
52 | noncore/games/go noncore/games/qasteroids core/apps/qcop \ | ||
53 | noncore/games/fifteen noncore/comm/keypebble \ | ||
54 | core/pim/today noncore/games/tictac noncore/net/opieftp \ | ||
55 | noncore/graphics/drawpad noncore/games/kcheckers noncore/settings/appskey \ | ||
56 | noncore/graphics/qpdf noncore/games/kpacman noncore/apps/advancedfm \ | ||
57 | noncore/games/kbill noncore/tools/remote \ | ||
58 | noncore/tools/opie-sh \ | ||
51 | noncore/mail | 59 | noncore/mail |
52 | 60 | ||
53 | NONTMAKEAPPS := ipaq/opiealarm noncore/nethack | 61 | NONTMAKEAPPS := ipaq/opiealarm noncore/nethack |
54 | 62 | ||
55 | DOCS = docs/src/opie-policy | 63 | DOCS = docs/src/opie-policy |
56 | single: mpegplayer/libmpeg3 | 64 | single: mpegplayer/libmpeg3 |
57 | 65 | ||
58 | dynamic: $(APPS) $(NONTMAKEAPPS) | 66 | dynamic: $(APPS) $(NONTMAKEAPPS) |
59 | 67 | ||
60 | docs: $(DOCS) | 68 | docs: $(DOCS) |
61 | 69 | ||
62 | $(COMPONENTS): $(LIBS) | 70 | $(COMPONENTS): $(LIBS) |
63 | 71 | ||
64 | $(NONTMAKEAPPS) $(APPS): $(LIBS) $(COMPONENTS) | 72 | $(NONTMAKEAPPS) $(APPS): $(LIBS) $(COMPONENTS) |
65 | 73 | ||
66 | $(LIBS) $(COMPONENTS) $(NONTMAKEAPPS) $(APPS) $(DOCS) single: | 74 | $(LIBS) $(COMPONENTS) $(NONTMAKEAPPS) $(APPS) $(DOCS) single: |
67 | $(MAKE) -C $@ -f Makefile | 75 | $(MAKE) -C $@ -f Makefile |
68 | 76 | ||
69 | showcomponents: | 77 | showcomponents: |
70 | @echo $(LIBS) $(APPS) $(COMPONENTS) single | 78 | @echo $(LIBS) $(APPS) $(COMPONENTS) single |
71 | 79 | ||
72 | clean: | 80 | clean: |
73 | $(MAKE) -C single -f Makefile $@ | 81 | $(MAKE) -C single -f Makefile $@ |
74 | for dir in $(NONTMAKEAPPS) $(APPS) $(LIBS) $(COMPONENTS) $(DOCS); do $(MAKE) -C $$dir -f Makefile $@ || exit 1; done | 82 | for dir in $(NONTMAKEAPPS) $(APPS) $(LIBS) $(COMPONENTS) $(DOCS); do $(MAKE) -C $$dir -f Makefile $@ || exit 1; done |
75 | 83 | ||
76 | lupdate: | 84 | lupdate: |
77 | for dir in $(APPS) $(LIBS) $(COMPONENTS); do $(MAKE) -C $$dir -f Makefile $@ || exit 1; done | 85 | for dir in $(APPS) $(LIBS) $(COMPONENTS); do $(MAKE) -C $$dir -f Makefile $@ || exit 1; done |
78 | 86 | ||
79 | lrelease: | 87 | lrelease: |
80 | for dir in $(APPS) $(LIBS) $(COMPONENTS); do $(MAKE) -C $$dir -f Makefile $@ || exit 1; done | 88 | for dir in $(APPS) $(LIBS) $(COMPONENTS); do $(MAKE) -C $$dir -f Makefile $@ || exit 1; done |
81 | 89 | ||
82 | 90 | ||
83 | .PHONY: default dynamic $(NONTMAKEAPPS) $(LIBS) $(APPS) $(COMPONENTS) $(DOCS) single showcomponents clean | 91 | .PHONY: default dynamic $(NONTMAKEAPPS) $(LIBS) $(APPS) $(COMPONENTS) $(DOCS) single showcomponents clean |
@@ -1,293 +1,293 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | 2 | # |
3 | # Configures to build the Qtopia Environment | 3 | # Configures to build the Qtopia Environment |
4 | # | 4 | # |
5 | # Copyright 1999-2000 Trolltech AS. All rights reserved. | 5 | # Copyright 1999-2000 Trolltech AS. All rights reserved. |
6 | # | 6 | # |
7 | 7 | ||
8 | PLATFORM=generic | 8 | PLATFORM=generic |
9 | SHARING=shared | 9 | SHARING=shared |
10 | DEBUG= | 10 | DEBUG= |
11 | QCONFIGARG= | 11 | QCONFIGARG= |
12 | 12 | ||
13 | touch .test.qpe. | 13 | touch .test.qpe. |
14 | if [ '!' -f ${OPIEDIR}/.test.qpe. ]; | 14 | if [ '!' -f ${OPIEDIR}/.test.qpe. ]; |
15 | then | 15 | then |
16 | rm .test.qpe. | 16 | rm .test.qpe. |
17 | echo | 17 | echo |
18 | echo | 18 | echo |
19 | echo ' The environment variable $OPIEDIR is not set correctly. It is currently' | 19 | echo ' The environment variable $OPIEDIR is not set correctly. It is currently' |
20 | echo ' set to "'$OPIEDIR'", but it should be set to this directory,' | 20 | echo ' set to "'$OPIEDIR'", but it should be set to this directory,' |
21 | echo ' which is "'`pwd`'".' | 21 | echo ' which is "'`pwd`'".' |
22 | echo | 22 | echo |
23 | echo ' Please read the INSTALL file for instructions on how to set $OPIEDIR' | 23 | echo ' Please read the INSTALL file for instructions on how to set $OPIEDIR' |
24 | echo ' correctly. If you have set $OPIEDIR in your .profile or .login, you ' | 24 | echo ' correctly. If you have set $OPIEDIR in your .profile or .login, you ' |
25 | echo ' will need to log out and log in again to make the setting effective.' | 25 | echo ' will need to log out and log in again to make the setting effective.' |
26 | echo | 26 | echo |
27 | echo | 27 | echo |
28 | exit 1 | 28 | exit 1 |
29 | fi | 29 | fi |
30 | rm .test.qpe. | 30 | rm .test.qpe. |
31 | 31 | ||
32 | if [ '!' -f $TMAKEPATH/tmake.conf ] | 32 | if [ '!' -f $TMAKEPATH/tmake.conf ] |
33 | then | 33 | then |
34 | # You have tmake. We'll regenerate the file for you... | 34 | # You have tmake. We'll regenerate the file for you... |
35 | echo ' The environment variable $TMAKEPATH is not set correclty. ' | 35 | echo ' The environment variable $TMAKEPATH is not set correclty. ' |
36 | echo ' It should be set to the tmake path' | 36 | echo ' It should be set to the tmake path' |
37 | echo | 37 | echo |
38 | echo ' Please read the INSTALL file for instructions on how to set $TMAKEPATH' | 38 | echo ' Please read the INSTALL file for instructions on how to set $TMAKEPATH' |
39 | echo ' to the environment variable correctly.' | 39 | echo ' to the environment variable correctly.' |
40 | exit 1 | 40 | exit 1 |
41 | fi | 41 | fi |
42 | 42 | ||
43 | VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\.[0-9]*\.[0-9]*.*".*/\1/p' <library/version.h) | 43 | VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\.[0-9]*\.[0-9]*.*".*/\1/p' <library/version.h) |
44 | VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.\([0-9]\)\.[0-9]*.*".*/\1/p' <library/version.h) | 44 | VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.\([0-9]\)\.[0-9]*.*".*/\1/p' <library/version.h) |
45 | VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.[0-9]*\.\([0-9]*\).*".*/\1/p' <library/version.h) | 45 | VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.[0-9]*\.\([0-9]*\).*".*/\1/p' <library/version.h) |
46 | 46 | ||
47 | TOMAKE= | 47 | TOMAKE= |
48 | 48 | ||
49 | if grep -q 'VERSION_STR.*"3' $QTDIR/include/qglobal.h | 49 | if grep -q 'VERSION_STR.*"3' $QTDIR/include/qglobal.h |
50 | then | 50 | then |
51 | QT3=yes | 51 | QT3=yes |
52 | else | 52 | else |
53 | QT3=no | 53 | QT3=no |
54 | fi | 54 | fi |
55 | 55 | ||
56 | # Parse the arguments, setting things to "yes" or "no". | 56 | # Parse the arguments, setting things to "yes" or "no". |
57 | 57 | ||
58 | while [ -n "$1" ]; do | 58 | while [ -n "$1" ]; do |
59 | case $1 in | 59 | case $1 in |
60 | -platform|-xplatform) # No difference since we don't need to build moc, etc. | 60 | -platform|-xplatform) # No difference since we don't need to build moc, etc. |
61 | shift; PLATFORM=$1 | 61 | shift; PLATFORM=$1 |
62 | ;; | 62 | ;; |
63 | -release) | 63 | -release) |
64 | DEBUG= | 64 | DEBUG= |
65 | ;; | 65 | ;; |
66 | -debug) | 66 | -debug) |
67 | DEBUG=-debug | 67 | DEBUG=-debug |
68 | ;; | 68 | ;; |
69 | -shared) | 69 | -shared) |
70 | SHARING=shared | 70 | SHARING=shared |
71 | ;; | 71 | ;; |
72 | -static) | 72 | -static) |
73 | SHARING=static | 73 | SHARING=static |
74 | ;; | 74 | ;; |
75 | -qconfig) | 75 | -qconfig) |
76 | # optional way to specify the qconfig-qpe.h is to pass -qconfig qpe | 76 | # optional way to specify the qconfig-qpe.h is to pass -qconfig qpe |
77 | shift; QCONFIGARG=DEFINES+=QCONFIG='\"'$1'\"' # Don't quote me on that. | 77 | shift; QCONFIGARG=DEFINES+=QCONFIG='\"'$1'\"' # Don't quote me on that. |
78 | ;; | 78 | ;; |
79 | -make) | 79 | -make) |
80 | shift; TOMAKE="$TOMAKE $1" | 80 | shift; TOMAKE="$TOMAKE $1" |
81 | ;; | 81 | ;; |
82 | -qt3) | 82 | -qt3) |
83 | QT3=yes | 83 | QT3=yes |
84 | ;; | 84 | ;; |
85 | *) | 85 | *) |
86 | HELP=yes;; | 86 | HELP=yes;; |
87 | esac | 87 | esac |
88 | shift | 88 | shift |
89 | done | 89 | done |
90 | 90 | ||
91 | TARGET=configs/$PLATFORM-$SHARING$DEBUG | 91 | TARGET=configs/$PLATFORM-$SHARING$DEBUG |
92 | 92 | ||
93 | if [ '!' -f $TARGET ] | 93 | if [ '!' -f $TARGET ] |
94 | then | 94 | then |
95 | if [ -f configs/linux-$PLATFORM-g++-$SHARING$DEBUG ] | 95 | if [ -f configs/linux-$PLATFORM-g++-$SHARING$DEBUG ] |
96 | then | 96 | then |
97 | TARGET=configs/linux-$PLATFORM-g++-$SHARING$DEBUG | 97 | TARGET=configs/linux-$PLATFORM-g++-$SHARING$DEBUG |
98 | else | 98 | else |
99 | echo | 99 | echo |
100 | echo ' The specified platform/compiler not supported: ' $TARGET | 100 | echo ' The specified platform/compiler not supported: ' $TARGET |
101 | echo | 101 | echo |
102 | exit 2 | 102 | exit 2 |
103 | fi | 103 | fi |
104 | fi | 104 | fi |
105 | 105 | ||
106 | # Next, emit a usage message if something failed. | 106 | # Next, emit a usage message if something failed. |
107 | 107 | ||
108 | if [ "$HELP" = "yes" ]; then | 108 | if [ "$HELP" = "yes" ]; then |
109 | cat <<EOF | 109 | cat <<EOF |
110 | Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...] | 110 | Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...] |
111 | 111 | ||
112 | The defaults (*) are usually acceptable. Here is a short explanation of | 112 | The defaults (*) are usually acceptable. Here is a short explanation of |
113 | each option: | 113 | each option: |
114 | 114 | ||
115 | * -release ........... Compile and link Qt with debugging turned off. | 115 | * -release ........... Compile and link Qt with debugging turned off. |
116 | -debug ............. Compile and link Qt with debugging turned on. | 116 | -debug ............. Compile and link Qt with debugging turned on. |
117 | 117 | ||
118 | * -shared ............ Create and use a shared Qt library (libqt.so) | 118 | * -shared ............ Create and use a shared Qt library (libqt.so) |
119 | -static ............ Create and use a static Qt library (libqt.a) | 119 | -static ............ Create and use a static Qt library (libqt.a) |
120 | 120 | ||
121 | -qt3 ............... Configure for use with Qt 3.x | 121 | -qt3 ............... Configure for use with Qt 3.x |
122 | 122 | ||
123 | -platform target ... The platform you are building on ($PLATFORM) | 123 | -platform target ... The platform you are building on ($PLATFORM) |
124 | EOF | 124 | EOF |
125 | exit 0; | 125 | exit 0; |
126 | fi | 126 | fi |
127 | 127 | ||
128 | CUSTOM=`echo $PLATFORM | sed -n -e "s/.*-\(.*\)-.*/\1/p"` | 128 | CUSTOM=`echo $PLATFORM | sed -n -e "s/.*-\(.*\)-.*/\1/p"` |
129 | 129 | ||
130 | if [ -f library/custom-$CUSTOM.h ] | 130 | if [ -f library/custom-$CUSTOM.h ] |
131 | then | 131 | then |
132 | rm -f library/custom.h | 132 | rm -f library/custom.h |
133 | ln -s custom-$CUSTOM.h library/custom.h | 133 | ln -s custom-$CUSTOM.h library/custom.h |
134 | fi | 134 | fi |
135 | 135 | ||
136 | mkdir -p include/qpe | 136 | mkdir -p include/qpe |
137 | ( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; ) | 137 | ( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; ) |
138 | 138 | ||
139 | mkdir -p include/opie | 139 | mkdir -p include/opie |
140 | ( cd include/opie && rm -f *.h; ln -s ../../libopie/*.h .; rm -f *_p.h; ) | 140 | ( cd include/opie && rm -f *.h; ln -s ../../libopie/*.h .; rm -f *_p.h; ) |
141 | 141 | ||
142 | 142 | ||
143 | echo Creating makefiles... | 143 | echo Creating makefiles... |
144 | 144 | ||
145 | sed -e 's/^\(VERSION.*= \).*/\1'$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT/ <library/library.pro >library/library.pro-v | 145 | sed -e 's/^\(VERSION.*= \).*/\1'$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT/ <library/library.pro >library/library.pro-v |
146 | mv library/library.pro-v library/library.pro | 146 | mv library/library.pro-v library/library.pro |
147 | 147 | ||
148 | if [ "$QT3" = yes ] | 148 | if [ "$QT3" = yes ] |
149 | then | 149 | then |
150 | VCONFIG="CONFIG+=qt3" | 150 | VCONFIG="CONFIG+=qt3" |
151 | else | 151 | else |
152 | VCONFIG="CONFIG+=qt2" | 152 | VCONFIG="CONFIG+=qt2" |
153 | fi | 153 | fi |
154 | 154 | ||
155 | if [ -f $TMAKEPATH/tmake.conf ] | 155 | if [ -f $TMAKEPATH/tmake.conf ] |
156 | then | 156 | then |
157 | # You have tmake. We'll regenerate the file for you... | 157 | # You have tmake. We'll regenerate the file for you... |
158 | echo "Makefiles will be regenerated." | 158 | echo "Makefiles will be regenerated." |
159 | fi | 159 | fi |
160 | 160 | ||
161 | H=`pwd` | 161 | H=`pwd` |
162 | if [ -z "$TOMAKE" ] | 162 | if [ -z "$TOMAKE" ] |
163 | then | 163 | then |
164 | TOMAKE=`make showcomponents` | 164 | TOMAKE=`make showcomponents` |
165 | fi | 165 | fi |
166 | 166 | ||
167 | for a in $TOMAKE ; do | 167 | for a in $TOMAKE ; do |
168 | N=$a/Makefile | 168 | N=$a/Makefile |
169 | M=$a/Makefile.in | 169 | M=$a/Makefile.in |
170 | O=$a/Makefile.add | 170 | O=$a/Makefile.add |
171 | f=`basename $a` | 171 | f=`basename $a` |
172 | 172 | ||
173 | if [ -f "$TMAKEPATH/tmake.conf" -a -f "$a/$f.pro" ] | 173 | if [ -f "$TMAKEPATH/tmake.conf" -a -f "$a/$f.pro" ] |
174 | then | 174 | then |
175 | ( cd $a; | 175 | ( cd $a; |
176 | TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \ | 176 | TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \ |
177 | tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \ | 177 | tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \ |
178 | -t $H/qt/tmake/propagate.t $f.pro | | 178 | -t $H/qt/tmake/propagate.t $f.pro | |
179 | sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in; | 179 | sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in; |
180 | ) | 180 | ) |
181 | echo -n "." | 181 | echo -n "." |
182 | #echo Building $N.. | 182 | #echo Building $N.. |
183 | appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | sed 's/ //g'` | 183 | appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | sed 's/ //g'` |
184 | translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' ` | 184 | translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' ` |
185 | if [ -n "$translation" -a -n "$appname" ] | 185 | if [ -n "$translation" -a -n "$appname" ] |
186 | then | 186 | then |
187 | if [ "$appname" != "$translation" ] | 187 | if [ "$appname" != "$translation" ] |
188 | then | 188 | then |
189 | echo | 189 | echo |
190 | echo "Warning: translation and appname disagree in $a/$f.pro" | 190 | echo "Warning: translation and appname disagree in $a/$f.pro" |
191 | fi | 191 | fi |
192 | fi | 192 | fi |
193 | 193 | ||
194 | fi | 194 | fi |
195 | 195 | ||
196 | cat > $N <<EOF | 196 | cat > $N <<EOF |
197 | ############################################################################# | 197 | ############################################################################# |
198 | # Automatically generated from $M | 198 | # Automatically generated from $M |
199 | # Build options from $1 | 199 | # Build options from $1 |
200 | ############################################################################# | 200 | ############################################################################# |
201 | 201 | ||
202 | EOF | 202 | EOF |
203 | 203 | ||
204 | SED= | 204 | SED= |
205 | PLATFORM_CFLAGS= | 205 | PLATFORM_CFLAGS= |
206 | 206 | ||
207 | if [ "$f" = "embeddedkonsole" ] | 207 | if [ "$f" = "embeddedkonsole" ] |
208 | then | 208 | then |
209 | case $PLATFORM in | 209 | case $PLATFORM in |
210 | *x86*|*generic*|*ipaq*|*sharp*) | 210 | *x86*|*generic*|*ipaq*|*sharp*) |
211 | SED="$SED /^LIBS.*=/s/\$/ -lutil/;" | 211 | SED="$SED /^LIBS.*=/s/\$/ -lutil/;" |
212 | PLATFORM_CFLAGS="-DHAVE_OPENPTY" | 212 | PLATFORM_CFLAGS="-DHAVE_OPENPTY" |
213 | ;; *) | 213 | ;; *) |
214 | SED= | 214 | SED= |
215 | esac | 215 | esac |
216 | elif [ "$f" = "libmpeg3" ] | 216 | elif [ "$f" = "libmpeg3" ] |
217 | then | 217 | then |
218 | # Patch our Makefile.in file with the platform specifics for the libmpeg3 library | 218 | # Patch our Makefile.in file with the platform specifics for the libmpeg3 library |
219 | # Use the C++ compiler to compile the .c files (because the fixed-point classes are C++ code) | 219 | # Use the C++ compiler to compile the .c files (because the fixed-point classes are C++ code) |
220 | SED='s/\$(CC)/\$(CXX)/;' | 220 | SED='s/\$(CC)/\$(CXX)/;' |
221 | case $PLATFORM | 221 | case $PLATFORM |
222 | in | 222 | in |
223 | # For x86 turn on using floating point, compile mmx and css code | 223 | # For x86 turn on using floating point, compile mmx and css code |
224 | *x86*) | 224 | *x86*) |
225 | # "-funroll-loops -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486" | 225 | # "-funroll-loops -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486" |
226 | PLATFORM_CFLAGS="-DHAVE_MMX -DHAVE_CSS" | 226 | PLATFORM_CFLAGS="-DHAVE_MMX -DHAVE_CSS" |
227 | SED="$SED /SOURCES.*=/s/=/= video\\/mmxidct.S video\\/reconmmx.s\ /;" | 227 | SED="$SED /SOURCES.*=/s/=/= video\\/mmxidct.S video\\/reconmmx.s\ /;" |
228 | # For generic turn on using floating point | 228 | # For generic turn on using floating point |
229 | ;; *generic*) | 229 | ;; *generic*) |
230 | PLATFORM_CFLAGS="" | 230 | PLATFORM_CFLAGS="" |
231 | # For the ipaq use fixed point maths, don't compile the mmx or css code | 231 | # For the ipaq use fixed point maths, don't compile the mmx or css code |
232 | ;; *ipaq*|*sharp*) | 232 | ;; *ipaq*|*sharp*) |
233 | PLATFORM_CFLAGS="-DUSE_FIXED_POINT" | 233 | PLATFORM_CFLAGS="-DUSE_FIXED_POINT" |
234 | ;; *) | 234 | ;; *) |
235 | # For 'other platforms', turn off optimizations and use fixed point | 235 | # For 'other platforms', turn off optimizations and use fixed point |
236 | PLATFORM_CFLAGS="-O -DUSE_FIXED_POINT" | 236 | PLATFORM_CFLAGS="-O -DUSE_FIXED_POINT" |
237 | esac | 237 | esac |
238 | elif [ "$f" = "libmad" ] | 238 | elif [ "$f" = "libmad" ] |
239 | then | 239 | then |
240 | # Patch our Makefile.in file with the platform specifics for the libmad library | 240 | # Patch our Makefile.in file with the platform specifics for the libmad library |
241 | case $PLATFORM | 241 | case $PLATFORM |
242 | in | 242 | in |
243 | # For x86 use intel optimizations | 243 | # For x86 use intel optimizations |
244 | *x86*) | 244 | *x86*) |
245 | PLATFORM_CFLAGS="-DFPM_INTEL" | 245 | PLATFORM_CFLAGS="-DFPM_INTEL" |
246 | # For the ipaq use ARM asm optimizations | 246 | # For the ipaq use ARM asm optimizations |
247 | ;; *ipaq*|*sharp*) | 247 | ;; *ipaq*|*sharp*) |
248 | PLATFORM_CFLAGS="-DFPM_ARM" | 248 | PLATFORM_CFLAGS="-DFPM_ARM" |
249 | SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;" | 249 | SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;" |
250 | # For generic platforms use the C 64-bit implementation | 250 | # For generic platforms use the C 64-bit implementation |
251 | ;; *generic*) | 251 | ;; *generic*) |
252 | PLATFORM_CFLAGS="-DFPM_64BIT" | 252 | PLATFORM_CFLAGS="-DFPM_64BIT" |
253 | # For 'other platforms' use the ARM code | 253 | # For 'other platforms' use the ARM code |
254 | ;; *) | 254 | ;; *) |
255 | PLATFORM_CFLAGS="-DFPM_ARM" | 255 | PLATFORM_CFLAGS="-DFPM_ARM" |
256 | SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;" | 256 | SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;" |
257 | esac | 257 | esac |
258 | fi | 258 | fi |
259 | if [ -n "$PLATFORM_CFLAGS" ] | 259 | if [ -n "$PLATFORM_CFLAGS" ] |
260 | then | 260 | then |
261 | # Append the addition c-flags we have defined | 261 | # Append the addition c-flags we have defined |
262 | SED="$SED /CFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS/;" | 262 | SED="$SED /CFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS/;" |
263 | SED="$SED /CXXFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS/;" | 263 | SED="$SED /CXXFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS/;" |
264 | fi | 264 | fi |
265 | cat $TARGET >> $N | 265 | cat $TARGET >> $N |
266 | if [ -n "$SED" ] | 266 | if [ -n "$SED" ] |
267 | then | 267 | then |
268 | sed -e "$SED" $M >> $N | 268 | sed -e "$SED" $M >> $N |
269 | else | 269 | else |
270 | cat $M >> $N | 270 | cat $M >> $N |
271 | fi | 271 | fi |
272 | 272 | ||
273 | cat >> $N <<EOF | 273 | cat >> $N <<EOF |
274 | 274 | ||
275 | lupdate: | 275 | lupdate: |
276 | lupdate $f.pro | 276 | lupdate $f.pro |
277 | 277 | ||
278 | lrelease: | 278 | lrelease: |
279 | lrelease $f.pro | 279 | lrelease $f.pro |
280 | 280 | ||
281 | EOF | 281 | EOF |
282 | if [ -f "$O" ] | 282 | if [ -f "$O" ] |
283 | then | 283 | then |
284 | cat >> $N $O | 284 | cat >> $N $O |
285 | fi | 285 | fi |
286 | 286 | ||
287 | done | 287 | done |
288 | 288 | ||
289 | MAKE=make | 289 | MAKE=make |
290 | echo | 290 | echo |
291 | echo "QPE is now configured for building. Just run $MAKE (or $MAKE single)." | 291 | echo "Opie is now configured for building. Just run $MAKE (or $MAKE single)." |
292 | echo "To reconfigure, run $MAKE clean and configure." | 292 | echo "To reconfigure, run $MAKE clean and configure." |
293 | echo | 293 | echo |