From 9c758331bf442209702eedbde74febd3b8157771 Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Tue, 18 Jan 2022 23:43:18 +0000 Subject: [PATCH] Initial FossilOrigin-Name: be71954e3fb364d819b61d45a31569346ce9dd47ac695f978c2c60b63134bd41 --- .gitignore | 3 +++ Makefile | 18 ++++++++++++++++++ include/mastodont.h | 9 +++++++++ include/mastodont_types.h | 24 ++++++++++++++++++++++++ src/mastodont.c | 10 ++++++++++ 5 files changed, 64 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 include/mastodont_types.h create mode 100644 src/mastodont.c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9da9061 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +**/*.o +**/*.a + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..83c9a7e --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +CC ?= cc +CFLAGS = -I ./include/ +SRC = $(wildcard src/*.c) +OBJ = $(patsubst %.c,%.o,$(SRC)) +TARGET = libmastodont.a # shared +AR = ar + +all: static + +static: $(OBJ) + $(AR) rcs $(TARGET) $(OBJ) + +%.o: %.c + $(CC) $(CFLAGS) -c $< -o $@ + +clean: + rm -f $(TARGET) + rm -f $(OBJ) diff --git a/include/mastodont.h b/include/mastodont.h index def58f1..ff4795b 100644 --- a/include/mastodont.h +++ b/include/mastodont.h @@ -12,3 +12,12 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ + +#ifndef MASTODONT_H +#define MASTODONT_H +#include "mastodont_types.h" + +int mastodont_init(mastodont_t* data); +int mastodont_free(mastodont_t* data); + +#endif /* MASTODONT_H */ diff --git a/include/mastodont_types.h b/include/mastodont_types.h new file mode 100644 index 0000000..17cb426 --- /dev/null +++ b/include/mastodont_types.h @@ -0,0 +1,24 @@ +/* + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +#ifndef MASTODONT_TYPES_H +#define MASTODONT_TYPES_H + +typedef struct mastodont { + int https; + char* url; +} mastodont_t; + +#endif /* MASTODONT_TYPES_H */ diff --git a/src/mastodont.c b/src/mastodont.c new file mode 100644 index 0000000..478a564 --- /dev/null +++ b/src/mastodont.c @@ -0,0 +1,10 @@ +#include + +int mastodont_init(mastodont_t* data) +{ +} + +int mastodont_free(mastodont_t* data) +{ +} +