Add all pages test and accessor functions

This commit is contained in:
accusys
2026-03-29 14:53:26 +08:00
parent c42b62b473
commit e7af73992d
8 changed files with 260 additions and 5 deletions
+16 -5
View File
@@ -6,22 +6,33 @@ SRCS = test_mock_driver.c mock_driver.c
OBJS = $(SRCS:.c=.o)
TARGET = test_mock_driver
all: $(TARGET)
# Test programs
TEST_ALL = test_all_pages
TEST_ALL_SRCS = test_all_pages.c mock_driver.c
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS)
all: $(TARGET) $(TEST_ALL)
$(TARGET): test_mock_driver.o mock_driver.o
$(CC) $(CFLAGS) -o $@ test_mock_driver.o mock_driver.o
$(TEST_ALL): $(TEST_ALL_SRCS)
$(CC) $(CFLAGS) -o $@ $(TEST_ALL_SRCS)
test_mock_driver.o: test_mock_driver.c mock_driver.h
mock_driver.o: mock_driver.c mock_driver.h
test_all_pages.o: test_all_pages.c mock_driver.h
clean:
rm -f $(TARGET) $(OBJS)
rm -f $(TARGET) $(TEST_ALL) *.o
run: $(TARGET)
./$(TARGET)
run-all: $(TEST_ALL)
./$(TEST_ALL)
# Enable verbose output
debug: CFLAGS += -DVERBOSE=1
debug: $(TARGET)
.PHONY: all clean run debug
.PHONY: all clean run run-all debug