Jason Jin | ece92f8 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 1 | include $(TOPDIR)/config.mk |
| 2 | |
Jason Jin | 0dc4279 | 2007-08-08 09:01:46 +0800 | [diff] [blame] | 3 | LIB := $(obj)libatibiosemu.a |
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) |
| 25 | HOST_CFLAGS += $(EXTRA_CFLAGS) |
| 26 | |
Jason Jin | ece92f8 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 27 | all: $(LIB) |
| 28 | |
Jason Jin | 1d2ca44 | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 29 | $(LIB): $(obj).depend $(OBJS) |
| 30 | $(AR) $(ARFLAGS) $@ $(OBJS) |
Jason Jin | ece92f8 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 31 | |
| 32 | ######################################################################### |
| 33 | |
Jason Jin | 1d2ca44 | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 34 | include $(SRCTREE)/rules.mk |
Jason Jin | ece92f8 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 35 | |
Jason Jin | 1d2ca44 | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 36 | sinclude $(obj).depend |
Jason Jin | ece92f8 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 37 | |
| 38 | ######################################################################### |