chore: initial files
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
BasedOnStyle: LLVM
|
||||
UseTab: Always
|
||||
TabWidth: 4
|
||||
IndentWidth: 4
|
||||
IndentCaseLabels: true
|
||||
ColumnLimit: 120
|
||||
PointerAlignment: Right
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
InsertBraces: true
|
||||
AllowShortBlocksOnASingleLine: Empty
|
||||
@@ -0,0 +1 @@
|
||||
headers += files('minihttp.h', 'parser.h', 'request.h',)
|
||||
@@ -0,0 +1,4 @@
|
||||
#ifndef MINIHTTP_MINIHTTP_H
|
||||
#define MINIHTTP_MINIHTTP_H
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,4 @@
|
||||
#ifndef MINIHTTP_PARSER_H
|
||||
#define MINIHTTP_PARSER_H
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,4 @@
|
||||
#ifndef MINIHTTP_REQUEST_H
|
||||
#define MINIHTTP_REQUEST_H
|
||||
|
||||
#endif
|
||||
+41
@@ -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
|
||||
@@ -0,0 +1 @@
|
||||
sources += files('parser.c', 'request.c',)
|
||||
@@ -0,0 +1 @@
|
||||
#include "parser.h"
|
||||
@@ -0,0 +1 @@
|
||||
#include "request.h"
|
||||
@@ -0,0 +1,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
puts("minihttp");
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user