Skip to content

Commit 1642e2e

Browse files
authored
Repair makefile (#41)
This Makefile both follows convention better, and uses sane defaults For example, make has default rules for building. All projects, unless they are certain, should use them. So this does. This also adds `install` without falling into the `-D` portability trap. This program should never be accepted as a package to any Linux distribution.
1 parent 75a89fe commit 1642e2e

3 files changed

Lines changed: 20 additions & 20 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
temp
1+
dollarskip
22
.vscode
33

44
# PKGBUILD files

Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.PHONY: all clean uninstall install
2+
3+
CC ?= gcc
4+
STRIP ?= strip
5+
PREFIX ?= /usr/local
6+
CFLAGS += -g -Wall -Wextra -Wpedantic
7+
8+
all: dollarskip
9+
10+
install: dollarskip
11+
$(STRIP) dollarskip
12+
install -d $(DESTDIR)$(PREFIX)/bin
13+
install -m 755 dollarskip $(DESTDIR)$(PREFIX)/bin/\$
14+
15+
uninstall:
16+
rm -f $(DESTDIR)$(PREFIX)/bin/\$
17+
18+
clean:
19+
rm -f dollarskip

makefile

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)