summaryrefslogtreecommitdiff
path: root/package/pcc/Makefile
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-04-12 08:45:07 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2011-04-12 08:46:42 +0200
commitd327bc15c7d66bd2b4c435cd7fe28f0bd128ac4b (patch)
tree3a9ede92252ab6fc4722b589acdd971e70fa69f7 /package/pcc/Makefile
parent990e47b680c06c8a090aa65f18a8bf2b24f857ae (diff)
add pcc compiler
Diffstat (limited to 'package/pcc/Makefile')
-rw-r--r--package/pcc/Makefile46
1 files changed, 46 insertions, 0 deletions
diff --git a/package/pcc/Makefile b/package/pcc/Makefile
new file mode 100644
index 000000000..a20d3dece
--- /dev/null
+++ b/package/pcc/Makefile
@@ -0,0 +1,46 @@
+# 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
+
+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