1 DESCRIPTION = "Minimal statically compiled Hello world!"
8 mkdir -p ${WORKDIR}/${P}
10 printf "#include <stdio.h>\nint main(void)\n{\n\tprintf(\"Hello world!\\\n\");\twhile(1);\n\treturn 0;\n}\n" >helloworld.c
14 ${CC} ${CFLAGS} -c -o helloworld.o helloworld.c
15 ${CC} ${LDFLAGS} -o helloworld helloworld.o -static
19 install -d ${D}${bindir}
20 install -m 0755 helloworld ${D}${bindir}/
21 # /bin/init is on purpose, it is tried after /sbin/init and /etc/init
22 # so if a sysvinit is installed, it will be used instead of helloworld
23 install -d ${D}${base_bindir}
24 ln -sf ${bindir}/helloworld ${D}${base_bindir}/init