aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/Makefile13
-rw-r--r--tools/balloon/Makefile4
-rw-r--r--tools/examples/Makefile12
-rw-r--r--tools/misc/Makefile10
-rw-r--r--tools/misc/miniterm/Makefile2
-rw-r--r--tools/xc/lib/Makefile28
-rw-r--r--tools/xc/py/Makefile5
-rw-r--r--tools/xend/Makefile6
-rw-r--r--xen/Makefile4
-rw-r--r--xenolinux-2.4.25-sparse/Makefile16
-rw-r--r--xenolinux-2.4.25-sparse/arch/xeno/Makefile2
11 files changed, 60 insertions, 42 deletions
diff --git a/docs/Makefile b/docs/Makefile
index 94e84ef877..97836315c8 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -4,7 +4,7 @@
# Xfig and tgif diagrams should be in the fig/ subdirectory.
# DOCUMENTS should be a list of the target Postscript files.
-DOCUMENTS = interface.ps
+DOCUMENTS = interface.ps interface.pdf
GFX = $(patsubst %.obj, %.eps, $(wildcard figs/*.obj))
GFX += $(patsubst %.fig, %.eps, $(wildcard figs/*.fig))
@@ -17,10 +17,17 @@ pristine: clean
clean:
rm -f .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~
rm -f *.ilg *.log *.ind *.toc *.bak core
- rm -f figs/*.eps
+ rm -f figs/*.eps $(DOCUMENTS)
+
+install: $(DOCUMENTS)
+ mkdir -p $(prefix)/usr/share/doc/xen
+ cp -a $(DOCUMENTS) VBD-HOWTO.txt Xeno-1.2-HOWTO.txt $(prefix)/usr/share/doc/xen
+
+%.pdf: %.ps
+ ps2pdf $< $@
%.ps: %.dvi $(GFX)
- dvips -o $@ $<
+ dvips -Ppdf -G0 -o $@ $<
%.dvi: %.tex
latex $*
diff --git a/tools/balloon/Makefile b/tools/balloon/Makefile
index 9c08018cef..baf91f2fc7 100644
--- a/tools/balloon/Makefile
+++ b/tools/balloon/Makefile
@@ -5,8 +5,8 @@ $(TARGET): balloon.c
$(CC) -O2 -Wall -o $(TARGET) balloon.c
install: $(TARGET)
- mkdir -p /usr/bin
- cp -a $(TARGET) /usr/bin
+ mkdir -p $(prefix)/usr/bin
+ cp -a $(TARGET) $(prefix)/usr/bin
dist: $(TARGET)
mkdir -p ../../../install/bin
diff --git a/tools/examples/Makefile b/tools/examples/Makefile
index 626b08c915..0af1c854df 100644
--- a/tools/examples/Makefile
+++ b/tools/examples/Makefile
@@ -14,13 +14,13 @@ INITD = xendomains
all:
install: all
- mkdir -p /usr/bin
- cp -a $(INSTALL) /usr/bin
+ mkdir -p $(prefix)/usr/bin
+ cp -a $(INSTALL) $(prefix)/usr/bin
#chmod 755 $(INSTALL)
- mkdir -p /etc/xc
- for i in $(ETC) ; do [ ! -e /etc/xc/$$i ] && echo Install $$i && cp $$i /etc/xc/ ; done || true
- mkdir -p /etc/xc/auto
- for i in $(INITD) ; do [ -e /etc/init.d/ ] && [ ! -e /etc/init.d/$$i ] && cp $$i /etc/init.d/ ; done || true
+ mkdir -p $(prefix)/etc/xc
+ for i in $(ETC) ; do [ ! -e $(prefix)/etc/xc/$$i ] && echo Install $$i && cp $$i $(prefix)/etc/xc/ ; done || true
+ mkdir -p $(prefix)/etc/xc/auto
+ for i in $(INITD) ; do [ -e $(prefix)/etc/init.d/ ] && [ ! -e $(prefix)/etc/init.d/$$i ] && cp $$i $(prefix)/etc/init.d/ ; done || true
dist: all
mkdir -p ../../../install/bin
diff --git a/tools/misc/Makefile b/tools/misc/Makefile
index 67a1ed9e47..38edf8e3aa 100644
--- a/tools/misc/Makefile
+++ b/tools/misc/Makefile
@@ -15,11 +15,11 @@ all: $(TARGETS)
$(MAKE) -C miniterm
install: all
- mkdir -p /usr/bin
- cp -a $(INSTALL) /usr/bin
- chmod 755 /usr/bin/xen-mkdevnodes
- chmod 755 /usr/bin/xen_nat_enable
- chmod 755 /usr/bin/xen-clone
+ mkdir -p $(prefix)/usr/bin
+ cp -a $(INSTALL) $(prefix)/usr/bin
+ chmod 755 $(prefix)/usr/bin/xen-mkdevnodes
+ chmod 755 $(prefix)/usr/bin/xen_nat_enable
+ chmod 755 $(prefix)/usr/bin/xen-clone
$(MAKE) -C miniterm install
dist: all
diff --git a/tools/misc/miniterm/Makefile b/tools/misc/miniterm/Makefile
index 4a3656fd25..993c156d5e 100644
--- a/tools/misc/miniterm/Makefile
+++ b/tools/misc/miniterm/Makefile
@@ -4,7 +4,7 @@ CFLAGS = -O3 -march=i686 -Wall
all: miniterm
install: all
- cp -a miniterm /usr/bin/
+ cp -a miniterm $(prefix)/usr/bin/
dist: all
cp -a miniterm ../../../../install/bin/
diff --git a/tools/xc/lib/Makefile b/tools/xc/lib/Makefile
index 188478cd25..021d855dee 100644
--- a/tools/xc/lib/Makefile
+++ b/tools/xc/lib/Makefile
@@ -1,4 +1,8 @@
+MAJOR = 1.3
+MINOR = 0
+SONAME = libxc.so.$(MAJOR)
+
CC = gcc
CFLAGS = -c -Wall -O3
CFLAGS += -I../../../xen/include -I../../../xenolinux-sparse/include
@@ -6,7 +10,7 @@ CFLAGS += -I../../../xen/include -I../../../xenolinux-sparse/include
HDRS = $(wildcard *.h)
OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
-LIB = libxc.so
+LIB = libxc.so libxc.so.$(MAJOR) libxc.so.$(MAJOR).$(MINOR)
all: check-for-zlib $(LIB)
@@ -19,17 +23,17 @@ check-for-zlib:
fi
install: all
- mkdir -p /usr/lib
- mkdir -p /usr/include
- cp $(LIB) /usr/lib
- chmod 755 /usr/lib/$(LIB)
- cp xc.h /usr/include
- chmod 644 /usr/include/xc.h
+ mkdir -p $(prefix)/usr/lib
+ mkdir -p $(prefix)/usr/include
+ cp -a $(LIB) $(prefix)/usr/lib
+ chmod 755 $(prefix)/usr/lib/$(LIB)
+ cp xc.h $(prefix)/usr/include
+ chmod 644 $(prefix)/usr/include/xc.h
dist: all
mkdir -p ../../../../install/lib
mkdir -p ../../../../install/include
- cp $(LIB) ../../../../install/lib
+ cp -a $(LIB) ../../../../install/lib
chmod 755 ../../../../install/lib/$(LIB)
cp xc.h ../../../../install/include
chmod 644 ../../../../install/include/xc.h
@@ -46,8 +50,12 @@ rpm: all
mv staging/i386/*.rpm .
rm -rf staging
-libxc.so: $(OBJS)
- $(LD) -shared -o $@ $^ -lz
+libxc.so:
+ ln -sf libxc.so.$(MAJOR) $@
+libxc.so.$(MAJOR):
+ ln -sf libxc.so.$(MAJOR).$(MINOR) $@
+libxc.so.$(MAJOR).$(MINOR): $(OBJS)
+ $(CC) -Wl,-soname -Wl,$(SONAME) -shared -o $@ $^ -lz
%.o: %.c $(HDRS) Makefile
$(CC) $(CFLAGS) -o $@ $<
diff --git a/tools/xc/py/Makefile b/tools/xc/py/Makefile
index ef7dc42173..058450e0dc 100644
--- a/tools/xc/py/Makefile
+++ b/tools/xc/py/Makefile
@@ -1,9 +1,10 @@
-all: ../lib/libxc.so ../lib/xc.h
+all: ../lib/libxc.so.1.3.0 ../lib/xc.h
python setup.py build
install: all
- python setup.py install
+ if [ "$(prefix)" = "" ]; then python setup.py install; \
+ else python setup.py install --root "$(prefix)"; fi
dist: all
mkdir -p ../../../../install/lib/python
diff --git a/tools/xend/Makefile b/tools/xend/Makefile
index ab31f8c628..d070881519 100644
--- a/tools/xend/Makefile
+++ b/tools/xend/Makefile
@@ -11,9 +11,9 @@ BIN = xend
all: $(BIN)
install: all
- mkdir -p /usr/sbin
- cp $(BIN) /usr/sbin
- chmod 755 /usr/sbin/$(BIN)
+ mkdir -p $(prefix)/usr/sbin
+ cp $(BIN) $(prefix)/usr/sbin
+ chmod 755 $(prefix)/usr/sbin/$(BIN)
dist: all
mkdir -p ../../../install/sbin
diff --git a/xen/Makefile b/xen/Makefile
index bf394f721b..4d2238af6b 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -19,8 +19,8 @@ debug:
install: $(TARGET)
gzip -f -9 < $(TARGET) > $(TARGET).gz
- mkdir -p /boot
- cp -a $(TARGET).gz /boot
+ mkdir -p $(prefix)/boot
+ cp -a $(TARGET).gz $(prefix)/boot
dist: $(TARGET)
gzip -f -9 < $(TARGET) > $(TARGET).gz
diff --git a/xenolinux-2.4.25-sparse/Makefile b/xenolinux-2.4.25-sparse/Makefile
index 0438db1213..12d45ac320 100644
--- a/xenolinux-2.4.25-sparse/Makefile
+++ b/xenolinux-2.4.25-sparse/Makefile
@@ -1,15 +1,15 @@
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 25
-EXTRAVERSION = -xeno
+EXTRAVERSION =
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
-ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
-
-# Xeno hack XXX
-ARCH := xeno
-SUBARCH := i386
+# SUBARCH always tells us the underlying machine architecture.
+# Unless overridden, by default ARCH is equivalent to SUBARCH.
+# This will be overriden for Xen and UML builds.
+SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
+ARCH := $(SUBARCH)
KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g")
@@ -87,7 +87,7 @@ endif
# makefile but the arguement can be passed to make if needed.
#
-MODLIB := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
+MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
export MODLIB
#
@@ -425,7 +425,7 @@ depmod_opts := -b $(INSTALL_MOD_PATH) -r
endif
.PHONY: _modinst_post
_modinst_post: _modinst_post_pcmcia
-# if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
+ if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
# Backwards compatibilty symlinks for people still using old versions
# of pcmcia-cs with hard coded pathnames on insmod. Remove
diff --git a/xenolinux-2.4.25-sparse/arch/xeno/Makefile b/xenolinux-2.4.25-sparse/arch/xeno/Makefile
index 710caaddbe..b58b83d293 100644
--- a/xenolinux-2.4.25-sparse/arch/xeno/Makefile
+++ b/xenolinux-2.4.25-sparse/arch/xeno/Makefile
@@ -16,6 +16,8 @@
# Added '-march' and '-mpreferred-stack-boundary' support
#
+override EXTRAVERSION := -xeno$(EXTRAVERSION)
+
LD=$(CROSS_COMPILE)ld -m elf_i386
OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S
LDFLAGS=-e stext