Skip to content

Commit

Permalink
Add a Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
arteymix committed Aug 19, 2024
1 parent 632542d commit ddafd0c
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
39 changes: 39 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
DESTDIR :=
PREFIX := /usr

CONDA := conda
PIP := pip

all: scripts contrib/RSEM

contrib/RSEM:
$(MAKE) -C $@

scripts:
$(MAKE) -C $@

install: install-python install-systemd-units install-RSEM install-scripts install-conda-env

install-scripts:
$(MAKE) -C scripts install

install-python:
$(PIP) install --prefix="${DESTDIR}${PREFIX}" .

install-systemd-units:
mkdir -p "${DESTDIR}/etc/systemd/system/"
install data/systemd/rnaseq-pipeline-viewer.service data/systemd/rnaseq-pipeline-worker@.service "${DESTDIR}/etc/systemd/system/"
@echo "Remember to run 'systemctl override rnaseq-pipeline-viewer' and 'systemctl override rnaseq-pipeline-worker@' and set CONDA_BIN, CONDA_ENV, GEMMA_USERNAME and GEMMA_PASSWORD environment variables."

install-RSEM:
$(MAKE) -C contrib/RSEM install prefix="${DESTDIR}${PREFIX}"

install-conda-env: environment.yml
mkdir -p "${DESTDIR}/share/rnaseq-pipeline/"
$(CONDA) env create -p "${DESTDIR}${PREFIX}/share/rnaseq-pipeline/conda-env" -f environment.yml

clean:
$(MAKE) -C contrib/RSEM clean
$(MAKE) -C scripts clean

.PHONY: all scripts contrib/RSEM install install-python install-systemd-unit install-RSEM
14 changes: 13 additions & 1 deletion scripts/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
DESTDIR :=
PREFIX := /usr

clean-unused-shm-objects: clean-unused-shm-objects.c
gcc -o $@ $<
$(CC) -o $@ $<

install:
mkdir -p "${DESTDIR}${PREFIX}/bin"
install clean-unused-shm-objects "${DESTDIR}${PREFIX}/bin"

clean:
rm clean-unused-shm-objects

.PHONY: install clean

0 comments on commit ddafd0c

Please sign in to comment.