diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/header/Android.mk | 18 | ||||
-rw-r--r-- | tests/header/Makefile | 11 | ||||
-rw-r--r-- | tests/header/hello.c | 20 | ||||
-rw-r--r-- | tests/header/include/hello.h | 16 |
4 files changed, 65 insertions, 0 deletions
diff --git a/tests/header/Android.mk b/tests/header/Android.mk new file mode 100644 index 0000000..81e683b --- /dev/null +++ b/tests/header/Android.mk @@ -0,0 +1,18 @@ +# Copyright (C) 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> +# +# This file is licensed under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := header-test +LOCAL_MODULE_TAGS := optional +LOCAL_SRC_FILES := hello.c +LOCAL_C_INCLUDES := $(LOCAL_PATH)/include + +include $(BUILD_HOST_EXECUTABLE) diff --git a/tests/header/Makefile b/tests/header/Makefile new file mode 100644 index 0000000..ec8e443 --- /dev/null +++ b/tests/header/Makefile @@ -0,0 +1,11 @@ +# Copyright (C) 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> +# +# This file is licensed under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +.PHONY: all + +all: + make -f ../../src/core/main.mk diff --git a/tests/header/hello.c b/tests/header/hello.c new file mode 100644 index 0000000..690b06c --- /dev/null +++ b/tests/header/hello.c @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> + * + * This file is licensed under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + */ + +#include <stdio.h> + +#include <hello.h> + +int main(int argc, char *argv[]) +{ + printf(MESSAGE); + + return 0; +} diff --git a/tests/header/include/hello.h b/tests/header/include/hello.h new file mode 100644 index 0000000..8c31e0c --- /dev/null +++ b/tests/header/include/hello.h @@ -0,0 +1,16 @@ +/* + * Copyright (C) 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> + * + * This file is licensed under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + */ + +#ifndef HELLO_H +#define HELLO_H + +#define MESSAGE "Hello world\n" + +#endif /* HELLO_H */ |