Remove Makefile
This commit is contained in:
parent
2aed955e94
commit
d97992c519
2
.gitignore
vendored
2
.gitignore
vendored
@ -52,7 +52,5 @@ Module.symvers
|
||||
Mkfile.old
|
||||
dkms.conf
|
||||
|
||||
obj/
|
||||
libmtar.a
|
||||
.vscode/
|
||||
build/
|
38
Makefile
38
Makefile
@ -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
|
Loading…
Reference in New Issue
Block a user