From ecbe272c1b9e90a53f8258d6ef5d6b366a295c12 Mon Sep 17 00:00:00 2001 From: Elara6331 Date: Wed, 13 Dec 2023 17:21:18 -0800 Subject: [PATCH] Move source code to src directory --- build.zig | 10 +++++----- {cmd => src/cmd}/detect.zig | 0 {cmd => src/cmd}/info.zig | 0 gpio.zig => src/gpio.zig | 0 index.zig => src/index.zig | 0 uapi.zig => src/uapi.zig | 0 6 files changed, 5 insertions(+), 5 deletions(-) rename {cmd => src/cmd}/detect.zig (100%) rename {cmd => src/cmd}/info.zig (100%) rename gpio.zig => src/gpio.zig (100%) rename index.zig => src/index.zig (100%) rename uapi.zig => src/uapi.zig (100%) diff --git a/build.zig b/build.zig index 22e25c4..3487b56 100644 --- a/build.zig +++ b/build.zig @@ -7,14 +7,14 @@ const Item = struct { /// List of examples const examples = [_]Item{ - .{ .name = "blinky", .src = "_examples/blinky.zig" }, - .{ .name = "multi", .src = "_examples/multi.zig" }, + .{ .name = "blinky", .src = "src/_examples/blinky.zig" }, + .{ .name = "multi", .src = "src/_examples/multi.zig" }, }; /// List of commands const commands = [_]Item{ - .{ .name = "gpiodetect", .src = "cmd/detect.zig" }, - .{ .name = "gpioinfo", .src = "cmd/info.zig" }, + .{ .name = "gpiodetect", .src = "src/cmd/detect.zig" }, + .{ .name = "gpioinfo", .src = "src/cmd/info.zig" }, }; pub fn build(b: *std.Build) !void { @@ -22,7 +22,7 @@ pub fn build(b: *std.Build) !void { const optimize = b.standardOptimizeOption(.{}); // Add the gpio module so it can be used by the package manager - var gpio_module = b.createModule(.{ .source_file = .{ .path = "index.zig" } }); + var gpio_module = b.createModule(.{ .source_file = .{ .path = "src/index.zig" } }); try b.modules.put(b.dupe("gpio"), gpio_module); // Create a step to build all the examples diff --git a/cmd/detect.zig b/src/cmd/detect.zig similarity index 100% rename from cmd/detect.zig rename to src/cmd/detect.zig diff --git a/cmd/info.zig b/src/cmd/info.zig similarity index 100% rename from cmd/info.zig rename to src/cmd/info.zig diff --git a/gpio.zig b/src/gpio.zig similarity index 100% rename from gpio.zig rename to src/gpio.zig diff --git a/index.zig b/src/index.zig similarity index 100% rename from index.zig rename to src/index.zig diff --git a/uapi.zig b/src/uapi.zig similarity index 100% rename from uapi.zig rename to src/uapi.zig