ia64/xen-unstable

view tools/internal/Makefile @ 926:0a901de56d7c

bitkeeper revision 1.588 (3fafd2ccYgSbWe9z2kLiH-DeviUaIA)

Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into labyrinth.cl.cam.ac.uk:/local/scratch/smh22/xeno.bk
author smh22@labyrinth.cl.cam.ac.uk
date Mon Nov 10 18:02:52 2003 +0000 (2003-11-10)
parents 7c2e9edb5190 4aba3a48d64f
children 7c889292df89 106bc1c68738
line source
2 CC = gcc
3 CFLAGS = -Wall -O3
4 CFLAGS += -I../../xen/include -I../../xenolinux-sparse/include
6 HDRS = $(wildcard *.h)
7 SRCS = $(wildcard *.c)
8 OBJS = $(patsubst %.c,%.o,$(SRCS))
10 TARGETS = xi_create xi_start xi_stop xi_destroy xi_build
11 TARGETS += xi_phys_grant xi_list xi_save_linux xi_restore_linux
12 TARGETS += xi_sched_global xi_sched_domain xi_usage xi_vif_params
13 TARGETS += xi_vbd_create xi_vbd_add xi_vbd_list xi_vbd_info
14 INSTALL = $(TARGETS) xi_vifinit xi_helper
16 all: check-for-zlib $(TARGETS)
18 check-for-zlib:
19 @if [ ! -e /usr/include/zlib.h ]; then \
20 echo "***********************************************************"; \
21 echo "ERROR: install zlib header files (http://www.gzip.org/zlib)"; \
22 echo "***********************************************************"; \
23 false; \
24 fi
26 install: all
27 mkdir -p ../../../install/bin
28 cp -a $(INSTALL) ../../../install/bin
29 chmod 755 ../../../install/bin/xi_vifinit
30 chmod 755 ../../../install/bin/xi_helper
32 clean:
33 $(RM) *.o *.rpm $(TARGETS)
35 rpm: all
36 rm -rf staging
37 mkdir staging
38 mkdir staging/i386
39 rpmbuild --define "staging$$PWD/staging" --define '_builddir.' --define "_rpmdir$$PWD/staging" -bb rpm.spec
40 mv staging/i386/*.rpm .
41 rm -rf staging
43 xi_save_linux xi_restore_linux: %: %.c $(HDRS) Makefile
44 $(CC) $(CFLAGS) -lz -o $@ $<
46 %: %.c $(HDRS) Makefile
47 $(CC) $(CFLAGS) -o $@ $<