diff --git a/tools/Makefile b/tools/Makefile index 522090d..40e49d7 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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)