Remove Makefile

This commit is contained in:
apio 2022-11-21 18:17:39 +01:00
parent 2aed955e94
commit d97992c519
2 changed files with 0 additions and 40 deletions

2
.gitignore vendored
View File

@ -52,7 +52,5 @@ Module.symvers
Mkfile.old
dkms.conf
obj/
libmtar.a
.vscode/
build/

View File

@ -1,38 +0,0 @@
OUTPUT ?= .
LIBNAME ?= libmtar
OBJ ?= obj
SRC := src
CC ?= gcc
AR ?= ar
CFLAGS ?= -O2 -Wall -Wextra
CFLAGS := ${CFLAGS} -I.
DESTDIR ?= /usr/local
OBJS := $(OBJ)/tar.o \
$(OBJ)/util.o
build: $(OBJS)
@echo -- Creating $(LIBNAME).a
@mkdir -p $(OUTPUT)
$(AR) rcs $(OUTPUT)/$(LIBNAME).a $(OBJS)
$(OBJ)/%.o: $(SRC)/%.c
@echo -- Compiling $^
@mkdir -p $(@D)
$(CC) $(CFLAGS) -o $@ -c $^
install:
@echo -- Installing $(LIBNAME).a
@mkdir -p $(DESTDIR)/{lib,include}
cp $(OUTPUT)/$(LIBNAME).a $(DESTDIR)/lib
cp ./minitar.h $(DESTDIR)/include
clean:
rm -f $(OBJ)/*.o
rm -f $(OUTPUT)/$(LIBNAME).a
uninstall:
@echo -- Removing $(LIBNAME).a
rm -f $(DESTDIR)/lib/$(LIBNAME).a
rm -f $(DESTDIR)/include/minitar.h