Add support for installing and releasing

master v0.1
Estelle Poulin 6 years ago
parent 4cd34ee2bc
commit 65d32812c4

3
.gitignore vendored

@ -1,4 +1,5 @@
parse-ssh-cl
parse-ssh-cl.tar.gz
##
# From github/gitignore C.gitignore
@ -54,4 +55,4 @@ parse-ssh-cl
modules.order
Module.symvers
Mkfile.old
dkms.conf
dkms.conf

@ -1,15 +1,33 @@
CC=gcc
NAME=parse-ssh-cl
CFLAGS=-I.
DEPS = utils.h
OBJ = utils.o main.o
PREFIX = $(HOME)/.local
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
parse-ssh-cl: $(OBJ)
$(NAME): $(OBJ)
$(CC) -o $@ $^ $(CFLAGS)
.PHONY: clean
clean:
rm -f *.o *~ core *~
$(NAME).tar.gz: $(NAME)
tar -czf $(NAME).tar.gz $(NAME)
.PHONY: release
release: $(NAME).tar.gz
$(PREFIX)/bin/$(NAME): $(NAME)
install -m 0755 $(NAME) "$(PREFIX)/bin/$(NAME)"
.PHONY: install
install: $(PREFIX)/bin/$(NAME)

Loading…
Cancel
Save