From 5b3224c60c1045ea5c95efbbe411cce4a8993ab0 Mon Sep 17 00:00:00 2001 From: xavi Date: Sun, 22 Sep 2024 17:47:04 -0700 Subject: [PATCH] Made Makefile for x_ctypes --- x_ctypes/src/Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 x_ctypes/src/Makefile diff --git a/x_ctypes/src/Makefile b/x_ctypes/src/Makefile new file mode 100644 index 0000000..3ee047b --- /dev/null +++ b/x_ctypes/src/Makefile @@ -0,0 +1,25 @@ +.POSIX: + + +TEST_SRC = $(wildcard tests/*c) +TEST_OBJ = $(TEST_SRC:tests/%.c=tests/%.o) +SRC = x_ctypes.c +OBJ = $(SRC:.c=.o) +CFLAGS = -ggdb -Wall -Wextra -I. + +run_testtest: test + ./test + +test: $(TEST_OBJ) $(OBJ) + $(CC) $(CFLAGS) -o $@ $(TEST_OBJ) $(OBJ) + + +$(OBJ): + +$(TEST_OBJ): $(TEST_SRC) + $(CC) $(CFLAGS) -c $(TEST_SRC) -o $@ + +clean: + rm -f test $(OBJ) $(TEST_OBJ) + +.PHONY: all clean_all clean install uninstall test