summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-04-22 20:21:20 (UTC)
committer kergoth <kergoth>2003-04-22 20:21:20 (UTC)
commite3ef0f8587b10bf242d8077609988e06a37bcae5 (patch) (side-by-side diff)
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) (show 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
@@ -12,27 +12,25 @@ configs += $(TOPDIR)/core/applets/config.in $(TOPDIR)/core/apps/config.in $(TOPD
# $(TOPDIR)/.config depends on .depends.cfgs, as it depends on $(configs)
# in order to have a full set of config.in files.
# .depends depends on $(TOPDIR)/.config
# everything else depends on .depends, to ensure the dependencies are
# intact.
#
# NOTE: The order in which things happen in this makefile is
# -critical-. Do not rearrange this!
all : $(TOPDIR)/.config
-STRIP=arm-linux-strip
-
-ipks: $(OPIEDIR)/scripts/subst $(OPIEDIR)/scripts/filesubst FORCE
+ipks: $(OPIEDIR)/scripts/subst $(OPIEDIR)/scripts/filesubst FORCE $(TOPDIR)/.config
@find $(OPIEDIR)/ -type f -name \*.control | ( for ctrl in `cat`; do \
prerm=`echo $$ctrl|sed -e 's,\.control$$,.prerm,'`; \
preinst=`echo $$ctrl|sed -e 's,\.control$$,.preinst,'`; \
postrm=`echo $$ctrl|sed -e 's,\.control$$,.postrm,'`; \
postinst=`echo $$ctrl|sed -e 's,\.control$$,.postinst,'`; \
echo "Building ipk of $$ctrl"; \
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); \
done )
$(TOPDIR)/.config : $(TOPDIR)/.depends.cfgs
all menuconfig xconfig oldconfig config randconfig allyesconfig allnoconfig defconfig : $(TOPDIR)/.depends.cfgs
@@ -98,31 +96,24 @@ export
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
export include-config := 1
-include $(TOPDIR)/.config
-include $(TOPDIR)/.depends
endif
-include $(TOPDIR)/.config.cmd
SUBDIRS = $(subdir-y)
-export QMAKESPEC=$(QMAKESPECSDIR)/$(patsubst "%",%,$(CONFIG_SPECFILE))
-
-ifdef CONFIG_OPTIMIZATIONS
-export CFLAGS_RELEASE=$(patsubst "%,%,$(CONFIG_OPTIMIZATIONS))
-export CFLAGS_RELEASE:=$(patsubst %",%,$(CFLAGS_RELEASE))
-endif
-
all clean install ipk: $(SUBDIRS)
lupdate lrelease:
@for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done;
opie-lupdate opie-lrelease:
@for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done;
$(subdir-y) : $(if $(CONFIG_LIBQPE),$(QTDIR)/stamp-headers $(OPIEDIR)/stamp-headers) \
$(if $(CONFIG_LIBQPE-X11),$(QTDIR)/stamp-headers-x11 $(OPIEDIR)/stamp-headers-x11 ) \
$(TOPDIR)/library/custom.h
diff --git a/Vars.make b/Vars.make
index eac5cea..b1cdb28 100644
--- a/Vars.make
+++ b/Vars.make
@@ -2,24 +2,28 @@ ifndef QTDIR
$(error QTDIR not set)
endif
prefix=/opt/QtPalmtop
ifeq ($(OPIEDIR),)
export OPIEDIR:=$(TOPDIR)
endif
ifeq ($(IPK_DIR),)
export IPK_DIR:=$(OPIEDIR)
endif
+ifneq ($(wildcard $(TOPDIR)/.config),)
+ include $(TOPDIR)/.config
+endif
+
export QMAKE:=$(OPIEDIR)/qmake/qmake
export QMAKESPECSDIR=$(OPIEDIR)/mkspecs
ifeq ($(QPE_VERSION),)
VERSION_MAJ:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$(OPIEDIR)/library/version.h))
VERSION_MIN:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$(OPIEDIR)/library/version.h))
VERSION_PAT:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$(OPIEDIR)/library/version.h))
QPE_VERSION:=$(VERSION_MAJ).$(VERSION_MIN).$(VERSION_PAT)
ifeq ($(QPE_VERSION),..)
QPE_VERSION=0.9.3
endif
@@ -52,12 +56,30 @@ endif
export QTE_BASEVERSION
ifeq ($(QTE_VERSION),)
ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),)
QTE_VERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION_STR'|sed -e 's/\#define QT_VERSION_STR\t*//;' -e 's/.*"\([^"]*\)".*/\1/;')
else
QTE_VERSION=2.3.5
endif
endif
export QTE_VERSION
export PATH:=$(OPIEDIR)/scripts:$(PATH)
+export QMAKESPEC=$(QMAKESPECSDIR)/$(patsubst "%",%,$(CONFIG_SPECFILE))
+
+ifdef CONFIG_OPTIMIZATIONS
+export CFLAGS_RELEASE=$(patsubst "%,%,$(CONFIG_OPTIMIZATIONS))
+export CFLAGS_RELEASE:=$(patsubst %",%,$(CFLAGS_RELEASE))
+endif
+
+ifeq ($(STRIP),)
+ ifneq ($(CONFIG_TARGET_X86),)
+ STRIP=strip
+ endif
+ ifneq ($(CONFIG_TARGET_IPAQ),)
+ STRIP=arm-linux-strip
+ endif
+ ifneq ($(CONFIG_TARGET_SHARP),)
+ STRIP=arm-linux-strip
+ endif
+endif