.github/workflows: add release.yml for generating an OpenBIOS release
[openbios.git] / Makefile
1 include config-host.mak
2
3 all: requirements info build
4
5 requirements:
6 @which xsltproc &>/dev/null || ( echo ; echo "Please install libxslt2"; \
7 echo; exit 1 )
8
9 info:
10 @echo "Building OpenBIOS for $(TARGETS)"
11
12 clean:
13 @echo "Cleaning up..."
14 @for dir in $(ODIRS); do \
15 $(MAKE) -C $$dir clean; \
16 done
17
18 build: start-build
19 @for dir in $(ODIRS); do \
20 $(MAKE) -C $$dir > $$dir/build.log 2>&1 && echo "ok." || \
21 ( echo "error:"; tail -15 $$dir/build.log; exit 1 ) \
22 done
23
24 SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGETS))
25 SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
26
27 quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
28
29 build-verbose: start-build $(SUBDIR_RULES)
30
31 subdir-%:
32 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C obj-$* V="$(V)" all,)
33
34 start-build:
35 @echo "Building..."
36
37 run:
38 @echo "Running..."
39 @for dir in $(ODIRS); do \
40 $$dir/openbios-unix $$dir/openbios-unix.dict; \
41 done
42
43
44 # The following two targets will only work on x86 so far.
45 #
46 $(ODIR)/openbios.iso: $(ODIR)/openbios.multiboot $(ODIR)/openbios-x86.dict
47 @mkisofs -input-charset UTF-8 -r -b boot/grub/stage2_eltorito -no-emul-boot \
48 -boot-load-size 4 -boot-info-table -o $@ utils/iso $^
49
50 runiso: $(ODIR)/openbios.iso
51 qemu -cdrom $^