Rev 126 | Rev 137 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 126 | Rev 134 | ||
---|---|---|---|
Line 19... | Line 19... | ||
19 | endif |
19 | endif |
20 | 20 | ||
21 | export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
21 | export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
22 | export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
22 | export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
23 | 23 | ||
24 | CFARGSEXTRA = --with-cdebug |
24 | CFARGSEXTRA := --with-cdebug |
25 | 25 | ||
26 | ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) |
26 | ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) |
27 | export CC=$(DEB_HOST_GNU_TYPE)-gcc |
27 | export CC=$(DEB_HOST_GNU_TYPE)-gcc |
28 | CFARGSEXTRA += --host=$(DEB_HOST_GNU_TYPE) |
28 | CFARGSEXTRA += --host=$(DEB_HOST_GNU_TYPE) |
29 | endif |
29 | endif |
30 | 30 | ||
31 | ifeq (,$(DEB_BUILD_ARCH)) |
- | |
32 | DEB_BUILD_ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH) |
31 | DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) |
33 | endif |
- | |
34 | - | ||
35 | CFLAGS_EXTRA = -g |
- | |
36 | CPPFLAGS_EXTRA = -DDEBIAN |
- | |
37 | - | ||
38 | ifdef SSP |
- | |
39 | SSP_FLAGS=-fstack-protector |
32 | DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) |
40 | endif |
- | |
41 | 33 | ||
42 | ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) |
34 | ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) |
43 | CFARGSEXTRA += --without-copt |
35 | CFARGSEXTRA += --without-copt |
44 | else |
36 | else |
- | 37 | ifneq (,$(filter $(DEB_HOST_ARCH), i386)) |
|
- | 38 | CFARGSEXTRA += --without-copt |
|
- | 39 | export DEB_CFLAGS_MAINT_STRIP := -O2 -O3 |
|
- | 40 | export DEB_CFLAGS_MAINT_PREPEND := -O1 |
|
- | 41 | else |
|
45 | CFARGSEXTRA += --with-copt |
42 | CFARGSEXTRA += --with-copt |
- | 43 | endif |
|
46 | endif |
44 | endif |
47 | 45 | ||
48 | ifneq (,$(filter debug,$(DEB_BUILD_OPTIONS))) |
46 | ifneq (,$(filter debug,$(DEB_BUILD_OPTIONS))) |
49 | CFARGSEXTRA += --with-rtldebug |
47 | CFARGSEXTRA += --with-rtldebug |
50 | else |
48 | else |
51 | CFARGSEXTRA += --without-rtldebug |
49 | CFARGSEXTRA += --without-rtldebug |
52 | endif |
50 | endif |
53 | 51 | ||
54 | CFLAGS_EXTRA += $(SSP_FLAGS) |
- | |
55 | # Temporary workaround for hppa linker issues |
52 | # Temporary workaround for hppa linker issues |
56 | ifeq ($(DEB_BUILD_ARCH),hppa) |
53 | ifeq ($(DEB_BUILD_ARCH),hppa) |
57 | CFLAGS_EXTRA += -ffunction-sections |
54 | export DEB_CFLAGS_MAINT_APPEND += -ffunction-sections |
58 | endif |
- | |
59 | - | ||
60 | ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) |
- | |
61 | INSTALL_PROGRAM += -s |
- | |
62 | endif |
55 | endif |
63 | 56 | ||
64 | EXTRA_ARGS=--with-security |
57 | EXTRA_ARGS=--with-security |
65 | 58 | ||
- | 59 | export DEB_CPPFLAGS_MAINT_APPEND := -DDEBIAN |
|
- | 60 | ||
66 | DO_MACHINE_CODE=no |
61 | DO_MACHINE_CODE=no |
67 | ifeq ($(DEB_BUILD_ARCH),i386) |
62 | ifeq ($(DEB_HOST_ARCH),i386) |
68 | DO_MACHINE_CODE=yes |
63 | DO_MACHINE_CODE=yes |
69 | endif |
64 | endif |
70 | ifeq ($(DEB_BUILD_ARCH),powerpc) |
65 | ifeq ($(DEB_HOST_ARCH),powerpc) |
71 | DO_MACHINE_CODE=yes |
66 | DO_MACHINE_CODE=yes |
72 | endif |
67 | endif |
73 | ifeq ($(DEB_BUILD_ARCH),sparc) |
68 | ifeq ($(DEB_BUILD_ARCH),sparc) |
74 | DO_MACHINE_CODE=no |
69 | DO_MACHINE_CODE=no |
75 | endif |
70 | endif |
Line 91... | Line 86... | ||
91 | 86 | ||
92 | ifneq ($(VERSION),$(DEBVERSION)) |
87 | ifneq ($(VERSION),$(DEBVERSION)) |
93 | $(error Version mismatch; buildid.txt: $(VERSION), debian/changelog: $(DEBVERSION)) |
88 | $(error Version mismatch; buildid.txt: $(VERSION), debian/changelog: $(DEBVERSION)) |
94 | endif |
89 | endif |
95 | 90 | ||
- | 91 | CFLAGS := $(shell dpkg-buildflags --get CFLAGS) |
|
- | 92 | CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) |
|
- | 93 | LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) |
|
- | 94 | ||
- | 95 | # --with-lib-path is just to stop configure from adding all the |
|
- | 96 | # standard library directories with -L as well as -R to LDFLAGS |
|
96 | CFARGS=$(CFARGSEXTRA) \ |
97 | CFARGS=$(CFARGSEXTRA) \ |
97 | --with-cflags='$(CFLAGS_EXTRA)' \ |
98 | --with-cflags='`dpkg-buildflags --get CFLAGS`' \ |
98 | --with-cppflags='$(CPPFLAGS_EXTRA)' \ |
99 | --with-cppflags='`dpkg-buildflags --get CPPFLAGS`' \ |
- | 100 | --with-ldflags='`dpkg-buildflags --get LDFLAGS`' \ |
|
- | 101 | --prefix=/usr \ |
|
99 | --with-bignums \ |
102 | --with-bignums \ |
100 | --with-gmp \ |
103 | --with-gmp \ |
101 | --with-poll \ |
104 | --with-poll \ |
102 | --with-zlib \ |
105 | --with-zlib \ |
103 | --with-freetype \ |
106 | --with-freetype \ |