add: makefile

This commit is contained in:
starnakin 2024-09-07 00:56:56 +02:00
parent 203cca8dff
commit d278d4eb3c
2 changed files with 38 additions and 4 deletions

34
Makefile Normal file
View File

@ -0,0 +1,34 @@
SRCDIR = src
OBJDIR = obj
BUILDDIR = build
SRC := $(wildcard $(SRCDIR)/**/*.c)
OBJ := $(patsubst $(SRCDIR)/%.c,$(OBJDIR)/%.o,$(SRC))
CC = gcc
CFLAGS = -iquoteheaders -c
AR = ar
ARFLAGS =
NAME = libbozo.a
$(OBJDIR)/%.o: $(SRCDIR)/%.c
mkdir -p $(dir $@)
$(CC) $(CFLAGS) $< -o $@
all : $(NAME)
clean :
rm -rf $(OBJDIR)
fclean : clean
rm -rf $(BUILDDIR)
$(NAME) : $(OBJ)
mkdir -p $(BUILDDIR)
$(AR) -rc $(BUILDDIR)/$(NAME) $(OBJ)
re: fclean all
.PHONY: clean fclean test all re

View File

@ -1,7 +1,7 @@
#include "../../headers/kprint.h"
#include "../../headers/string.h"
#include "../../headers/terminal.h"
#include "../../headers/ctype.h"
#include "kprint.h"
#include "string.h"
#include "terminal.h"
#include "ctype.h"
#include <stdarg.h>