Skip to content
Permalink
Browse files

Replace Makefile with build.zig

  • Loading branch information
tiehuis committed Jul 19, 2017
1 parent 572d12a commit 0704b4455bc23f1dae820fe2791dcc56368e7aaa
Showing with 23 additions and 14 deletions.
  1. +1 −0 .gitignore
  2. +0 −14 Makefile
  3. +22 −0 build.zig
@@ -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.
You can’t perform that action at this time.