36 lines
807 B
Makefile
36 lines
807 B
Makefile
BIN = bin
|
|
OBJ = obj
|
|
DIRS = $(BIN) $(OBJ)
|
|
CFLAGS = -g -O -W -Wall
|
|
|
|
PERL = $(addprefix $(BIN)/, bootstrap bootstrap2 makemanifest psgen sortpages yapp)
|
|
BINS = $(addprefix $(BIN)/, unmunge munge repair)
|
|
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) $(PERL)
|
|
|
|
$(BIN)/%: %.pl
|
|
cp $< $@; chmod +x $@
|
|
|
|
$(BIN)/unmunge: $(UNMUNGE_OBJS)
|
|
$(CC) $(CFLAGS) -o $@ $(UNMUNGE_OBJS)
|
|
|
|
$(BIN)/munge: $(MUNGE_OBJS)
|
|
$(CC) $(CFLAGS) -o $@ $(MUNGE_OBJS)
|
|
|
|
$(BIN)/repair: $(REPAIR_OBJS)
|
|
$(CC) $(CFLAGS) -o $@ $(REPAIR_OBJS)
|
|
|
|
$(OBJ)/%.o: %.c
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
clean:
|
|
rm -f $(OBJ)/* $(BIN)/*.core
|
|
|
|
cleaner:
|
|
rm -rf $(DIRS)
|