zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

build_object.zig (557B) - Raw


      1 const std = @import("std");
      2 
      3 pub fn build(b: *std.Build) void {
      4     const obj = b.addObject(.{
      5         .name = "base64",
      6         .root_module = b.createModule(.{
      7             .root_source_file = b.path("base64.zig"),
      8         }),
      9     });
     10 
     11     const exe = b.addExecutable(.{
     12         .name = "test",
     13         .root_module = b.createModule(.{
     14             .link_libc = true,
     15         }),
     16     });
     17     exe.root_module.addCSourceFile(.{ .file = b.path("test.c"), .flags = &.{"-std=c99"} });
     18     exe.root_module.addObject(obj);
     19     b.installArtifact(exe);
     20 }
     21 
     22 // syntax