summaryrefslogtreecommitdiff
path: root/package/helloworld
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2016-12-08 03:06:31 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2016-12-08 03:06:31 +0100
commite183d9ba8e8bc5309fa145da1809c7e78489f05b (patch)
tree817bac45229ddfd76d7b89a3cb31d4bb517ccce9 /package/helloworld
parent5d1fa7fd4ad18efaa19259fb6277de020057cef5 (diff)
new package helloworld, add a package for regression testing with embedded-test
Diffstat (limited to 'package/helloworld')
-rw-r--r--package/helloworld/Makefile31
-rw-r--r--package/helloworld/src/helloworld.c6
2 files changed, 37 insertions, 0 deletions
diff --git a/package/helloworld/Makefile b/package/helloworld/Makefile
new file mode 100644
index 000000000..c993cde38
--- /dev/null
+++ b/package/helloworld/Makefile
@@ -0,0 +1,31 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= helloworld
+PKG_VERSION:= 1.0
+PKG_RELEASE:= 1
+PKG_DESCR:= hello world
+PKG_SECTION:= base/tests
+
+NO_DISTFILES:= 1
+
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,HELLOWORLD,helloworld,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
+
+CONFIG_STYLE:= manual
+BUILD_STYLE:= manual
+INSTALL_STYLE:= manual
+
+do-build:
+ $(TARGET_CC) $(TARGET_CFLAGS) -o $(WRKBUILD)/helloworld $(WRKBUILD)/helloworld.c
+ $(TARGET_CC) $(TARGET_CFLAGS) -static -o $(WRKBUILD)/helloworld.static $(WRKBUILD)/helloworld.c
+
+helloworld-install:
+ $(INSTALL_DIR) $(IDIR_HELLOWORLD)/usr/bin
+ $(INSTALL_BIN) $(WRKBUILD)/helloworld{,.static} \
+ $(IDIR_HELLOWORLD)/usr/bin
+
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/helloworld/src/helloworld.c b/package/helloworld/src/helloworld.c
new file mode 100644
index 000000000..232880377
--- /dev/null
+++ b/package/helloworld/src/helloworld.c
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+int main() {
+ printf("Hello World\n");
+ return 0;
+}