diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..600d2d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1c51ac1 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +CC = gcc +CFLAGS = -Wall -g +LIBS = -lmicrohttpd +SRCDIR = src +BINDIR = bin + +SOURCES = $(wildcard $(SRCDIR)/*.c) +OBJECTS = $(patsubst $(SRCDIR)/%.c, $(BINDIR)/%.o, $(SOURCES)) + +all: $(BINDIR)/main + +$(BINDIR)/main: $(OBJECTS) + $(CC) $(CFLAGS) -o $@ $^ $(LIBS) + +$(BINDIR)/%.o: $(SRCDIR)/%.c + $(CC) $(CFLAGS) -c -o $@ $< + +clean: + rm -f $(BINDIR)/*.o $(BINDIR)/main diff --git a/bin/main b/bin/main new file mode 100755 index 0000000..82fed1b Binary files /dev/null and b/bin/main differ diff --git a/bin/main.o b/bin/main.o new file mode 100644 index 0000000..cf7be2b Binary files /dev/null and b/bin/main.o differ diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..ffd55e6 --- /dev/null +++ b/src/main.c @@ -0,0 +1,7 @@ +#include +#include + +int main(int argc, char *argv[]) { + printf("Hello, Wolrd!\n"); + return 0; +}