Update copyright year
[openadk.git] / toolchain / musl / Makefile
blobc2ad85706d024b22d5118144ff07612d57058b66
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
5 include ../rules.mk
6 include Makefile.inc
7 include ${ADK_TOPDIR}/mk/buildhlp.mk
9 ifeq ($(ADK_TARGET_CPU_ARCH),ppc)
10 GNU_TARGET_NAME:= $(subst ppc,powerpc,$(GNU_TARGET_NAME))
11 endif
12 ifeq ($(ADK_TARGET_CPU_ARCH),ppc64)
13 GNU_TARGET_NAME:= $(subst ppc64,powerpc64,$(GNU_TARGET_NAME))
14 endif
15 ifeq ($(ADK_TARGET_CPU_ARCH),ppc64le)
16 GNU_TARGET_NAME:= $(subst ppc64le,powerpc64le,$(GNU_TARGET_NAME))
17 endif
18 # not yet possible
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)' \
27 CC='$(TARGET_CC)' \
28 CFLAGS='$(TARGET_CFLAGS)' \
29 ./configure --prefix=/usr \
30 --target=$(GNU_TARGET_NAME) \
31 --disable-gcc-wrapper \
33 touch $@
35 $(WRKBUILD)/.compiled:
36 PATH='$(HOST_PATH)' $(MAKE) -C $(WRKBUILD) \
37 CC='$(TARGET_CC)' CFLAGS='$(TARGET_CFLAGS)' all
38 touch $@
40 $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
41 PATH='$(HOST_PATH)' $(MAKE) -C $(WRKBUILD) \
42 CC='$(TARGET_CC)' CFLAGS='$(TARGET_CFLAGS)' DESTDIR=$(STAGING_TARGET_DIR) install
43 touch $@
45 include ${ADK_TOPDIR}/mk/toolchain.mk