From 581bc2dd768ca0af390b9abb41a5c89f1bca19e3 Mon Sep 17 00:00:00 2001 From: untir_l <87096069+untir-l@users.noreply.github.com> Date: Fri, 18 Feb 2022 19:35:08 +0530 Subject: Reorganise CLI and lib into separate dirs, add doc comments for Doxygen --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 41323c3..7b8e235 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .POSIX: CC = gcc -CFLAGS = -std=c11 -Wall -Wno-unused-function --pedantic-errors -O3 `sdl2-config --cflags` +CFLAGS = -std=c11 -Wall -Wno-unused-function --pedantic-errors -O3 `sdl2-config --cflags` -I./lib/ LDLIBS = `sdl2-config --libs` AR = ar ARFLAGS = rcs @@ -11,14 +11,17 @@ all: libhitomezashi.a hitomezashi_cli libhitomezashi.a: hitomezashi.o $(AR) $(ARFLAGS) libhitomezashi.a hitomezashi.o -hitomezashi.o: hitomezashi.c hitomezashi.h +hitomezashi.o: lib/hitomezashi.c lib/hitomezashi.h + $(CC) -c $(CFLAGS) lib/hitomezashi.c hitomezashi_cli: hitomezashi_cli.o libhitomezashi.a + $(CC) $(LDFLAGS) $(LDLIBS) -o hitomezashi_cli hitomezashi_cli.o libhitomezashi.a -hitomezashi_cli.o: hitomezashi_cli.c hitomezashi_cli.h +hitomezashi_cli.o: cli/hitomezashi_cli.c cli/hitomezashi_cli.h + $(CC) -c $(CFLAGS) -o hitomezashi_cli.o cli/hitomezashi_cli.c format-code: - clang-format -i --verbose *.c *.h + clang-format -i --verbose **/*.c **/*.h clean: rm -f *.a *.o hitomezashi_cli -- cgit v1.2.3-57-g22cb