crypto2/Makefile

35 lines
627 B
Makefile
Raw Permalink Normal View History

2023-10-07 00:22:32 +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
2023-10-07 00:22:32 +00:00
RM = /bin/rm -fr
TEST_F = -D TEST_TECH
TEST = -D TEST_
2023-10-07 00:22:32 +00:00
EVE = -D EVE_
%.o: %.c
$(CC) -c $(CFLAGS)
build:
$(CC) $(SRC) $(TEST)$(test) $(EVE)$(eve) $(CFLAGS) -o $(OUT)/main.o
2023-10-07 00:22:32 +00:00
build_test:
$(CC) $(SRC) $(CFLAGS) $(TEST_F) -o $(OUT)/main.o
2023-10-07 00:22:32 +00:00
debug:
$(CC) $(SRC) $(TEST)$(test) $(CFDEBUG) -o $(OUT)/main.o
2023-10-07 00:22:32 +00:00
clean:
$(RM) $(OBJ) $(OUT)/main.o
run:
$(MAKE) build && ./build/main.o
test:
$(MAKE) build_test && ./build/main.o