mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-07 04:26:29 +00:00
This initial commit has enough to make a new file system and print out it's structures. Signed-off-by: Zach Brown <zab@versity.com>
34 lines
568 B
Makefile
34 lines
568 B
Makefile
CFLAGS := -Wall -O2 -Werror -D_FILE_OFFSET_BITS=64 -g -mrdrnd -msse4.2
|
|
|
|
BIN := src/scoutfs
|
|
OBJ := $(patsubst %.c,%.o,$(wildcard src/*.c))
|
|
DEPS := $(wildcard */*.d)
|
|
|
|
all: $(BIN)
|
|
|
|
ifneq ($(DEPS),)
|
|
-include $(DEPS)
|
|
endif
|
|
|
|
ifeq ($(V), )
|
|
QU = @echo
|
|
VE = @
|
|
else
|
|
QU = @:
|
|
VE =
|
|
endif
|
|
|
|
$(BIN): $(OBJ)
|
|
$(QU) [BIN $@]
|
|
$(VE)gcc -o $@ $^ -luuid
|
|
|
|
%.o %.d: %.c Makefile sparse.sh
|
|
$(QU) [CC $<]
|
|
$(VE)gcc $(CFLAGS) -MD -MP -MF $*.d -c $< -o $*.o
|
|
$(QU) [SP $<]
|
|
$(VE)./sparse.sh -Wbitwise -D__CHECKER__ $(CFLAGS) $<
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
@rm -f $(BIN) $(OBJ) $(DEPS) .sparse.*
|