chore: initial files

This commit is contained in:
2026-05-29 13:49:01 +02:00
parent b6b659ce25
commit 75c5483115
10 changed files with 74 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
BasedOnStyle: LLVM
UseTab: Always
TabWidth: 4
IndentWidth: 4
IndentCaseLabels: true
ColumnLimit: 120
PointerAlignment: Right
AllowShortFunctionsOnASingleLine: None
InsertBraces: true
AllowShortBlocksOnASingleLine: Empty
+1
View File
@@ -0,0 +1 @@
headers += files('minihttp.h', 'parser.h', 'request.h',)
+4
View File
@@ -0,0 +1,4 @@
#ifndef MINIHTTP_MINIHTTP_H
#define MINIHTTP_MINIHTTP_H
#endif
+4
View File
@@ -0,0 +1,4 @@
#ifndef MINIHTTP_PARSER_H
#define MINIHTTP_PARSER_H
#endif
+4
View File
@@ -0,0 +1,4 @@
#ifndef MINIHTTP_REQUEST_H
#define MINIHTTP_REQUEST_H
#endif
+41
View File
@@ -0,0 +1,41 @@
project(
'minihttp',
'c',
version: '0.1',
default_options: ['warning_level=3', 'c_std=c17'],
)
sources = []
headers = []
subdir('src')
subdir('include')
incdir = include_directories('include')
deps = []
libminihttp = static_library(
'minihttp',
sources,
dependencies: deps,
install: true,
include_directories: incdir,
)
install_headers(headers, install_dir: 'minihttp')
# Test executable
exesrc = files('test/test1.c')
executable(
'httptest',
exesrc,
build_by_default: false,
link_with: libminihttp,
include_directories: incdir,
)
# Commands
clangformat = find_program('clang-format', required: false)
if clangformat.found()
all_files = sources + headers + exesrc
run_target('format', command: [clangformat, '-i'] + all_files)
endif
+1
View File
@@ -0,0 +1 @@
sources += files('parser.c', 'request.c',)
+1
View File
@@ -0,0 +1 @@
#include "parser.h"
+1
View File
@@ -0,0 +1 @@
#include "request.h"
+7
View File
@@ -0,0 +1,7 @@
#include <stdio.h>
int main(void) {
puts("minihttp");
return 0;
}