]> wirehaze git hosting - graph-theory.git/commitdiff

wirehaze git hosting

refacc
authorphfr24 <phfr24@inf.ufpr.br>
Sun, 24 May 2026 15:48:39 +0000 (12:48 -0300)
committerphfr24 <phfr24@inf.ufpr.br>
Sun, 24 May 2026 15:48:39 +0000 (12:48 -0300)
Makefile
graph/pr.h
gt.c
lib/dbg.h [moved from dbg.h with 100% similarity]

index 1af89841bce2fada15a6f3a7f479c66f01692130..6553b1ec0c66b0a57efa8363dc8a62207e7cebe7 100644 (file)
--- 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 $@
index 8d0ebdda72ab5b794831c56d1539df17f1854382..b8810597950b4c8c3dca985a27303d869e12606f 100644 (file)
@@ -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 e9247e47f14660a66cefe6e64f9f7e84ecb25278..0013cf940fa3073ae8deeba5d178367b792bf220 100644 (file)
--- a/gt.c
+++ b/gt.c
@@ -2,7 +2,7 @@
 #include <getopt.h>
 #include <stdio.h>
 #include <stdlib.h>
-#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