Merge remote-tracking branch 'origin/master' into v2-alpha

This commit is contained in:
Christopher Haster
2018-08-04 20:33:09 -05:00
12 changed files with 277 additions and 361 deletions

View File

@@ -1,4 +1,7 @@
TARGET = lfs
TARGET = lfs.a
ifneq ($(wildcard test.c main.c),)
override TARGET = lfs
endif
CC ?= gcc
AR ?= ar
@@ -22,7 +25,7 @@ ifdef WORD
override CFLAGS += -m$(WORD)
endif
override CFLAGS += -I.
override CFLAGS += -std=c99 -Wall -pedantic
override CFLAGS += -std=c99 -Wall -pedantic -Wshadow -Wunused-parameter
all: $(TARGET)
@@ -36,7 +39,9 @@ size: $(OBJ)
test: test_format test_dirs test_files test_seek test_truncate \
test_entries test_interspersed test_alloc test_paths test_attrs \
test_move test_orphan test_corrupt
@rm test.c
test_%: tests/test_%.sh
ifdef QUIET
@./$< | sed -n '/^[-=]/p'
else
@@ -45,7 +50,7 @@ endif
-include $(DEP)
$(TARGET): $(OBJ)
lfs: $(OBJ)
$(CC) $(CFLAGS) $^ $(LFLAGS) -o $@
%.a: $(OBJ)