CC = gcc CFLAGS = -std=c99 -O3 -Wall -Wextra -Wpedantic -Wstrict-aliasing CFLAGS += -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wcast-align CFLAGS += -Wstrict-prototypes -Wstrict-overflow=5 -Wwrite-strings CFLAGS += -Wcast-qual -Wswitch-default -Wswitch-enum CFLAGS += -Wconversion -Wunreachable-code CFLAGS += -Ic LDFLAGS = CARGO = cargo NAME = z7 SRC = c BIN = target _PROG = main.c PROG = $(addprefix $(SRC)/, $(_PROG)) OBJ = $(_PROG:.c=.o) .PHONY: iter rec clean iter: dirs $(CARGO) build --features iter $(CC) -o $(BIN)/$(NAME) $(PROG) $(CFLAGS) -L. -l:target/debug/libzad7.so rec: dirs $(CARGO) build --features rec $(CC) -o $(BIN)/$(NAME) $(PROG) $(CFLAGS) -L. -l:target/debug/libzad7.so dirs: mkdir -p $(BIN) clean: rm -rf $(addprefix $(BIN)/, $(OBJ)) rm -rf $(BIN)/$(NAME)