aboutsummaryrefslogtreecommitdiffstats
path: root/tools/internal/Makefile
blob: 6cbaf9090dd346afd97c0635e67ba71cae4060f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
CC = gcc
XI_CREATE = xi_create
XI_START = xi_start
XI_STOP = xi_stop
XI_DESTROY = xi_destroy
XI_BUILD = xi_build

all: $(XI_CREATE).o $(XI_START).o $(XI_STOP).o $(XI_DESTROY).o $(XI_BUILD).o
	$(CC) -o $(XI_CREATE) $(XI_CREATE).o
	$(CC) -o $(XI_BUILD) $(XI_BUILD).o
	$(CC) -o $(XI_START) $(XI_START).o
	$(CC) -o $(XI_STOP) $(XI_STOP).o
	$(CC) -o $(XI_DESTROY) $(XI_DESTROY).o

$(XI_CREATE).o: $(XI_CREATE).c dom0_defs.h dom0_ops.h hypervisor_defs.h mem_defs.h
	$(CC) -c $(XI_CREATE).c 

internal_domain_build.o: internal_domain_build.c dom0_defs.h dom0_ops.h hypervisor_defs.h mem_defs.h
	$(CC) -c internal_domain_build.c 

$(XI_START).o: $(XI_START).c dom0_defs.h dom0_ops.h hypervisor_defs.h mem_defs.h
	$(CC) -c $(XI_START).c 

$(XI_STOP).o: $(XI_STOP).c dom0_defs.h dom0_ops.h hypervisor_defs.h mem_defs.h
	$(CC) -c $(XI_STOP).c 

$(XI_DESTROY).o: $(XI_DESTROY).c dom0_ops.h dom0_defs.h
	$(CC) -c $(XI_DESTROY).c 

install: all
	cp -a xi_list xi_vifinit $(XI_CREATE) $(XI_BUILD) $(XI_START) $(XI_STOP) $(XI_DESTROY) ../../../install/bin
	chmod 755 ../../../install/bin/xi_list
	chmod 755 ../../../install/bin/xi_vifinit

rpm: all
	rm -rf staging
	mkdir staging
	mkdir staging/i386
	rpmbuild --define "staging$$PWD/staging" --define '_builddir.' --define "_rpmdir$$PWD/staging" -bb rpm.spec
	mv staging/i386/*.rpm .
	rm -rf staging

clean:
	$(RM) *.o *.rpm $(XI_CREATE) $(XI_START) $(XI_STOP) $(XI_DESTROY) $(XI_BUILD)