diff --git a/Makefile b/Makefile index c218036..fd12666 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ OUTPUT ?= . LIBNAME ?= libmtar -OBJDIR ?= obj +OBJ ?= obj SRC := src CC ?= gcc @@ -9,14 +9,14 @@ CFLAGS ?= -O2 -Wall -Wextra CFLAGS := ${CFLAGS} -I. DESTDIR ?= /usr/local/lib -OBJS := $(OBJDIR)/tar.o +OBJS := $(OBJ)/tar.o build: $(OBJS) @echo -- Creating $(LIBNAME).a @mkdir -p $(OUTPUT) $(AR) rcs $(OUTPUT)/$(LIBNAME).a $(OBJS) -$(OBJDIR)/%.o: $(SRC)/%.c +$(OBJ)/%.o: $(SRC)/%.c @echo -- Compiling $^ @mkdir -p $(@D) $(CC) $(CFLAGS) -o $@ -c $^ @@ -27,7 +27,7 @@ install: cp $(OUTPUT)/$(LIBNAME).a $(DESTDIR) clean: - rm -f $(OBJDIR)/*.o + rm -f $(OBJ)/*.o rm -f $(OUTPUT)/$(LIBNAME).a uninstall: