aboutsummaryrefslogtreecommitdiff
path: root/exp/cdemu
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-10-04 15:18:33 +0200
committern-peugnet <n.peugnet@free.fr>2021-10-04 15:18:33 +0200
commit7fab7722bdc67184bff18cc7e70d7f2043f5b057 (patch)
tree91cc89bc40652a86f7a5fabcf5a84c248c264ed8 /exp/cdemu
parenta8d4b5b440ed9ac29a0eae7fc47c144d46745078 (diff)
downloaddna-backup-7fab7722bdc67184bff18cc7e70d7f2043f5b057.tar.gz
dna-backup-7fab7722bdc67184bff18cc7e70d7f2043f5b057.zip
first add of cdemu (might not be useful)
Diffstat (limited to 'exp/cdemu')
-rw-r--r--exp/cdemu/.gitignore3
-rw-r--r--exp/cdemu/Makefile63
2 files changed, 66 insertions, 0 deletions
diff --git a/exp/cdemu/.gitignore b/exp/cdemu/.gitignore
new file mode 100644
index 0000000..a0991ff
--- /dev/null
+++ b/exp/cdemu/.gitignore
@@ -0,0 +1,3 @@
+*
+!.gitignore
+!Makefile
diff --git a/exp/cdemu/Makefile b/exp/cdemu/Makefile
new file mode 100644
index 0000000..273a99e
--- /dev/null
+++ b/exp/cdemu/Makefile
@@ -0,0 +1,63 @@
+PKGS := vhba-module-20210418 libmirage-3.2.5 cdemu-daemon-3.2.5
+TARS := $(PKGS:%=%.tar.xz)
+
+
+.PHONY: install
+install: install-cdemu-daemon-3.2.5 install-vhba-module
+
+.PHONY: install-cdemu-daemon-3.2.5
+install-cdemu-daemon-3.2.5: cdemu-daemon-3.2.5/install_manifest.txt
+
+.PHONY: install-libmirage-3.2.5
+install-libmirage-3.2.5: libmirage-3.2.5/install_manifest.txt
+
+.PHONY: install-vhba-module
+install-vhba-module: vhba-module-20210418/vhba.ko
+ -sudo insmod vhba-module-20210418/vhba.ko
+
+.PHONY: uninstall
+uninstall: uninstall-cdemu-daemon-3.2.5 uninstall-libmirage-3.2.5
+ -sudo rmmod vhba
+
+.PHONY: uninstall-%
+uninstall-%: %/install_manifest.txt
+ sort $< | while read line; do \
+ sudo rm -f $$line; \
+ sudo rm -d `dirname $$line` 2>&1 && echo success; \
+ done | uniq | tac | sed '/success/I,+1 d'
+ rm -f $<
+
+.PHONY: clean
+clean:
+ rm -f $(TARS)
+ rm -rf $(PKGS)
+
+cdemu-daemon-3.2.5/install_manifest.txt: | cdemu-daemon-3.2.5/Makefile cdemu-daemon-3.2.5/cdemu-daemon
+ @echo "Don't worry there is an uninstall target"
+ sudo $(MAKE) -C $(@D) install
+
+cdemu-daemon-3.2.5/cdemu-daemon: cdemu-daemon-3.2.5/Makefile
+ $(MAKE) -C $(@D)
+
+cdemu-daemon-3.2.5/Makefile: | install-libmirage-3.2.5 cdemu-daemon-3.2.5
+ cd $(@D) && cmake .
+
+libmirage-3.2.5/install_manifest.txt: libmirage-3.2.5/libmirage.so
+ @echo "Please enter your password. Don't worry there is an uninstall target"
+ sudo $(MAKE) -C $(@D) install
+
+libmirage-3.2.5/libmirage.so: libmirage-3.2.5/Makefile
+ $(MAKE) -C $(@D)
+
+libmirage-3.2.5/Makefile: | libmirage-3.2.5
+ cd $(@D) && cmake .
+
+vhba-module-20210418/vhba.ko: | vhba-module-20210418
+ cd $(@D) && $(MAKE)
+
+$(PKGS): %: %.tar.xz
+ tar -xvf $<
+
+%.tar.xz:
+ wget -q http://downloads.sourceforge.net/cdemu/$@
+