Skip to content

Commit

Permalink
Add 'make install'
Browse files Browse the repository at this point in the history
  • Loading branch information
danpodeanu committed Apr 28, 2024
1 parent 3cc047f commit 80683d8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
ifeq ($(PREFIX),)
PREFIX := /usr/local
endif

CC=gcc
CFLAGS=-Wall -O3

Expand All @@ -16,6 +20,12 @@ $(ODIR)/%.o: %.c $(HEADER)
udp-redirect: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS)

install: udp-redirect
install -d $(DESTDIR)$(PREFIX)/bin/
install -m 755 udp-redirect $(DESTDIR)$(PREFIX)/bin/
install -d $(DESTDIR)$(PREFIX)/share/man/man1/
install -m 644 udp-redirect.1 $(DESTDIR)$(PREFIX)/share/man/man1/

.PHONY: clean

clean:
Expand Down

0 comments on commit 80683d8

Please sign in to comment.