Skip to content

Commit

Permalink
create build dir in make
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan M. Lederman authored Oct 29, 2018
1 parent 0bc285f commit 7412223
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SRC=mkverobj.cc

CXXFLAGS = -Wpedantic -Wno-psabi -std=c++17 -I.

all: $(OUT)
all: prep $(OUT)

-include $(OUTDIR)/*.d

Expand All @@ -21,7 +21,11 @@ $(OUTDIR)/mkverobj.o: $(SRC) $(DEPS)
$(OUT): $(OBJ)
$(CXX) -o $@ $(OBJ) $(CXXFLAGS) $(LDFLAGS)

prep:
$(shell mkdir -p $(OUTDIR))
@echo build directory created successfully.

clean:
rm -f $(OUTDIR)/*

.PHONY: clean
.PHONY: prep clean

0 comments on commit 7412223

Please sign in to comment.