From 8fbe3199df77330f26053bd09a34565b838bceb2 Mon Sep 17 00:00:00 2001 From: default Date: Mon, 19 Sep 2022 21:32:36 +0200 Subject: [PATCH] [main.c] New file. --- Makefile | 4 +++- main.c | 13 +++++++++++++ snac.c | 8 -------- 3 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 main.c diff --git a/Makefile b/Makefile index 5187245..f808137 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ CFLAGS=-g -Wall all: snac -snac: snac.o +snac: snac.o main.o $(CC) -L/usr/local/lib *.o -lcurl -lcrypto -o $@ .c.o: @@ -11,5 +11,7 @@ snac: snac.o snac.o: snac.c snac.h \ xs.h xs_io.h xs_encdec.h xs_json.h xs_curl.h xs_openssl.h xs_socket.h xs_httpd.h +main.o: main.c snac.h xs.h + clean: rm -rf *.o *.core snac diff --git a/main.c b/main.c new file mode 100644 index 0000000..9a3f71c --- /dev/null +++ b/main.c @@ -0,0 +1,13 @@ +/* snac - A simple, minimalistic ActivityPub instance */ +/* copyright (c) 2022 grunfink - MIT license */ + +#include "xs.h" + +#include "snac.h" + +int main(int argc, char *argv[]) +{ + srv_open("/home/angel/lib/snac/comam.es"); + + return 0; +} diff --git a/snac.c b/snac.c index ed4499d..95d2814 100644 --- a/snac.c +++ b/snac.c @@ -103,11 +103,3 @@ int srv_open(char *basedir) return ret; } - - -int main(int argc, char *argv[]) -{ - srv_open("/home/angel/lib/snac/comam.es"); - - return 0; -}