rework the makefiles
This commit is contained in:
parent
92c0d44303
commit
ebd5d43621
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
tools/bin
|
||||||
|
tools/obj
|
||||||
|
example/books
|
@ -1,10 +1,11 @@
|
|||||||
BOOKROOT=..
|
BOOKROOT = ..
|
||||||
TOOLSDIR=$(BOOKROOT)/tools
|
TOOLSDIR = $(BOOKROOT)/tools
|
||||||
PSDIR=$(BOOKROOT)/ps
|
PSDIR = $(BOOKROOT)/ps
|
||||||
YAPP=$(TOOLSDIR)/yapp
|
|
||||||
MAKEMANIFEST=$(TOOLSDIR)/makemanifest
|
YAPP = $(TOOLSDIR)/yapp
|
||||||
PSGEN=BOOKROOT=$(BOOKROOT) $(TOOLSDIR)/psgen
|
MAKEMANIFEST = $(TOOLSDIR)/makemanifest
|
||||||
INCLUDERES=(cd $(PSDIR); includeres)
|
PSGEN = env BOOKROOT=$(BOOKROOT) $(TOOLSDIR)/psgen
|
||||||
|
INCLUDERES = (cd $(PSDIR); includeres)
|
||||||
|
|
||||||
code.ps pagenums: filelist footer.ps MANIFEST books
|
code.ps pagenums: filelist footer.ps MANIFEST books
|
||||||
$(PSGEN) -P2 -l3 -DfooterFile=footer.ps filelist pagenums 1 \
|
$(PSGEN) -P2 -l3 -DfooterFile=footer.ps filelist pagenums 1 \
|
||||||
@ -16,8 +17,8 @@ books:
|
|||||||
MANIFEST: filelist
|
MANIFEST: filelist
|
||||||
$(MAKEMANIFEST) $< > $@
|
$(MAKEMANIFEST) $< > $@
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f `cat .gitignore`
|
|
||||||
|
|
||||||
gv%: %.ps
|
gv%: %.ps
|
||||||
gv $<
|
gv $<
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f `cat .gitignore`
|
||||||
|
@ -1,30 +1,28 @@
|
|||||||
all: unmunge repair munge
|
BIN = bin
|
||||||
|
OBJ = obj
|
||||||
|
CFLAGS = -g -O -W -Wall
|
||||||
|
|
||||||
OPT = -g -O -W -Wall
|
BINS = $(addprefix $(BIN)/, unmunge munge repair)
|
||||||
COMMON_OBJS = util.o
|
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)
|
||||||
|
|
||||||
UNMUNGE_OBJS = $(COMMON_OBJS) unmunge.o
|
all: $(BINS)
|
||||||
MUNGE_OBJS = $(COMMON_OBJS) munge.o
|
|
||||||
REPAIR_OBJS = $(COMMON_OBJS) heap.o mempool.o subst.o repair.o
|
|
||||||
|
|
||||||
unmunge: $(UNMUNGE_OBJS)
|
$(BIN)/unmunge: $(UNMUNGE_OBJS)
|
||||||
$(CC) $(OPT) -o $@ $(UNMUNGE_OBJS)
|
$(CC) $(CFLAGS) -o $@ $(UNMUNGE_OBJS)
|
||||||
|
|
||||||
munge: $(MUNGE_OBJS)
|
$(BIN)/munge: $(MUNGE_OBJS)
|
||||||
$(CC) $(OPT) -o $@ $(MUNGE_OBJS)
|
$(CC) $(CFLAGS) -o $@ $(MUNGE_OBJS)
|
||||||
|
|
||||||
repair: $(REPAIR_OBJS)
|
$(BIN)/repair: $(REPAIR_OBJS)
|
||||||
$(CC) $(OPT) -o $@ $(REPAIR_OBJS)
|
$(CC) $(CFLAGS) -o $@ $(REPAIR_OBJS)
|
||||||
|
|
||||||
.c.o:
|
$(OBJ)/%.o: %.c
|
||||||
$(CC) $(OPT) -o $@ -c $<
|
$(CC) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -f *.o munge unmunge repair core *.core
|
rm -f $(OBJ)/* $(BIN)/*.core
|
||||||
|
|
||||||
unmunge.o: util.h
|
cleaner:
|
||||||
munge.o: util.h
|
rm -f $(BIN)/* $(OBJ)/* $(BIN)/*.core
|
||||||
repair.o: heap.h mempool.h util.h subst.h
|
|
||||||
heap.o: heap.h
|
|
||||||
mempool.o: mempool.h
|
|
||||||
subst.o: subst.h
|
|
||||||
|
Loading…
Reference in New Issue
Block a user