crypto2/Makefile

35 lines
604 B
Makefile
Raw 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 -g -std=c99
RM = /bin/rm -fr
TEST = -D TEST_TECH
PART = -D PART_
EVE = -D EVE_
%.o: %.c
$(CC) -c $(CFLAGS)
build:
$(CC) $(SRC) $(PART)$(part) $(EVE)$(eve) $(CFLAGS) -o $(OUT)/main.o
build_test:
$(CC) $(SRC) $(CFLAGS) $(TEST) -o $(OUT)/main.o
debug:
$(CC) $(SRC) $(PART)$(part) $(CFDEBUG) -o $(OUT)/main.o
clean:
$(RM) $(OBJ) $(OUT)/main.o
run:
$(MAKE) build && ./build/main.o
test:
$(MAKE) build_test && ./build/main.o