1
0
Dev_Vernam/Makefile

21 lines
329 B
Makefile
Raw Permalink Normal View History

2022-12-15 20:10:44 +01:00
CC = gcc
CFLAGS = -ansi -Wall
SRCDIR = ./src
ODIR = ./out
OFILES = $(subst src/,out/,$(subst .c,.o,$(shell find $(SRCDIR)/ -type f)))
EXE = vernam
but : $(EXE)
$(ODIR)/%.o : $(SRCDIR)/%.c
@mkdir -p $(@D)
$(CC) -c $< -o $@
$(EXE) : $(OFILES)
$(CC) $(CFLAGS) -o $(EXE) $(OFILES)
clean :
-rm -rf $(ODIR)
.PHONY : but clean