crypto1/Makefile

25 lines
468 B
Makefile
Raw Permalink Normal View History

2023-09-27 14:31:40 +00:00
SRC = src/main.c
OJB = $(SRC:.c=.o)
OUT = build
CC = /usr/bin/gcc
2023-09-27 21:07:47 +00:00
CFLAGS = -ansi -Wall -std=c99 -O0
2023-09-27 14:31:40 +00:00
CFDEBUG = -ansi -Wall -fsanitize=address -g -std=c99
RM = /bin/rm -f $(OUT)
2023-09-27 21:07:47 +00:00
PART = -D PART
2023-09-27 14:31:40 +00:00
%.o: %.c
$(CC) -c $(CFLAGS)
build:
$(CC) $(SRC) $(CFLAGS) -o $(OUT)/main.o
debug:
2023-09-27 21:07:47 +00:00
$(CC) $(SRC) $(PART)$(part) $(CFDEBUG) -o $(OUT)/main.o
2023-09-27 14:31:40 +00:00
clean:
$(RM) $(OBJ) $(OUT)/main.o
2023-09-27 21:07:47 +00:00
run:
$(CC) $(SRC) $(PART)$(part) $(CFLAGS) -o $(OUT)/main.o && ./build/main.o