-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
65 lines (53 loc) · 1.68 KB
/
Makefile
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
NAME := lisa
MAJOR := 2
MINOR := 0
PATCH := 1
VERSION := $(MAJOR).$(MINOR).$(PATCH)
PWD := $(shell pwd)
PATCH := $(PWD)/linux-2.6-lisa.patch
RPMDIR := $(shell rpm --eval %{_topdir})
.PHONY: all dist distopt package patch user rpm install tarball
all:
@echo "This makefile accepts the following targets:"
@echo "dist Make a binary distribution"
@echo "distopt Make a binary distribution with optional binaries"
@echo "tarball Make a source distribution for the whole project"
@echo "patch Make a patch against the original kernel source"
@echo "user Build userspace programs"
@echo "install Install userspace programs to appropriate paths"
dist:
ifndef DST
@echo "You must specify DST"
else
cd userspace && make DIST=1
./mkdist.sh $(DST)
endif
distopt:
ifndef DST
@echo "You must specify DST"
else
cd userspace && make DIST=1
OPT=true ./mkdist.sh $(DST)
endif
tarball:
mkdir $(NAME)
cd userspace && make clean
./depend.sh $(NAME)
cp -r userspace scripts dist README* INSTALL LICENSE Makefile *.sh rpm $(NAME)
tar czvf $(NAME).tar.gz $(NAME)
rm -rf $(NAME)
patch:
./mkpatch.sh -o $(PATCH)
user:
cd userspace && make
install:
cd userspace && make install
install -m 755 -D scripts/rc.fedora $(ROOT)/etc/rc.d/init.d/lisa
install -m 755 -D scripts/xen/network-lisa $(ROOT)/etc/xen/scripts/network-lisa
install -m 755 -D scripts/xen/vif-lisa $(ROOT)/etc/xen/scripts/vif-lisa
mkdir -p $(ROOT)/etc/lisa/tags
touch $(ROOT)/etc/lisa/config.text
rpm:
cp -f rpm/$(NAME).spec $(RPMDIR)/SPECS
cp -f $(NAME).tar.gz $(RPMDIR)/SOURCES/$(NAME)-$(VERSION).tar.gz
rpmbuild --define "lisa_version $(VERSION)" --define "lisa_kapi_version $(shell ./kver.sh)" -ba $(RPMDIR)/SPECS/$(NAME).spec