debug: adding test package for testing and debug

This commit is contained in:
Stephan Raue 2009-08-28 23:00:57 +02:00
parent d5a76054e0
commit 2ca94320a8
4 changed files with 35 additions and 0 deletions

7
packages/debug/test/build Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
. config/options
$SCRIPTS/build toolchain
make -C $BUILD/$1

8
packages/debug/test/install Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
. config/options
PKG_DIR=`find $PACKAGES -type d -name $1`
mkdir -p $INSTALL/usr/bin
cp -f $BUILD/$1/$1 $INSTALL/usr/bin/testprogramm

View File

@ -0,0 +1,14 @@
CC ?= gcc
CFLAGS = -static -Wall -g3 -ggdb3 -Os
LDFLAGS =
SRCS = test.c
PROG = test
all: $(PROG)
$(PROG): $(SRCS)
$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
clean:
rm -f $(PROG)

View File

@ -0,0 +1,6 @@
#include <unistd.h>
int main(void) {
char *msg = "works\n";
return write(STDOUT_FILENO, msg, 6) != 6;
}