mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
new package:
- add test-rpmatch package for debugging
This commit is contained in:
parent
01d242a4f0
commit
31cc68e8f8
6
packages/debug/install
Normal file
6
packages/debug/install
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/install test
|
||||
$SCRIPTS/install test-rpmatch
|
7
packages/debug/test-rpmatch/build
Normal file
7
packages/debug/test-rpmatch/build
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
|
||||
make -C $BUILD/$1
|
8
packages/debug/test-rpmatch/install
Normal file
8
packages/debug/test-rpmatch/install
Normal 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/test $INSTALL/usr/bin/test-rpmatch
|
14
packages/debug/test-rpmatch/sources/Makefile
Normal file
14
packages/debug/test-rpmatch/sources/Makefile
Normal 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)
|
19
packages/debug/test-rpmatch/sources/test.c
Normal file
19
packages/debug/test-rpmatch/sources/test.c
Normal file
@ -0,0 +1,19 @@
|
||||
#define _SVID_SOURCE
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
if (argc != 2 || strcmp(argv[1], "--help") == 0) {
|
||||
fprintf(stderr, "%s response", argv[0]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
printf("rpmatch() returns: %d", rpmatch(argv[1]));
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user