debuggers.hg

annotate xen/Rules.mk @ 3629:96a5638d65e5

bitkeeper revision 1.1159.212.58 (41fb7bc3vOj1TsfbXqfUKqcc2wjisA)

Merge viper.(none):/home/kaf24/xen-2.0-testing.bk
into viper.(none):/home/kaf24/xen-unstable.bk
author kaf24@viper.(none)
date Sat Jan 29 12:04:19 2005 +0000 (2005-01-29)
parents 30ee9c427a5b 48cc820f2cff
children bbe8541361dd 4294cfa9fad3
rev   line source
kaf24@1482 1
iap10@2479 2 verbose ?= n
kaf24@1482 3 debug ?= n
kaf24@1482 4 debugger ?= n
kaf24@1482 5 perfc ?= n
kaf24@1482 6 trace ?= n
mafetter@2807 7 optimize ?= y
kaf24@1482 8
kaf24@3589 9 # Currently supported architectures: x86_32, x86_64
kaf24@3589 10 COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/)
kaf24@3589 11 TARGET_ARCH ?= $(COMPILE_ARCH)
kaf24@1490 12
kaf24@3589 13 # Set ARCH/SUBARCH appropriately.
kaf24@3628 14 override COMPILE_SUBARCH := $(COMPILE_ARCH)
kaf24@3628 15 override TARGET_SUBARCH := $(TARGET_ARCH)
kaf24@3628 16 override COMPILE_ARCH := $(patsubst x86%,x86,$(COMPILE_ARCH))
kaf24@3628 17 override TARGET_ARCH := $(patsubst x86%,x86,$(TARGET_ARCH))
iap10@274 18
br260@956 19 TARGET := $(BASEDIR)/xen
kaf24@1248 20 HDRS := $(wildcard $(BASEDIR)/include/xen/*.h)
iap10@274 21 HDRS += $(wildcard $(BASEDIR)/include/scsi/*.h)
kaf24@2827 22 HDRS += $(wildcard $(BASEDIR)/include/public/*.h)
kaf24@1195 23 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
mafetter@2807 24 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
kaf24@455 25 # compile.h is always regenerated, but other files shouldn't be rebuilt
kaf24@3567 26 HDRS := $(subst $(BASEDIR)/include/xen/banner.h,,$(HDRS))
kaf24@1248 27 HDRS := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
iap10@274 28
iap10@274 29 C_SRCS := $(wildcard *.c)
iap10@274 30 S_SRCS := $(wildcard *.S)
iap10@274 31 OBJS := $(patsubst %.S,%.o,$(S_SRCS))
iap10@274 32 OBJS += $(patsubst %.c,%.o,$(C_SRCS))
iap10@274 33
iap10@274 34 # Note that link order matters!
iap10@274 35 ALL_OBJS := $(BASEDIR)/common/common.o
iap10@274 36 ALL_OBJS += $(BASEDIR)/drivers/char/driver.o
kaf24@1319 37 ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o
iap10@274 38 ALL_OBJS += $(BASEDIR)/drivers/pci/driver.o
kaf24@1195 39 ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
iap10@274 40
iap10@274 41 HOSTCC = gcc
iap10@274 42 HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
iap10@274 43
kaf24@3013 44 test-gcc-flag = $(shell gcc -v --help 2>&1 | grep -q " $(1) " && echo $(1))
kaf24@3013 45
kaf24@1195 46 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
iap10@274 47
kaf24@1312 48 ifneq ($(debug),y)
kaf24@1312 49 CFLAGS += -DNDEBUG
kaf24@2097 50 ifeq ($(verbose),y)
kaf24@2097 51 CFLAGS += -DVERBOSE
kaf24@2097 52 endif
kaf24@2097 53 else
kaf24@2097 54 CFLAGS += -DVERBOSE
kaf24@1312 55 endif
kaf24@1312 56
kaf24@1482 57 ifeq ($(debugger),y)
kaf24@1482 58 CFLAGS += -DXEN_DEBUGGER
kaf24@1312 59 endif
kaf24@1312 60
kaf24@1482 61 ifeq ($(perfc),y)
kaf24@1482 62 CFLAGS += -DPERF_COUNTERS
kaf24@1283 63 endif
kaf24@1283 64
iap10@1402 65 ifeq ($(trace),y)
iap10@1402 66 CFLAGS += -DTRACE_BUFFER
iap10@1402 67 endif
iap10@1402 68
kaf24@3013 69 CFLAGS := $(strip $(CFLAGS))
kaf24@3013 70
iap10@274 71 %.o: %.c $(HDRS) Makefile
kaf24@547 72 $(CC) $(CFLAGS) -c $< -o $@
iap10@274 73
iap10@274 74 %.o: %.S $(HDRS) Makefile
iap10@274 75 $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@
iap10@274 76