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) +{ +} +