FossilOrigin-Name: be71954e3fb364d819b61d45a31569346ce9dd47ac695f978c2c60b63134bd41
This commit is contained in:
me@ow.nekobit.net 2022-01-18 23:43:18 +00:00
parent cfb807ec0d
commit 9c758331bf
5 changed files with 64 additions and 0 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
**/*.o
**/*.a

18
Makefile Normal file
View file

@ -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)

View file

@ -12,3 +12,12 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#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 */

24
include/mastodont_types.h Normal file
View file

@ -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 <https://www.gnu.org/licenses/>.
*/
#ifndef MASTODONT_TYPES_H
#define MASTODONT_TYPES_H
typedef struct mastodont {
int https;
char* url;
} mastodont_t;
#endif /* MASTODONT_TYPES_H */

10
src/mastodont.c Normal file
View file

@ -0,0 +1,10 @@
#include <mastodont.h>
int mastodont_init(mastodont_t* data)
{
}
int mastodont_free(mastodont_t* data)
{
}