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