Jason Jin | a63ce95 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 1 | include $(TOPDIR)/config.mk |
| 2 | |
Jason Jin | d59890b | 2007-08-08 09:01:46 +0800 | [diff] [blame] | 3 | LIB := $(obj)libatibiosemu.a |
Jason Jin | a63ce95 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 4 | |
Jason Jin | 66c757b | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 5 | X86DIR = x86emu |
Jason Jin | a63ce95 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 6 | |
Jason Jin | 66c757b | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 7 | $(shell mkdir -p $(obj)$(X86DIR)) |
| 8 | |
Jean-Christophe PLAGNIOL-VILLARD | 0d52219 | 2008-11-07 22:46:22 +0100 | [diff] [blame] | 9 | COBJS-$(CONFIG_BIOSEMU) = atibios.o biosemu.o besys.o bios.o \ |
Jason Jin | a63ce95 | 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 | 0d52219 | 2008-11-07 22:46:22 +0100 | [diff] [blame] | 17 | COBJS := $(COBJS-y) |
Jason Jin | 66c757b | 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 | a63ce95 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 22 | -D__PPC__ -D__BIG_ENDIAN__ |
| 23 | |
Jason Jin | 66c757b | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 24 | CFLAGS += $(EXTRA_CFLAGS) |
| 25 | HOST_CFLAGS += $(EXTRA_CFLAGS) |
| 26 | |
Jason Jin | a63ce95 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 27 | all: $(LIB) |
| 28 | |
Jason Jin | 66c757b | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 29 | $(LIB): $(obj).depend $(OBJS) |
| 30 | $(AR) $(ARFLAGS) $@ $(OBJS) |
Jason Jin | a63ce95 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 31 | |
| 32 | ######################################################################### |
| 33 | |
Jason Jin | 66c757b | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 34 | include $(SRCTREE)/rules.mk |
Jason Jin | a63ce95 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 35 | |
Jason Jin | 66c757b | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 36 | sinclude $(obj).depend |
Jason Jin | a63ce95 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 37 | |
| 38 | ######################################################################### |