summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-04-22 20:21:20 (UTC)
committer kergoth <kergoth>2003-04-22 20:21:20 (UTC)
commite3ef0f8587b10bf242d8077609988e06a37bcae5 (patch) (unidiff)
tree89a270cdde36fdb406fa17f38be429a377545dd0
parentccec87cf3e7192c0a3987aa3486668e89b1662a4 (diff)
downloadopie-e3ef0f8587b10bf242d8077609988e06a37bcae5.zip
opie-e3ef0f8587b10bf242d8077609988e06a37bcae5.tar.gz
opie-e3ef0f8587b10bf242d8077609988e06a37bcae5.tar.bz2
Set strip binary appropriately, based on target selection for ipk creation
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile11
-rw-r--r--Vars.make22
2 files changed, 23 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 10df035..8551f28 100644
--- a/Makefile
+++ b/Makefile
@@ -1,133 +1,124 @@
1#!/usr/bin/make -f 1#!/usr/bin/make -f
2 2
3export TOPDIR:=$(shell pwd) 3export TOPDIR:=$(shell pwd)
4 4
5include $(TOPDIR)/Vars.make 5include $(TOPDIR)/Vars.make
6 6
7noconfig_targets := xconfig menuconfig config oldconfig randconfig \ 7noconfig_targets := xconfig menuconfig config oldconfig randconfig \
8 defconfig allyesconfig allnoconfig allmodconfig \ 8 defconfig allyesconfig allnoconfig allmodconfig \
9 clean-configs 9 clean-configs
10 10
11configs += $(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 11configs += $(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
22all : $(TOPDIR)/.config 22all : $(TOPDIR)/.config
23 23
24STRIP=arm-linux-strip 24ipks: $(OPIEDIR)/scripts/subst $(OPIEDIR)/scripts/filesubst FORCE $(TOPDIR)/.config
25
26ipks: $(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
38all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(TOPDIR)/.depends.cfgs 36all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(TOPDIR)/.depends.cfgs
39 37
40clean-configs : 38clean-configs :
41 @echo "Wiping generated config.in files..." 39 @echo "Wiping generated config.in files..."
42 @-rm -f $(configs) 40 @-rm -f $(configs)
43 41
44ifneq ($(wildcard $(TOPDIR)/.depends.cfgs),) 42ifneq ($(wildcard $(TOPDIR)/.depends.cfgs),)
45 include $(TOPDIR)/.depends.cfgs 43 include $(TOPDIR)/.depends.cfgs
46endif 44endif
47 45
48all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(configs) 46all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(configs)
49 47
50$(TOPDIR)/.config: $(TOPDIR)/.depends.cfgs $(configs) 48$(TOPDIR)/.config: $(TOPDIR)/.depends.cfgs $(configs)
51 $(call descend,scripts/kconfig,conf) 49 $(call descend,scripts/kconfig,conf)
52 @if [ ! -e $@ ]; then \ 50 @if [ ! -e $@ ]; then \
53 cp $(TOPDIR)/def-configs/opie $@; \ 51 cp $(TOPDIR)/def-configs/opie $@; \
54 fi; 52 fi;
55 @$(MAKE) -C scripts/kconfig conf; 53 @$(MAKE) -C scripts/kconfig conf;
56 ./scripts/kconfig/conf -s ./config.in 54 ./scripts/kconfig/conf -s ./config.in
57 55
58# config rules must have the $(configs) var defined 56# config rules must have the $(configs) var defined
59# at the time that they run. we must ensure that .depends.cfgs 57# at the time that they run. we must ensure that .depends.cfgs
60# is built and included by the time we reach this point. 58# is built and included by the time we reach this point.
61 59
62xconfig : 60xconfig :
63 $(call descend,scripts/kconfig,qconf) 61 $(call descend,scripts/kconfig,qconf)
64 LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(TOPDIR)/scripts/kconfig \ 62 LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(TOPDIR)/scripts/kconfig \
65 ./scripts/kconfig/qconf ./config.in 63 ./scripts/kconfig/qconf ./config.in
66 64
67menuconfig : scripts/lxdialog/lxdialog 65menuconfig : scripts/lxdialog/lxdialog
68 $(call descend,scripts/kconfig,mconf) 66 $(call descend,scripts/kconfig,mconf)
69 ./scripts/kconfig/mconf ./config.in 67 ./scripts/kconfig/mconf ./config.in
70 68
71config : 69config :
72 $(call descend,scripts/kconfig,conf) 70 $(call descend,scripts/kconfig,conf)
73 ./scripts/kconfig/conf ./config.in 71 ./scripts/kconfig/conf ./config.in
74 72
75oldconfig : 73oldconfig :
76 $(call descend,scripts/kconfig,conf) 74 $(call descend,scripts/kconfig,conf)
77 ./scripts/kconfig/conf -o ./config.in 75 ./scripts/kconfig/conf -o ./config.in
78 76
79randconfig : 77randconfig :
80 $(call descend,scripts/kconfig,conf) 78 $(call descend,scripts/kconfig,conf)
81 ./scripts/kconfig/conf -r ./config.in 79 ./scripts/kconfig/conf -r ./config.in
82 80
83allyesconfig : 81allyesconfig :
84 $(call descend,scripts/kconfig,conf) 82 $(call descend,scripts/kconfig,conf)
85 ./scripts/kconfig/conf -y ./config.in 83 ./scripts/kconfig/conf -y ./config.in
86 84
87allnoconfig : 85allnoconfig :
88 $(call descend,scripts/kconfig,conf) 86 $(call descend,scripts/kconfig,conf)
89 ./scripts/kconfig/conf -n ./config.in 87 ./scripts/kconfig/conf -n ./config.in
90 88
91defconfig : 89defconfig :
92 $(call descend,scripts/kconfig,conf) 90 $(call descend,scripts/kconfig,conf)
93 ./scripts/kconfig/conf -d ./config.in 91 ./scripts/kconfig/conf -d ./config.in
94 92
95 93
96export 94export
97 95
98ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) 96ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
99 97
100export include-config := 1 98export include-config := 1
101 99
102-include $(TOPDIR)/.config 100-include $(TOPDIR)/.config
103-include $(TOPDIR)/.depends 101-include $(TOPDIR)/.depends
104endif 102endif
105 103
106-include $(TOPDIR)/.config.cmd 104-include $(TOPDIR)/.config.cmd
107 105
108SUBDIRS = $(subdir-y) 106SUBDIRS = $(subdir-y)
109 107
110export QMAKESPEC=$(QMAKESPECSDIR)/$(patsubst "%",%,$(CONFIG_SPECFILE))
111
112ifdef CONFIG_OPTIMIZATIONS
113export CFLAGS_RELEASE=$(patsubst "%,%,$(CONFIG_OPTIMIZATIONS))
114export CFLAGS_RELEASE:=$(patsubst %",%,$(CFLAGS_RELEASE))
115endif
116
117all clean install ipk: $(SUBDIRS) 108all clean install ipk: $(SUBDIRS)
118 109
119lupdate lrelease: 110lupdate lrelease:
120 @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done; 111 @for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done;
121 112
122opie-lupdate opie-lrelease: 113opie-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
129clean : $(TOPDIR)/.config 120clean : $(TOPDIR)/.config
130 121
131apidox : doc/generate_apidox 122apidox : doc/generate_apidox
132 123
133include $(TOPDIR)/Rules.make 124include $(TOPDIR)/Rules.make
diff --git a/Vars.make b/Vars.make
index eac5cea..b1cdb28 100644
--- a/Vars.make
+++ b/Vars.make
@@ -1,63 +1,85 @@
1ifndef QTDIR 1ifndef QTDIR
2$(error QTDIR not set) 2$(error QTDIR not set)
3endif 3endif
4 4
5prefix=/opt/QtPalmtop 5prefix=/opt/QtPalmtop
6 6
7ifeq ($(OPIEDIR),) 7ifeq ($(OPIEDIR),)
8 export OPIEDIR:=$(TOPDIR) 8 export OPIEDIR:=$(TOPDIR)
9endif 9endif
10ifeq ($(IPK_DIR),) 10ifeq ($(IPK_DIR),)
11 export IPK_DIR:=$(OPIEDIR) 11 export IPK_DIR:=$(OPIEDIR)
12endif 12endif
13 13
14ifneq ($(wildcard $(TOPDIR)/.config),)
15 include $(TOPDIR)/.config
16endif
17
14export QMAKE:=$(OPIEDIR)/qmake/qmake 18export QMAKE:=$(OPIEDIR)/qmake/qmake
15export QMAKESPECSDIR=$(OPIEDIR)/mkspecs 19export QMAKESPECSDIR=$(OPIEDIR)/mkspecs
16 20
17ifeq ($(QPE_VERSION),) 21ifeq ($(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
26endif 30endif
27export QPE_VERSION 31export QPE_VERSION
28 32
29SUB_VERSION=$(shell echo $$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$(OPIEDIR)/library/version.h)) 33SUB_VERSION=$(shell echo $$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$(OPIEDIR)/library/version.h))
30ifeq ($(VERSION_CVS),) 34ifeq ($(VERSION_CVS),)
31 VERSION_CVS:=$(shell date +%Y%m%d) 35 VERSION_CVS:=$(shell date +%Y%m%d)
32endif 36endif
33ifneq ($(filter %snapshot",$(shell cat $(OPIEDIR)/library/version.h|grep QPE_VERSION)),) 37ifneq ($(filter %snapshot",$(shell cat $(OPIEDIR)/library/version.h|grep QPE_VERSION)),)
34 SUB_VERSION:=$(VERSION_CVS) 38 SUB_VERSION:=$(VERSION_CVS)
35endif 39endif
36export SUB_VERSION 40export SUB_VERSION
37 41
38ifeq ($(QTE_REVISION),) 42ifeq ($(QTE_REVISION),)
39 QTE_REVISION=4 43 QTE_REVISION=4
40endif 44endif
41export QTE_REVISION 45export QTE_REVISION
42 46
43export DEB_VERSION=2.0 47export DEB_VERSION=2.0
44 48
45ifeq ($(QTE_BASEVERSION),) 49ifeq ($(QTE_BASEVERSION),)
46 ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),) 50 ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),)
47 QTE_BASEVERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION'|grep -v STR|sed -e 's/\#define QT_VERSION\t*//; s/.*\([0-9]\)\([0-9]\)\([0-9]\).*/\1.\2.\3/;') 51 QTE_BASEVERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION'|grep -v STR|sed -e 's/\#define QT_VERSION\t*//; s/.*\([0-9]\)\([0-9]\)\([0-9]\).*/\1.\2.\3/;')
48 else 52 else
49 QTE_BASEVERSION=2.3.5 53 QTE_BASEVERSION=2.3.5
50 endif 54 endif
51endif 55endif
52export QTE_BASEVERSION 56export QTE_BASEVERSION
53 57
54ifeq ($(QTE_VERSION),) 58ifeq ($(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
60endif 64endif
61export QTE_VERSION 65export QTE_VERSION
62 66
63export PATH:=$(OPIEDIR)/scripts:$(PATH) 67export PATH:=$(OPIEDIR)/scripts:$(PATH)
68export QMAKESPEC=$(QMAKESPECSDIR)/$(patsubst "%",%,$(CONFIG_SPECFILE))
69
70ifdef CONFIG_OPTIMIZATIONS
71export CFLAGS_RELEASE=$(patsubst "%,%,$(CONFIG_OPTIMIZATIONS))
72export CFLAGS_RELEASE:=$(patsubst %",%,$(CFLAGS_RELEASE))
73endif
74
75ifeq ($(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
85endif