add: makefile
This commit is contained in:
parent
203cca8dff
commit
d278d4eb3c
34
Makefile
Normal file
34
Makefile
Normal 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
|
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user