Skip to content

Commit

Permalink
feat: init project
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroFnseca committed Aug 28, 2023
0 parents commit fe5bebf
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Binary file added bin/main
Binary file not shown.
Binary file added bin/main.o
Binary file not shown.
7 changes: 7 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <stdio.h>
#include <microhttpd.h>

int main(int argc, char *argv[]) {
printf("Hello, Wolrd!\n");
return 0;
}

0 comments on commit fe5bebf

Please sign in to comment.