makefile: handle missing directory

master
Michele Guerini Rocco 2019-05-15 18:30:14 +02:00
parent 1c3623d719
commit fb0c08bb12
Signed by: rnhmjoj
GPG Key ID: 91BE884FBA4B591A
1 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,6 @@
BIN = bin
OBJ = obj
BIN = bin
OBJ = obj
DIRS = $(BIN) $(OBJ)
CFLAGS = -g -O -W -Wall
BINS = $(addprefix $(BIN)/, unmunge munge repair)
@ -7,6 +8,8 @@ UNMUNGE_OBJS = $(addprefix $(OBJ)/, util.o unmunge.o)
MUNGE_OBJS = $(addprefix $(OBJ)/, util.o munge.o)
REPAIR_OBJS = $(addprefix $(OBJ)/, util.o heap.o mempool.o subst.o repair.o)
$(shell mkdir -p $(DIRS))
all: $(BINS)
$(BIN)/unmunge: $(UNMUNGE_OBJS)
@ -25,4 +28,4 @@ clean:
rm -f $(OBJ)/* $(BIN)/*.core
cleaner:
rm -f $(BIN)/* $(OBJ)/* $(BIN)/*.core
rm -rf $(DIRS)