Files
xen/tools/debugger/gdbsx/xg/Makefile
T
Keir Fraser 547cb1849c build: Make XEN_ROOT an absolute path.
Otherwise make can search the path relative to certain standard paths
such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in
Config.mk suffers from this).

Signed-off-by: Keir Fraser <keir@xen.org>
2011-03-17 10:36:25 +00:00

37 lines
840 B
Makefile

XEN_ROOT = $(CURDIR)/../../../..
include ../Rules.mk
XG_HDRS := xg_public.h
XG_OBJS := xg_main.o
CFLAGS += $(INCLUDES) -I. -I../../../include
.PHONY: all
all: build
.PHONY: build
build: xen-headers xg_all.a $(XG_HDRS) $(XG_OBJS) Makefile
# build: mk-symlinks xg_all.a $(XG_HDRS) $(XG_OBJS) Makefile
# build: mk-symlinks xg_all.a
xg_all.a: $(XG_OBJS) Makefile $(XG_HDRS)
ar cr $@ $(XG_OBJS) # problems using -m32 in ld
# $(LD) -b elf32-i386 $(LDFLAGS) -r -o $@ $^
# $(CC) -m32 -c -o $@ $^
xen-headers:
$(MAKE) -C ../../../check
$(MAKE) -C ../../../include
# xg_main.o: xg_main.c Makefile $(XG_HDRS)
#$(CC) -c $(CFLAGS) -o $@ $<
# %.o: %.c $(XG_HDRS) Makefile -- doesn't work as it won't overwrite Rules.mk
#%.o: %.c -- doesn't recompile when .c changed
.PHONY: clean
clean:
rm -rf xen xg_all.a $(XG_OBJS) .*.d