1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR
)/rules.mk
7 include ${ADK_TOPDIR}/mk
/buildhlp.mk
9 ifeq ($(ADK_TARGET_CPU_ARCH
),ppc
)
10 GNU_TARGET_NAME
:= $(subst ppc
,powerpc
,$(GNU_TARGET_NAME
))
12 ifeq ($(ADK_TARGET_CPU_ARCH
),ppc64
)
13 GNU_TARGET_NAME
:= $(subst ppc64
,powerpc64
,$(GNU_TARGET_NAME
))
15 ifeq ($(ADK_TARGET_CPU_ARCH
),ppc64le
)
16 GNU_TARGET_NAME
:= $(subst ppc64le
,powerpc64le
,$(GNU_TARGET_NAME
))
19 TARGET_CFLAGS
:= $(filter-out -fstack-protector-all
,$(TARGET_CFLAGS
))
20 TARGET_LDFLAGS
:= $(filter-out -fstack-protector-all
,$(TARGET_LDFLAGS
))
21 # don't use fast-math for C library
22 TARGET_CFLAGS
:= $(filter-out -ffast-math
,$(TARGET_CFLAGS
))
24 $(WRKBUILD
)/.configured
:
25 (cd
$(WRKBUILD
); PATH
='$(HOST_PATH)' \
26 CROSS_COMPILE
='$(TARGET_CROSS)' \
28 CFLAGS
='$(TARGET_CFLAGS)' \
29 .
/configure
--prefix=/usr \
30 --target
=$(GNU_TARGET_NAME
) \
31 --disable-gcc-wrapper \
35 $(WRKBUILD
)/.compiled
:
36 PATH
='$(HOST_PATH)' $(MAKE
) -C
$(WRKBUILD
) \
37 CC
='$(TARGET_CC)' CFLAGS
='$(TARGET_CFLAGS)' all
40 $(WRKBUILD
)/.installed
: $(WRKBUILD
)/.compiled
41 PATH
='$(HOST_PATH)' $(MAKE
) -C
$(WRKBUILD
) \
42 CC
='$(TARGET_CC)' CFLAGS
='$(TARGET_CFLAGS)' DESTDIR
=$(STAGING_TARGET_DIR
) install
45 include ${ADK_TOPDIR}/mk
/toolchain.mk