File: Makefile

package info (click to toggle)
openbios-sparc 1.0%2Bsvn640-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 4,412 kB
  • ctags: 12,091
  • sloc: ansic: 57,249; asm: 2,680; xml: 1,335; cpp: 414; makefile: 224; sh: 190
file content (46 lines) | stat: -rw-r--r-- 1,050 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
ODIRS=$(wildcard obj-*)
TARGETS=$(subst obj-,,$(ODIRS))

all: requirements info build

requirements:
	@which xsltproc &>/dev/null || ( echo ; echo "Please install libxslt2"; \
			echo; exit 1 )

info:
	@echo "Building OpenBIOS for $(TARGETS)"

clean:
	@echo "Cleaning up..."
	@for dir in $(ODIRS); do \
		$(MAKE) -C $$dir clean; \
	done

build:
	@printf "Building..."
	@for dir in $(ODIRS); do \
		$(MAKE) -C $$dir > $$dir/build.log 2>&1 && echo "ok." || \
		( echo "error:"; tail -15 $$dir/build.log; exit 1 ) \
	done

build-verbose:
	@echo "Building..."
	@for dir in $(ODIRS); do \
		$(MAKE) -C $$dir || exit 1; \
	done

run:
	@echo "Running..."
	@for dir in $(ODIRS); do \
		$$dir/openbios-unix $$dir/openbios-unix.dict; \
	done


# The following two targets will only work on x86 so far.
# 
$(ODIR)/openbios.iso: $(ODIR)/openbios.multiboot $(ODIR)/openbios-x86.dict
	@mkisofs -input-charset UTF-8 -r -b boot/grub/stage2_eltorito -no-emul-boot \
	-boot-load-size 4 -boot-info-table -o $@ utils/iso $^

runiso: $(ODIR)/openbios.iso
	qemu -cdrom $^