diff --git a/Makefile b/Makefile index 4df20b7cc5f966dd24b1f90889fb60259e97c1fd..81c5775183e690b025bdfdd5b4024ae393c666a9 100755 --- a/Makefile +++ b/Makefile @@ -10,8 +10,9 @@ OUTDIR=build SRCDIR=src -DEPS=$(wildcard Makefile $(SRCDIR)/*.h) +HDRS=$(wildcard $(SRCDIR)/*.h) SRCS=$(wildcard $(SRCDIR)/*.c) +DEPS=$(HDRS) $(SRCS) Makefile PROJ=$(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))) RBINDIR := $(OUTDIR)/release/bin DBINDIR := $(OUTDIR)/debug/bin @@ -34,7 +35,7 @@ release : OBJS = $(SRCS:$(SRCDIR)/%.c=$(OBJDIR)/%.o) release : CFLAGS += -std='c11' -O2 -Wall -Wextra release : BIN = $(RBINDIR)/$(PROJ) -TIDY=/usr/bin/clang-tidy +TIDY=/usr/bin/clang-tidy -checks='*, -llvm-header-guard' .PHONY : all debug release tidy @@ -47,8 +48,9 @@ debug : $$(BIN) release : $$(BIN) -tidy : $(SRCS) | compile_commands.json - $(TIDY) $^ +tidy : $(SRCS) $(HDRS) + #| compile_commands.json + $(TIDY) $^ -- $(CPPFLAGS) compile_commands.json : $(SRCS) bear make diff --git a/src/app_transport.h b/src/app_transport.h index 6677113d54a41cee7279cf98df531daf4fc61a97..44df9826ca2ecbdc33cf7e2178222d4b8e898bd0 100755 --- a/src/app_transport.h +++ b/src/app_transport.h @@ -4,8 +4,8 @@ * * holds the prototypes for the application proper */ -#ifndef APP_TRANSPORT_H -#define APP_TRANSPORT_H 1 +#ifndef C_QUOIN_APP_TRANSPORT_H +#define C_QUOIN_APP_TRANSPORT_H 1 void Buy_A_Pass(void); void Use_A_Pass(void); diff --git a/src/menu.h b/src/menu.h index 4725d4869d04cdd1194a79b9d447c51df288c3e8..48ae7a689885f9aefa46c27926b078b9a0c62426 100644 --- a/src/menu.h +++ b/src/menu.h @@ -5,8 +5,8 @@ * Holds the prototypes for Menu functionality. There is no Type definition to * support */ -#ifndef MENU_H -#define MENU_H 1 +#ifndef C_QUOIN_MENU_H +#define C_QUOIN_MENU_H 1 int Menu_Prompt_Int(char const *title); int Menu_Prompt_Char(char const *title, char const *choices, char begin, diff --git a/src/pass.h b/src/pass.h index e6b7d5e55131446c65b38c2821ee792238331ba2..9bc94909ea7cad36bd1f8554964155d7f47644d3 100644 --- a/src/pass.h +++ b/src/pass.h @@ -6,8 +6,8 @@ * * holds the prototypes */ -#ifndef PASS_H -#define PASS_H 1 +#ifndef C_QUOIN_PASS_H +#define C_QUOIN_PASS_H 1 #include "term.h" #include "trans.h" @@ -24,8 +24,8 @@ typedef struct Transport_Pass { TransType trans; } Pass; -int Pass_Buy(Pass *pass, UserType user, TermType term, - TransType trans, int amount, time_t expires); +int Pass_Buy(Pass *pass, UserType user, TermType term, TransType trans, + int amount, time_t expires); bool Pass_Use(Pass *pass, TransType trans); int Pass_Check(Pass const *pass); int get_next_id(void); diff --git a/src/term.h b/src/term.h index 517efb3a9beba1078c9016034b3a8b21014b0737..e96eacd470aa8da6bf34d48a3f7537cfc189254a 100644 --- a/src/term.h +++ b/src/term.h @@ -5,8 +5,8 @@ * Holds the type definition for the Term Type (terms of pass) * */ -#ifndef TERM_H -#define TERM_H 1 +#ifndef C_QUOIN_TERM_H +#define C_QUOIN_TERM_H 1 typedef enum _TermType { TERMTYPE_WORKER = 0, diff --git a/src/trans.h b/src/trans.h index d21a45d3b25fcf3b2241710002a4a2df9bc9a1d9..e59114a6fc6a33399e29a4eab42b59de3e14fcb4 100644 --- a/src/trans.h +++ b/src/trans.h @@ -15,8 +15,8 @@ * Holds the function prototypes * */ -#ifndef TRANS_H -#define TRANS_H 1 +#ifndef C_QUOIN_TRANS_H +#define C_QUOIN_TRANS_H 1 #include "user.h" diff --git a/src/user.h b/src/user.h index 6c7bbd30f4d23f9ba09fc404217444e170688e1b..87f32d06ec4068e108343afeff4f1c7ed53142c0 100644 --- a/src/user.h +++ b/src/user.h @@ -4,8 +4,8 @@ * * Holds the type definition for UserType */ -#ifndef USER_H -#define USER_H 1 +#ifndef C_QUOIN_USER_H +#define C_QUOIN_USER_H 1 typedef enum _UserType { USERTYPE_WORKER = 0,