Skip to content

Commit

Permalink
Add support for installing and releasing
Browse files Browse the repository at this point in the history
  • Loading branch information
estheruary committed Apr 25, 2019
1 parent 4cd34ee commit 65d3281
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
parse-ssh-cl
parse-ssh-cl.tar.gz

##
# From github/gitignore C.gitignore
Expand Down Expand Up @@ -54,4 +55,4 @@ parse-ssh-cl
modules.order
Module.symvers
Mkfile.old
dkms.conf
dkms.conf
20 changes: 19 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 65d3281

Please sign in to comment.