diff options
author | jvech <jmvalenciae@unal.edu.co> | 2023-10-21 11:08:50 -0500 |
---|---|---|
committer | jvech <jmvalenciae@unal.edu.co> | 2023-10-21 11:08:50 -0500 |
commit | 8abcac7b3b42609f349b8a9cb132bae9746ba576 (patch) | |
tree | 89751a747d873576e3ecb60e21483747ea211967 /Makefile | |
parent | 5e7240fbe867e1dd3008e737995cda45d63c5083 (diff) |
setup: Install and uninstall rules added
The man page must have a section specifying where to save configurations
files for loading the network architecture and weights.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1,3 +1,5 @@ +include config.mk + CC = clang CFLAGS = -std=gnu11 -Wall -g BIN = ml @@ -21,6 +23,18 @@ $(OBJDIR)/%.o: src/%.c $(HEADERS) build: $(OBJS) ${CC} ${DLIBS} -o ${BIN} ${OBJS} +install: all + @# binary + install -d $(BINPREFIX) + install -m 755 ${BIN} $(BINPREFIX)/${BIN} + @#man page + install -d $(MANPREFIX)/man1 + install -m 644 doc/ml.1 $(MANPREFIX)/man1/ml.1 + +uninstall: + rm -v $(BINPREFIX)/${BIN} + rm -v $(MANPREFIX)/man1/ml.1 + run: build @./${BIN} train data/sample_data.json | tee data/train_history.txt @./${BIN} predict data/sample_data.json | jq -r '.[] | [values[] as $$val | $$val] | @tsv' > data/net_data.tsv |