-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | Vars.make | 22 |
2 files changed, 23 insertions, 10 deletions
@@ -18,15 +18,13 @@ configs += $(TOPDIR)/core/applets/config.in $(TOPDIR)/core/apps/config.in $(TOPD # # 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"; \ @@ -104,19 +102,12 @@ export include-config := 1 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: @@ -8,12 +8,16 @@ 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)) @@ -58,6 +62,24 @@ ifeq ($(QTE_VERSION),) 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 |