twitchbot

twitchbot.git
git clone git://git.lenczewski.org/twitchbot.git
Log | Files | Refs | README | LICENSE

commit b9bbb6eeb17a6a150b0af930822d864438500da0
Author: Mikołaj Lenczewski <mblenczewski@gmail.com>
Date:   Mon,  6 May 2024 13:43:02 +0000

Initial commit

Diffstat:
A.editorconfig | 17+++++++++++++++++
A.gitignore | 6++++++
ALICENSE | 18++++++++++++++++++
AREADME | 2++
Abuild.sh | 24++++++++++++++++++++++++
Aclean.sh | 5+++++
Alibtwitch/libtwitch.c | 1+
Alibtwitch/libtwitch.h | 4++++
Atwitchbot/twitchbot.c | 10++++++++++
Atwitchbot/twitchbot.h | 6++++++
10 files changed, 93 insertions(+), 0 deletions(-)

diff --git a/.editorconfig b/.editorconfig @@ -0,0 +1,17 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +charset = utf-8 + +guidelines = 80, 120, 160 + +[*.{c,h}] +indent_style = tab +indent_size = 8 + +[*.{md,txt}] +indent_style = space +indent_size = 2 diff --git a/.gitignore b/.gitignore @@ -0,0 +1,6 @@ +bin/ +obj/ + +docs/ + +**/.*.swp diff --git a/LICENSE b/LICENSE @@ -0,0 +1,18 @@ +The MIT-Zero License + +Copyright (c) 2024 Mikołaj Lenczewski <mblenczewski@gmail.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README b/README @@ -0,0 +1,2 @@ +twitchbot +============================================================================== diff --git a/build.sh b/build.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +CC="${CC:-cc}" +AR="${AR:-ar}" +RANLIB="${RANLIB:-ranlib}" + +WARNINGS="-Wall -Wextra -Wpedantic -Werror" + +CFLAGS="-std=c11 -Og -g" +CPPFLAGS="-UNDEBUG" + +INCS="$(pkg-config --cflags liburing)" +LIBS="$(pkg-config --libs liburing)" + +set -ex + +mkdir -p bin obj + +$CC -o obj/libtwitch.o -c libtwitch/libtwitch.c $CFLAGS $CPPFLAGS +$AR -rcs bin/libtwitch.a obj/libtwitch.o +$RANLIB bin/libtwitch.a + +$CC -o bin/twitchbot twitchbot/twitchbot.c bin/libtwitch.a \ + $CFLAGS $CPPFLAGS -Ilibtwitch $INCS $LIBS diff --git a/clean.sh b/clean.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -ex + +rm -rf bin obj diff --git a/libtwitch/libtwitch.c b/libtwitch/libtwitch.c @@ -0,0 +1 @@ +#include "libtwitch.h" diff --git a/libtwitch/libtwitch.h b/libtwitch/libtwitch.h @@ -0,0 +1,4 @@ +#ifndef LIBTWITCH_H +#define LIBTWITCH_H + +#endif /* LIBTWITCH_H */ diff --git a/twitchbot/twitchbot.c b/twitchbot/twitchbot.c @@ -0,0 +1,10 @@ +#include "twitchbot.h" + +int +main(int argc, char **argv) +{ + (void) argc; + (void) argv; + + return 0; +} diff --git a/twitchbot/twitchbot.h b/twitchbot/twitchbot.h @@ -0,0 +1,6 @@ +#ifndef TWITCHBOT_H +#define TWITCHBOT_H + +#include "libtwitch.h" + +#endif /* TWITCHBOT_H */