IDST_DIR ?= ../.. IDC := $(IDST_DIR)/object/stage2/idc IDLIBS := $(IDST_DIR)/function/objects/objects.a JOLT3 := $(IDST_DIR)/function/jolt3 IDFLAGS := -k -g -B $(IDST_DIR)/object/stage2/ -I $(IDST_DIR)/function/objects -I $(JOLT3) LIBS := $(JOLT3)/boot/Parser.o $(JOLT3)/boot/Token.o G2ST := $(JOLT3)/boot/main pbook : pbook.st PBookParser.o $(IDC) $(IDFLAGS) $(IDLIBS) $(LIBS) PBookParser.o $< doc : pbook.pdf pbook.html PBookParser.pdf PBookParser.html test : pbook # ./pbook < PBookParser.g ./pbook < PBookParser.g > pbook.html open pbook.html %.pdf : %.tex pdflatex $< %.tex : %.g pbook ./pbook $< > $@ %.tex : %.st pbook ./pbook $< > $@ %.html : %.g pbook ./pbook --html $< > $@ %.html : %.st pbook ./pbook --html $< > $@ $(G2ST) : make -C $(JOLT3) g2st %.st : %.g $(G2ST) $(G2ST) $< > $(@:.o=.st) || (rm $(@:.o=.st) ; exit 1) %.o : %.st $(G2ST) $(IDC) $(IDFLAGS) -c $(@:.o=.st) num : num.st NumberParser.o $(IDC) $(IDFLAGS) $(IDLIBS) $(LIBS) NumberParser.o $< calc : calc.st CalcParser.o $(IDC) $(IDFLAGS) $(IDLIBS) $(LIBS) CalcParser.o $< clean : .FORCE rm -rf *~ *.so *.so.c *.c *.o *.o.c .gdb_history *.exe *.dSYM pbook rm -f *.tex *.log *.aux *.pdf *.toc *.dvi *.html .FORCE : .PRECIOUS: %.o %.st