unify ppc ofmem implementations (Igor Kovalenko)
[openbios/afaerber.git] / Makefile
blob9eea22394419cca19b337942eab40b3ab3d002fa
1 HOSTARCH=$(shell config/scripts/archname)
2 ODIRS=$(wildcard obj-*)
3 TARGETS=$(subst obj-,,$(ODIRS))
5 all: requirements info build
7 requirements:
8 @which xsltproc &>/dev/null || ( echo ; echo "Please install libxslt2"; \
9 echo; exit 1 )
11 info:
12 @echo "Building OpenBIOS on $(HOSTARCH) for $(TARGETS)"
14 clean:
15 @printf "Cleaning up..."
16 @rm -rf $(ODIRS) forth.dict.core
17 @find . -type f -name "*~" -exec rm \{\} \;
18 @echo " ok"
20 build:
21 @printf "Building..."
22 @for dir in $(ODIRS); do \
23 $(MAKE) -C $$dir > $$dir/build.log 2>&1 && echo "ok." || \
24 ( echo "error:"; tail -15 $$dir/build.log; exit 1 ) \
25 done
27 build-verbose:
28 @echo "Building..."
29 @for dir in $(ODIRS); do \
30 $(MAKE) -C $$dir || exit 1; \
31 done
33 run:
34 @echo "Running..."
35 @$(ODIR)/openbios-unix $(ODIR)/openbios-unix.dict
38 # The following two targets will only work on x86 so far.
40 $(ODIR)/openbios.iso: $(ODIR)/openbios.multiboot $(ODIR)/openbios-x86.dict
41 @mkisofs -input-charset UTF-8 -r -b boot/grub/stage2_eltorito -no-emul-boot \
42 -boot-load-size 4 -boot-info-table -o $@ utils/iso $^
44 runiso: $(ODIR)/openbios.iso
45 qemu -cdrom $^