Jason Jin | ece92f8 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 1 | include $(TOPDIR)/config.mk |
| 2 | |
Sebastien Carlier | 6d8962e | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 3 | LIB := $(obj)libatibiosemu.o |
Jason Jin | ece92f8 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 4 | |
Jason Jin | 1d2ca44 | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 5 | X86DIR = x86emu |
Jason Jin | ece92f8 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 6 | |
Jason Jin | 1d2ca44 | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 7 | $(shell mkdir -p $(obj)$(X86DIR)) |
| 8 | |
Jean-Christophe PLAGNIOL-VILLARD | 1cb82a9 | 2008-11-07 22:46:22 +0100 | [diff] [blame] | 9 | COBJS-$(CONFIG_BIOSEMU) = atibios.o biosemu.o besys.o bios.o \ |
Jason Jin | ece92f8 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 10 | $(X86DIR)/decode.o \ |
| 11 | $(X86DIR)/ops2.o \ |
| 12 | $(X86DIR)/ops.o \ |
| 13 | $(X86DIR)/prim_ops.o \ |
| 14 | $(X86DIR)/sys.o \ |
| 15 | $(X86DIR)/debug.o |
| 16 | |
Jean-Christophe PLAGNIOL-VILLARD | 1cb82a9 | 2008-11-07 22:46:22 +0100 | [diff] [blame] | 17 | COBJS := $(COBJS-y) |
Jason Jin | 1d2ca44 | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 18 | SRCS := $(COBJS:.o=.c) |
| 19 | OBJS := $(addprefix $(obj),$(COBJS)) |
| 20 | |
| 21 | EXTRA_CFLAGS += -I. -I./include -I$(TOPDIR)/include \ |
Jason Jin | ece92f8 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 22 | -D__PPC__ -D__BIG_ENDIAN__ |
| 23 | |
Jason Jin | 1d2ca44 | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 24 | CFLAGS += $(EXTRA_CFLAGS) |
Mike Frysinger | 9aef738 | 2009-07-19 15:17:03 -0400 | [diff] [blame] | 25 | HOSTCFLAGS += $(EXTRA_CFLAGS) |
Kumar Gala | d02ffbf | 2009-12-16 14:12:11 -0600 | [diff] [blame] | 26 | CPPFLAGS += $(EXTRA_CFLAGS) |
Jason Jin | 1d2ca44 | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 27 | |
Jason Jin | ece92f8 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 28 | all: $(LIB) |
| 29 | |
Jason Jin | 1d2ca44 | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 30 | $(LIB): $(obj).depend $(OBJS) |
Sebastien Carlier | 6d8962e | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 31 | $(call cmd_link_o_target, $(OBJS)) |
Jason Jin | ece92f8 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 32 | |
| 33 | ######################################################################### |
| 34 | |
Jason Jin | 1d2ca44 | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 35 | include $(SRCTREE)/rules.mk |
Jason Jin | ece92f8 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 36 | |
Jason Jin | 1d2ca44 | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 37 | sinclude $(obj).depend |
Jason Jin | ece92f8 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 38 | |
| 39 | ######################################################################### |