1XEN_ROOT = $(CURDIR)/../../../..
2include $(XEN_ROOT)/tools/firmware/Rules.mk
3
4TARGET = 32bitbios_flat.h
5
6CFLAGS += $(CFLAGS_xeninclude) -I.. -I../../../libacpi
7$(call cc-option-add,CFLAGS,CC,-fno-pic)
8$(call cc-option-add,CFLAGS,CC,-fno-PIE)
9
10SUBDIRS = tcgbios
11
12.PHONY: all
13all: subdirs-all
14	$(MAKE) $(TARGET)
15
16.PHONY: clean
17clean: subdirs-clean
18	rm -rf *.o $(TARGET) $(DEPS_RM)
19
20.PHONY: distclean
21distclean: subdirs-distclean
22
23$(TARGET): 32bitbios_all.o
24	sh mkhex highbios_array 32bitbios_all.o > $@
25
2632bitbios_all.o: 32bitbios.o tcgbios/tcgbiosext.o util.o pmm.o
27	$(LD) $(LDFLAGS_DIRECT) -s -r $^ -o 32bitbios_all.o
28	@nm 32bitbios_all.o |                                \
29	  egrep '^ +U ' >/dev/null && {                      \
30	    echo "There are undefined symbols in the BIOS:"; \
31	    nm -u 32bitbios_all.o;                           \
32	    exit 11;                                         \
33	  } || :
34
35-include $(DEPS_INCLUDE)
36