Browse Source

Merge 62742d1fa3 into e22cde5c1c

pull/10/merge
Kevin Ernst 4 years ago
committed by GitHub
parent
commit
d9942bf9e1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 22
      Makefile
  2. 14
      Readme.md

22
Makefile

@ -1,10 +1,12 @@
# Makefile for symlinks
CC := gcc
CC = gcc
# append options like `-o owner -g group` here if desired
INSTALL = install
CFLAGS += $(shell getconf LFS_CFLAGS 2>/dev/null)
OWNER = root
GROUP = root
MANDIR = /usr/man/man8/symlinks.8
BINDIR = /usr/local/bin
PREFIX ?= /usr/local
MANDIR ?= $(PREFIX)/share/man/man8
BINDIR ?= $(PREFIX)/bin
.PHONY: all
all: symlinks
@ -13,8 +15,14 @@ symlinks: symlinks.c
$(CC) -Wall -Wstrict-prototypes -O2 $(CFLAGS) -o symlinks symlinks.c
install: all symlinks.8
$(INSTALL) -c -o $(OWNER) -g $(GROUP) -m 755 symlinks $(BINDIR)
$(INSTALL) -c -o $(OWNER) -g $(GROUP) -m 644 symlinks.8 $(MANDIR)
$(INSTALL) -d $(BINDIR)
$(INSTALL) -m 755 symlinks $(BINDIR)
$(INSTALL) -d $(MANDIR)
$(INSTALL) -m 644 symlinks.8 $(MANDIR)
uninstall:
-rm -i $(BINDIR)/symlinks
-rm -i $(MANDIR)/symlinks.8
.PHONY: clean
clean:

14
Readme.md

@ -16,9 +16,19 @@ Installation
### Source:
$ ./configure
$ cd path/to/the/extracted/source
$ make
$ make install
$ make install # or 'sudo make install' if you get an error
If you would like to install to some other location besides the default of `/usr/local`, which usually requires admin privileges, then add `PREFIX=/some/other/path` to the end of your `make install`. For example:
$ make install PREFIX=$HOME/.local
### Pre-compiled binaries:
Many Linux distributions already have a version of Mark Lord's original `symlinks` in their repositories; see https://pkgs.org/search/?q=symlinks for details.
If you use MacPorts, you can `sudo port install symlinks`.
Usage

Loading…
Cancel
Save