Makefile 708 Bytes
Newer Older
bp's avatar
bp committed
1 2 3
# 

SOURCES = b16.lyx Makefile \
bp's avatar
bp committed
4
	b16.nw b16.v b16.fs b16.fig
bp's avatar
bp committed
5
LYXREV = # set e.g. to 14 for LyX 1.4
bp's avatar
bp committed
6

bp's avatar
bp committed
7
all:	b16.v b16-fig.eps b16-fig.pdf b16.pdf
bp's avatar
bp committed
8

bp's avatar
bp committed
9
files:	cpu.v stack.v alu.v debugger.v b16-defines.v
bp's avatar
bp committed
10

bp's avatar
bp committed
11
%.nw:	%.lyx$(LYXREV)
bp's avatar
bp committed
12 13 14
	-rm $@
	lyx -e literate $<

bp's avatar
bp committed
15
%.tex:	%.nw
16 17
	noweave -delay -latex $< | sed -e 's/1<<dep/1<{}<dep/g' -e 's/>>/>{}>/g' >$@
	pdflatex $@
bp's avatar
bp committed
18

bp's avatar
bp committed
19
%-fig.eps:	%.fig
bp's avatar
bp committed
20 21
	fig2dev -L eps $< $@

bp's avatar
bp committed
22 23 24
%-fig.pdf:	%.fig
	fig2dev -L pdf $< $@

bp's avatar
bp committed
25 26
%.v:	b16.nw
	notangle -R$@ $< >$@
bp's avatar
bp committed
27 28 29 30 31 32 33 34 35 36

%.dvi:	%.tex
	latex $<

%.ps:	%.dvi
	dvips -Pams -Pcmz -Ppdf $< -o $@

%.ps.gz:	%.ps
	gzip <$< >$@

37 38
%.pdf:	%.tex
	pdflatex $<
bp's avatar
bp committed
39 40 41 42 43 44 45 46 47

la:	la.c
	gcc -O2 la.c -o la

dist:	$(SOURCES)
	mkdir b16
	cp $(SOURCES) b16
	tar jcf b16.tar.bz2 b16
	rm -rf b16