crypto3/Makefile

31 lines
632 B
Makefile
Raw Permalink Normal View History

2023-10-25 05:02:29 +00:00
.PHONY: all test clean build
SRC = src/main.c
OJB = $(SRC:.c=.o)
OUT = build
CC = /usr/bin/gcc
CFLAGS = -ansi -Wall -std=c99 -O0
CFDEBUG = -ansi -Wall -fsanitize=address -g -std=c99
RM = /bin/rm -fr
TEST_F = -D TEST_TECH
TEST = -D TEST_
PART = -D PART_
EVE = -D EVE_
M = -D M
%.o: %.c
$(CC) -c $(CFLAGS)
build:
$(CC) $(SRC) $(PART)$(part) $(EVE)$(eve) $(CFLAGS) -o $(OUT)/main.o
run:
$(CC) $(SRC) $(PART)$(part) $(EVE)$(eve) $(CFDEBUG) -o $(OUT)/main.o && ./build/main.o
clean:
$(RM) $(OBJ) $(OUT)/main.o
run:
$(CC) $(SRC) $(PART)$(part) $(EVE)$(eve) $(CFLAGS) -o $(OUT)/main.o && ./build/main.o $(m)