summaryrefslogtreecommitdiff
path: root/Vars.make
blob: 330b455e9a283801d36716df52de4df4a5c34df8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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
endif
export QPE_VERSION

SUB_VERSION=$(shell echo $$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$(OPIEDIR)/library/version.h))
ifeq ($(VERSION_CVS),)
    VERSION_CVS:=$(shell date +%Y%m%d)
endif
ifneq ($(filter %snapshot",$(shell cat $(OPIEDIR)/library/version.h|grep QPE_VERSION)),)
    SUB_VERSION:=$(VERSION_CVS)
endif
export SUB_VERSION

ifeq ($(QTE_REVISION),)
    QTE_REVISION=5
endif
export QTE_REVISION

export DEB_VERSION=2.0

ifeq ($(QTE_BASEVERSION),)
    ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),)
        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/;')
    else
        QTE_BASEVERSION=2.3.5
    endif
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
    ifneq ($(CONFIG_TARGET_RAMSES),)
        STRIP=arm-linux-strip
    endif
endif