aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 9c344a5ac6211ff0b46b8cde1c8959bd6c113470 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.POSIX:

CONFIGFILE = config.mk
include $(CONFIGFILE)

all: krandom

krandom: krandom.o
	$(CC) -o $@ krandom.o $(LDFLAGS)

krandom.o: krandom.c arg.h
	$(CC) -c -o $@ krandom.c $(CFLAGS) $(CPPFLAGS)

install: krandom
	mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
	cp -- krandom "$(DESTDIR)$(PREFIX)/bin/"

uninstall:
	-rm -f -- "$(DESTDIR)$(PREFIX)/bin/krandom"

clean:
	-rm -r -- krandom *.o

.PHONY: all install uninstall clean