-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
37 lines (31 loc) · 1.2 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
.PHONY: all install clean \
library server ruby shell examples tests \
library-install server-install ruby-install shell-install examples-install \
library-clean server-clean ruby-clean shell-clean examples-clean
DEBIAN := $(shell cat /etc/os-release 2>/dev/null | grep 'Debian' >/dev/null && echo "true" || echo "false")
FEDORA := $(shell cat /etc/os-release 2>/dev/null | grep 'Fedora' >/dev/null && echo "true" || echo "false")
SUSE := $(shell cat /etc/os-release 2>/dev/null | grep 'SUSE' >/dev/null && echo "true" || echo "false")
UBUNTU := $(shell cat /etc/os-release 2>/dev/null | grep 'Ubuntu' >/dev/null && echo "true" || echo "false")
MACOS := $(shell sw_vers 2>/dev/null | grep 'macOS' >/dev/null && echo "true" || echo "false")
ifeq ($(MACOS),true)
TWOPENCE_DIR = /usr/local/lib/twopence-0
else
TWOPENCE_DIR = /usr/lib/twopence-0
endif
SUBDIRS = \
library \
server \
ruby \
python \
shell \
tests \
examples
all clean install::
@for dir in $(SUBDIRS); do \
echo "make -C $$dir $@"; make -C $$dir $@ || exit 1; \
done
install::
mkdir -p $(DESTDIR)/$(TWOPENCE_DIR)
cp add_virtio_channel.sh $(DESTDIR)/$(TWOPENCE_DIR)/
tests: server shell
make -C tests $@