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 | |
| 9 | COBJS = 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 | |
Jason Jin | 66c757b | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 17 | SRCS := $(COBJS:.o=.c) |
| 18 | OBJS := $(addprefix $(obj),$(COBJS)) |
| 19 | |
| 20 | EXTRA_CFLAGS += -I. -I./include -I$(TOPDIR)/include \ |
Jason Jin | a63ce95 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 21 | -D__PPC__ -D__BIG_ENDIAN__ |
| 22 | |
Jason Jin | 66c757b | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 23 | CFLAGS += $(EXTRA_CFLAGS) |
| 24 | HOST_CFLAGS += $(EXTRA_CFLAGS) |
| 25 | |
Jason Jin | a63ce95 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 26 | all: $(LIB) |
| 27 | |
Jason Jin | 66c757b | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 28 | $(LIB): $(obj).depend $(OBJS) |
| 29 | $(AR) $(ARFLAGS) $@ $(OBJS) |
Jason Jin | a63ce95 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 30 | |
| 31 | ######################################################################### |
| 32 | |
Jason Jin | 66c757b | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 33 | include $(SRCTREE)/rules.mk |
Jason Jin | a63ce95 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 34 | |
Jason Jin | 66c757b | 2007-08-30 18:19:05 +0800 | [diff] [blame] | 35 | sinclude $(obj).depend |
Jason Jin | a63ce95 | 2007-07-06 08:34:56 +0800 | [diff] [blame] | 36 | |
| 37 | ######################################################################### |