From: phfr24 Date: Sun, 24 May 2026 15:48:39 +0000 (-0300) Subject: refacc X-Git-Url: https://git.wirehaze.ovh/graph-theory.git/commitdiff_plain/463854e05c500cac8900eb61e82beac62b5f7df4 refacc --- diff --git a/Makefile b/Makefile index 1af8984..6553b1e 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,6 @@ CC := gcc -CFLAGS := -I. \ - -std=gnu90 \ - -g \ +CPPFLAGS := -I. +CFLAGS := -std=gnu90 \ -pedantic \ -pedantic-errors \ -Wall \ @@ -13,7 +12,8 @@ CFLAGS := -I. \ -Wdouble-promotion \ -Wno-variadic-macros -objs := gt.o graph/adj.o graph/dfs.o graph/pr.o +srcs := $(wildcard **/*.c) +objs := $(srcs:.c=.o) bin := gt all : $(bin) @@ -24,4 +24,3 @@ clean : .PHONY : all clean $(bin) : $(objs) - $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@ diff --git a/graph/pr.h b/graph/pr.h index 8d0ebdd..b881059 100644 --- a/graph/pr.h +++ b/graph/pr.h @@ -1,5 +1,5 @@ -#ifndef GRAPH_PR_H -#define GRAPH_PR_H +#ifndef PR_H +#define PR_H void pr_vertex (unsigned int vi); @@ -7,4 +7,4 @@ void pr_edge (unsigned int vi, unsigned int vj); void pr_arc (unsigned int vi, unsigned int vj); -#endif /* GRAPH_PR_H */ +#endif /* PR_H */ diff --git a/gt.c b/gt.c index e9247e4..0013cf9 100644 --- a/gt.c +++ b/gt.c @@ -2,7 +2,7 @@ #include #include #include -#include "dbg.h" +#include "lib/dbg.h" #include "graph/adj.h" #include "graph/dfs.h" diff --git a/dbg.h b/lib/dbg.h similarity index 100% rename from dbg.h rename to lib/dbg.h