Skip to content
Permalink
Browse files
Replace Makefile with build.zig
  • Loading branch information
tiehuis committed Jul 19, 2017
1 parent 572d12a commit 0704b4455bc23f1dae820fe2791dcc56368e7aaa
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
@@ -1,2 +1,3 @@
main
build/
zig-cache

This file was deleted.

@@ -0,0 +1,22 @@
const Builder = @import("std").build.Builder;

pub fn build(b: &Builder) {
const exe = b.addCExecutable("main");
exe.addCompileFlags([][]const u8 {
"-std=c99"
});

const source_files = [][]const u8 {
"compute.c",
"compute_helper.c",
"display.c",
"main.c"
};

for (source_files) |source| {
exe.addSourceFile(source);
}

exe.setOutputPath("./main");
b.default_step.dependOn(&exe.step);
}

0 comments on commit 0704b44

Please sign in to comment.