golb

make and Makefile

Example with task

ARGS=-O3

all: build test

build:
    zig cc main.c $(ARGS) -o main.out

test:
    ./main.out

Note: this is an example for tasks. make is not really used like that

Task usage

make
# will do the first entry so "make all"

make all
# will do first "make build" then "make test"

make build
# will do the zig compilation

make test
# will launch the program

Override variables

make ARGS=
make ARGS=-O2