source: code/trunk/Makefile@ 779

Last change on this file since 779 was 775, checked in by contact, 3 years ago

makefile: switch to BSD/GNU make

Let's stop using POSIX make, it's too much of a pain.

File size: 703 bytes
RevLine 
[775]1GO ?= go
2RM ?= rm
3SCDOC ?= scdoc
4GOFLAGS ?=
5PREFIX ?= /usr/local
6BINDIR ?= bin
7MANDIR ?= share/man
[126]8
[169]9all: soju sojuctl doc/soju.1
[126]10
11soju:
12 $(GO) build $(GOFLAGS) ./cmd/soju
13sojuctl:
14 $(GO) build $(GOFLAGS) ./cmd/sojuctl
[169]15doc/soju.1: doc/soju.1.scd
16 $(SCDOC) <doc/soju.1.scd >doc/soju.1
[126]17
18clean:
[775]19 $(RM) -f soju sojuctl doc/soju.1
[530]20install:
[126]21 mkdir -p $(DESTDIR)$(PREFIX)/$(BINDIR)
22 mkdir -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
[506]23 mkdir -p $(DESTDIR)/etc/soju
24 mkdir -p $(DESTDIR)/var/lib/soju
[126]25 cp -f soju sojuctl $(DESTDIR)$(PREFIX)/$(BINDIR)
[169]26 cp -f doc/soju.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
[613]27 [ -f $(DESTDIR)/etc/soju/config ] || cp -f config.in $(DESTDIR)/etc/soju/config
[510]28
[775]29.PHONY: soju sojuctl clean install
Note: See TracBrowser for help on using the repository browser.