Initial commit
This commit is contained in:
20
Makefile
Normal file
20
Makefile
Normal file
@@ -0,0 +1,20 @@
|
||||
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
|
||||
Reference in New Issue
Block a user