|
diff --git a/Makefile b/Makefile index 10df035..8551f28 100644 --- a/ Makefile+++ b/ Makefile |
|
@@ -8,35 +8,33 @@ noconfig_targets := xconfig menuconfig config oldconfig randconfig \ |
8 | defconfig allyesconfig allnoconfig allmodconfig \ |
8 | defconfig allyesconfig allnoconfig allmodconfig \ |
9 | clean-configs |
9 | clean-configs |
10 | |
10 | |
11 | configs += $(TOPDIR)/core/applets/config.in $(TOPDIR)/core/apps/config.in $(TOPDIR)/core/multimedia/config.in $(TOPDIR)/core/pim/config.in $(TOPDIR)/core/pim/today/plugins/config.in $(TOPDIR)/core/settings/config.in $(TOPDIR)/development/config.in $(TOPDIR)/inputmethods/config.in $(TOPDIR)/libopie/ofileselector/config.in $(TOPDIR)/libopie/pim/config.in $(TOPDIR)/libsql/config.in $(TOPDIR)/noncore/applets/config.in $(TOPDIR)/noncore/apps/opie-console/test/config.in $(TOPDIR)/noncore/apps/config.in $(TOPDIR)/noncore/comm/config.in $(TOPDIR)/noncore/decorations/config.in $(TOPDIR)/noncore/games/config.in $(TOPDIR)/noncore/graphics/config.in $(TOPDIR)/noncore/multimedia/config.in $(TOPDIR)/noncore/net/config.in $(TOPDIR)/noncore/net/opietooth/config.in $(TOPDIR)/noncore/settings/config.in $(TOPDIR)/noncore/styles/config.in $(TOPDIR)/noncore/tools/calc2/config.in $(TOPDIR)/noncore/tools/config.in $(TOPDIR)/noncore/todayplugins/config.in |
11 | configs += $(TOPDIR)/core/applets/config.in $(TOPDIR)/core/apps/config.in $(TOPDIR)/core/multimedia/config.in $(TOPDIR)/core/pim/config.in $(TOPDIR)/core/pim/today/plugins/config.in $(TOPDIR)/core/settings/config.in $(TOPDIR)/development/config.in $(TOPDIR)/inputmethods/config.in $(TOPDIR)/libopie/ofileselector/config.in $(TOPDIR)/libopie/pim/config.in $(TOPDIR)/libsql/config.in $(TOPDIR)/noncore/applets/config.in $(TOPDIR)/noncore/apps/opie-console/test/config.in $(TOPDIR)/noncore/apps/config.in $(TOPDIR)/noncore/comm/config.in $(TOPDIR)/noncore/decorations/config.in $(TOPDIR)/noncore/games/config.in $(TOPDIR)/noncore/graphics/config.in $(TOPDIR)/noncore/multimedia/config.in $(TOPDIR)/noncore/net/config.in $(TOPDIR)/noncore/net/opietooth/config.in $(TOPDIR)/noncore/settings/config.in $(TOPDIR)/noncore/styles/config.in $(TOPDIR)/noncore/tools/calc2/config.in $(TOPDIR)/noncore/tools/config.in $(TOPDIR)/noncore/todayplugins/config.in |
12 | |
12 | |
13 | # $(TOPDIR)/.config depends on .depends.cfgs, as it depends on $(configs) |
13 | # $(TOPDIR)/.config depends on .depends.cfgs, as it depends on $(configs) |
14 | # in order to have a full set of config.in files. |
14 | # in order to have a full set of config.in files. |
15 | # .depends depends on $(TOPDIR)/.config |
15 | # .depends depends on $(TOPDIR)/.config |
16 | # everything else depends on .depends, to ensure the dependencies are |
16 | # everything else depends on .depends, to ensure the dependencies are |
17 | # intact. |
17 | # intact. |
18 | # |
18 | # |
19 | # NOTE: The order in which things happen in this makefile is |
19 | # NOTE: The order in which things happen in this makefile is |
20 | # -critical-. Do not rearrange this! |
20 | # -critical-. Do not rearrange this! |
21 | |
21 | |
22 | all : $(TOPDIR)/.config |
22 | all : $(TOPDIR)/.config |
23 | |
23 | |
24 | STRIP=arm-linux-strip |
24 | ipks: $(OPIEDIR)/scripts/subst $(OPIEDIR)/scripts/filesubst FORCE $(TOPDIR)/.config |
25 | |
| |
26 | ipks: $(OPIEDIR)/scripts/subst $(OPIEDIR)/scripts/filesubst FORCE |
| |
27 | @find $(OPIEDIR)/ -type f -name \*.control | ( for ctrl in `cat`; do \ |
25 | @find $(OPIEDIR)/ -type f -name \*.control | ( for ctrl in `cat`; do \ |
28 | prerm=`echo $$ctrl|sed -e 's,\.control$$,.prerm,'`; \ |
26 | prerm=`echo $$ctrl|sed -e 's,\.control$$,.prerm,'`; \ |
29 | preinst=`echo $$ctrl|sed -e 's,\.control$$,.preinst,'`; \ |
27 | preinst=`echo $$ctrl|sed -e 's,\.control$$,.preinst,'`; \ |
30 | postrm=`echo $$ctrl|sed -e 's,\.control$$,.postrm,'`; \ |
28 | postrm=`echo $$ctrl|sed -e 's,\.control$$,.postrm,'`; \ |
31 | postinst=`echo $$ctrl|sed -e 's,\.control$$,.postinst,'`; \ |
29 | postinst=`echo $$ctrl|sed -e 's,\.control$$,.postinst,'`; \ |
32 | echo "Building ipk of $$ctrl"; \ |
30 | echo "Building ipk of $$ctrl"; \ |
33 | cd $(OPIEDIR); $(OPIEDIR)/scripts/mkipkg --subst=$(OPIEDIR)/scripts/subst --filesubst=$(OPIEDIR)/scripts/filesubst --control=$$ctrl --prerm=$$prerm --preinst=$$preinst --postrm=$$postrm --postinst=$$postinst --strip=$(STRIP) $(OPIEDIR); \ |
31 | cd $(OPIEDIR); $(OPIEDIR)/scripts/mkipkg --subst=$(OPIEDIR)/scripts/subst --filesubst=$(OPIEDIR)/scripts/filesubst --control=$$ctrl --prerm=$$prerm --preinst=$$preinst --postrm=$$postrm --postinst=$$postinst --strip=$(STRIP) $(OPIEDIR); \ |
34 | done ) |
32 | done ) |
35 | |
33 | |
36 | $(TOPDIR)/.config : $(TOPDIR)/.depends.cfgs |
34 | $(TOPDIR)/.config : $(TOPDIR)/.depends.cfgs |
37 | |
35 | |
38 | all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(TOPDIR)/.depends.cfgs |
36 | all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(TOPDIR)/.depends.cfgs |
39 | |
37 | |
40 | clean-configs : |
38 | clean-configs : |
41 | @echo "Wiping generated config.in files..." |
39 | @echo "Wiping generated config.in files..." |
42 | @-rm -f $(configs) |
40 | @-rm -f $(configs) |
@@ -94,39 +92,32 @@ defconfig : |
94 | |
92 | |
95 | |
93 | |
96 | export |
94 | export |
97 | |
95 | |
98 | ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) |
96 | ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) |
99 | |
97 | |
100 | export include-config := 1 |
98 | export include-config := 1 |
101 | |
99 | |
102 | -include $(TOPDIR)/.config |
100 | -include $(TOPDIR)/.config |
103 | -include $(TOPDIR)/.depends |
101 | -include $(TOPDIR)/.depends |
104 | endif |
102 | endif |
105 | |
103 | |
106 | -include $(TOPDIR)/.config.cmd |
104 | -include $(TOPDIR)/.config.cmd |
107 | |
105 | |
108 | SUBDIRS = $(subdir-y) |
106 | SUBDIRS = $(subdir-y) |
109 | |
107 | |
110 | export QMAKESPEC=$(QMAKESPECSDIR)/$(patsubst "%",%,$(CONFIG_SPECFILE)) |
| |
111 | |
| |
112 | ifdef CONFIG_OPTIMIZATIONS |
| |
113 | export CFLAGS_RELEASE=$(patsubst "%,%,$(CONFIG_OPTIMIZATIONS)) |
| |
114 | export CFLAGS_RELEASE:=$(patsubst %",%,$(CFLAGS_RELEASE)) |
| |
115 | endif |
| |
116 | |
| |
117 | all clean install ipk: $(SUBDIRS) |
108 | all clean install ipk: $(SUBDIRS) |
118 | |
109 | |
119 | lupdate lrelease: |
110 | lupdate lrelease: |
120 | @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done; |
111 | @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done; |
121 | |
112 | |
122 | opie-lupdate opie-lrelease: |
113 | opie-lupdate opie-lrelease: |
123 | @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done; |
114 | @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done; |
124 | |
115 | |
125 | $(subdir-y) : $(if $(CONFIG_LIBQPE),$(QTDIR)/stamp-headers $(OPIEDIR)/stamp-headers) \ |
116 | $(subdir-y) : $(if $(CONFIG_LIBQPE),$(QTDIR)/stamp-headers $(OPIEDIR)/stamp-headers) \ |
126 | $(if $(CONFIG_LIBQPE-X11),$(QTDIR)/stamp-headers-x11 $(OPIEDIR)/stamp-headers-x11 ) \ |
117 | $(if $(CONFIG_LIBQPE-X11),$(QTDIR)/stamp-headers-x11 $(OPIEDIR)/stamp-headers-x11 ) \ |
127 | $(TOPDIR)/library/custom.h |
118 | $(TOPDIR)/library/custom.h |
128 | |
119 | |
129 | clean : $(TOPDIR)/.config |
120 | clean : $(TOPDIR)/.config |
130 | |
121 | |
131 | apidox : doc/generate_apidox |
122 | apidox : doc/generate_apidox |
132 | |
123 | |
|
|
diff --git a/Vars.make b/Vars.make index eac5cea..b1cdb28 100644 --- a/ Vars.make+++ b/ Vars.make |
|
@@ -1,29 +1,33 @@ |
1 | ifndef QTDIR |
1 | ifndef QTDIR |
2 | $(error QTDIR not set) |
2 | $(error QTDIR not set) |
3 | endif |
3 | endif |
4 | |
4 | |
5 | prefix=/opt/QtPalmtop |
5 | prefix=/opt/QtPalmtop |
6 | |
6 | |
7 | ifeq ($(OPIEDIR),) |
7 | ifeq ($(OPIEDIR),) |
8 | export OPIEDIR:=$(TOPDIR) |
8 | export OPIEDIR:=$(TOPDIR) |
9 | endif |
9 | endif |
10 | ifeq ($(IPK_DIR),) |
10 | ifeq ($(IPK_DIR),) |
11 | export IPK_DIR:=$(OPIEDIR) |
11 | export IPK_DIR:=$(OPIEDIR) |
12 | endif |
12 | endif |
13 | |
13 | |
| |
14 | ifneq ($(wildcard $(TOPDIR)/.config),) |
| |
15 | include $(TOPDIR)/.config |
| |
16 | endif |
| |
17 | |
14 | export QMAKE:=$(OPIEDIR)/qmake/qmake |
18 | export QMAKE:=$(OPIEDIR)/qmake/qmake |
15 | export QMAKESPECSDIR=$(OPIEDIR)/mkspecs |
19 | export QMAKESPECSDIR=$(OPIEDIR)/mkspecs |
16 | |
20 | |
17 | ifeq ($(QPE_VERSION),) |
21 | ifeq ($(QPE_VERSION),) |
18 | VERSION_MAJ:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$(OPIEDIR)/library/version.h)) |
22 | VERSION_MAJ:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$(OPIEDIR)/library/version.h)) |
19 | VERSION_MIN:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$(OPIEDIR)/library/version.h)) |
23 | VERSION_MIN:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$(OPIEDIR)/library/version.h)) |
20 | VERSION_PAT:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$(OPIEDIR)/library/version.h)) |
24 | VERSION_PAT:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$(OPIEDIR)/library/version.h)) |
21 | QPE_VERSION:=$(VERSION_MAJ).$(VERSION_MIN).$(VERSION_PAT) |
25 | QPE_VERSION:=$(VERSION_MAJ).$(VERSION_MIN).$(VERSION_PAT) |
22 | |
26 | |
23 | ifeq ($(QPE_VERSION),..) |
27 | ifeq ($(QPE_VERSION),..) |
24 | QPE_VERSION=0.9.3 |
28 | QPE_VERSION=0.9.3 |
25 | endif |
29 | endif |
26 | endif |
30 | endif |
27 | export QPE_VERSION |
31 | export QPE_VERSION |
28 | |
32 | |
29 | SUB_VERSION=$(shell echo $$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$(OPIEDIR)/library/version.h)) |
33 | SUB_VERSION=$(shell echo $$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$(OPIEDIR)/library/version.h)) |
@@ -48,16 +52,34 @@ ifeq ($(QTE_BASEVERSION),) |
48 | else |
52 | else |
49 | QTE_BASEVERSION=2.3.5 |
53 | QTE_BASEVERSION=2.3.5 |
50 | endif |
54 | endif |
51 | endif |
55 | endif |
52 | export QTE_BASEVERSION |
56 | export QTE_BASEVERSION |
53 | |
57 | |
54 | ifeq ($(QTE_VERSION),) |
58 | ifeq ($(QTE_VERSION),) |
55 | ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),) |
59 | ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),) |
56 | QTE_VERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION_STR'|sed -e 's/\#define QT_VERSION_STR\t*//;' -e 's/.*"\([^"]*\)".*/\1/;') |
60 | QTE_VERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION_STR'|sed -e 's/\#define QT_VERSION_STR\t*//;' -e 's/.*"\([^"]*\)".*/\1/;') |
57 | else |
61 | else |
58 | QTE_VERSION=2.3.5 |
62 | QTE_VERSION=2.3.5 |
59 | endif |
63 | endif |
60 | endif |
64 | endif |
61 | export QTE_VERSION |
65 | export QTE_VERSION |
62 | |
66 | |
63 | export PATH:=$(OPIEDIR)/scripts:$(PATH) |
67 | export PATH:=$(OPIEDIR)/scripts:$(PATH) |
| |
68 | export QMAKESPEC=$(QMAKESPECSDIR)/$(patsubst "%",%,$(CONFIG_SPECFILE)) |
| |
69 | |
| |
70 | ifdef CONFIG_OPTIMIZATIONS |
| |
71 | export CFLAGS_RELEASE=$(patsubst "%,%,$(CONFIG_OPTIMIZATIONS)) |
| |
72 | export CFLAGS_RELEASE:=$(patsubst %",%,$(CFLAGS_RELEASE)) |
| |
73 | endif |
| |
74 | |
| |
75 | ifeq ($(STRIP),) |
| |
76 | ifneq ($(CONFIG_TARGET_X86),) |
| |
77 | STRIP=strip |
| |
78 | endif |
| |
79 | ifneq ($(CONFIG_TARGET_IPAQ),) |
| |
80 | STRIP=arm-linux-strip |
| |
81 | endif |
| |
82 | ifneq ($(CONFIG_TARGET_SHARP),) |
| |
83 | STRIP=arm-linux-strip |
| |
84 | endif |
| |
85 | endif |
|