summaryrefslogtreecommitdiff
path: root/package/pcc/Makefile
blob: 5eb9bfc68c1be499090f220a8ddbe5bc174c1a79 (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
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include $(TOPDIR)/rules.mk

PKG_NAME:=		pcc
PKG_VERSION:=		1.0.0
PKG_RELEASE:=		1
PKG_MD5SUM:=		6e5d851ee57fe58702fe4e80ecd1f852
PKG_DESCR:=		Portable C Compiler
PKG_SECTION:=		lang
PKG_DEPENDS:=		pcc-libs
# binutils
PKG_URL:=		http://pcc.ludd.ltu.se/
PKG_SITES:=		http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/
PKG_NOPARALLEL:=	1

PKG_ARCH_DEPENDS:=	!arm !cris !mips
DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tgz

include $(TOPDIR)/mk/package.mk

$(eval $(call PKG_template,PCC,pcc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

# we cross-compile a native compiler for the target system
CONFIGURE_ARGS+=	--host=${REAL_GNU_TARGET_NAME}
CONFIGURE_ARGS+=	--target=${REAL_GNU_TARGET_NAME}
CONFIGURE_ARGS+=	--with-assembler=/usr/bin/as
CONFIGURE_ARGS+=	--with-linker=/usr/bin/ld

ifeq ($(ADK_TARGET_LIB_GLIBC),y)
TARGET_CPPFLAGS+=	-DADK_FOR_GLIBC
else
ifeq ($(ADK_TARGET_LIB_EGLIBC),y)
TARGET_CPPFLAGS+=	-DADK_FOR_GLIBC
else
ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
TARGET_CPPFLAGS+=	-DADK_FOR_UCLIBC
endif
endif
endif

pcc-install:
	$(INSTALL_DIR) $(IDIR_PCC)
	cd ${WRKINST} && cp -r * ${IDIR_PCC}/

include ${TOPDIR}/mk/pkg-bottom.mk