ia64/xen-unstable

view tools/internal/Makefile @ 938:eaaf88bbc222

bitkeeper revision 1.597 (3fb26743975c08pGlW-UntXWf-IBnQ)

Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into labyrinth.cl.cam.ac.uk:/auto/anfs/scratch/labyrinth/br260/xeno.bk
author br260@labyrinth.cl.cam.ac.uk
date Wed Nov 12 17:00:51 2003 +0000 (2003-11-12)
parents 7c889292df89 106bc1c68738
children
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 TARGETS += xi_read_console_ring
15 INSTALL = $(TARGETS) xi_vifinit xi_helper
17 all: check-for-zlib $(TARGETS)
19 check-for-zlib:
20 @if [ ! -e /usr/include/zlib.h ]; then \
21 echo "***********************************************************"; \
22 echo "ERROR: install zlib header files (http://www.gzip.org/zlib)"; \
23 echo "***********************************************************"; \
24 false; \
25 fi
27 install: all
28 mkdir -p ../../../install/bin
29 cp -a $(INSTALL) ../../../install/bin
30 chmod 755 ../../../install/bin/xi_vifinit
31 chmod 755 ../../../install/bin/xi_helper
33 clean:
34 $(RM) *.o *.rpm $(TARGETS)
36 rpm: all
37 rm -rf staging
38 mkdir staging
39 mkdir staging/i386
40 rpmbuild --define "staging$$PWD/staging" --define '_builddir.' --define "_rpmdir$$PWD/staging" -bb rpm.spec
41 mv staging/i386/*.rpm .
42 rm -rf staging
44 xi_build xi_save_linux xi_restore_linux: %: %.c $(HDRS) Makefile
45 $(CC) $(CFLAGS) -lz -o $@ $<
47 %: %.c $(HDRS) Makefile
48 $(CC) $(CFLAGS) -o $@ $<