From 397246d2f1f55a99eebea55312c776bce99536da Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 22 Jul 2018 17:11:30 +0100 Subject: [PATCH] adding style target (back) --- Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Makefile b/Makefile index 2957bad..9b0f58c 100644 --- a/Makefile +++ b/Makefile @@ -73,6 +73,31 @@ ifeq "$(PLATFORM)" "Windows" LIBSUFFIX := .dll endif +ASTYLE_FLAGS =\ + --style=java \ + --indent=force-tab \ + --attach-closing-while \ + --attach-inlines \ + --attach-classes \ + --indent-classes \ + --indent-modifiers \ + --indent-switches \ + --indent-cases \ + --indent-preproc-block \ + --indent-preproc-define \ + --indent-col1-comments \ + --pad-oper \ + --pad-comma \ + --unpad-paren \ + --delete-empty-lines \ + --align-pointer=name \ + --align-reference=name \ + --break-one-line-headers \ + --add-braces \ + --verbose \ + --formatted \ + --lineend=linux + BINARY := psharp BUILD_DIR := build CFLAGS := $(CFLAGS) -DPH7_LIBRARY_SUFFIX=\"$(LIBSUFFIX)\" @@ -131,3 +156,6 @@ install: $(MD) $(DESTDIR) $(CP) $(BUILD_DIR)/$(BINARY)* $(DESTDIR)/ $(CP) $(BUILD_DIR)/*$(LIBSUFFIX) $(DESTDIR)/ + +style: + astyle $(ASTYLE_FLAGS) --recursive ./*.c,*.h