File: Makefile

package info (click to toggle)
pt-websocket 0.2-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 188 kB
  • sloc: makefile: 39
file content (34 lines) | stat: -rw-r--r-- 1,182 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
DESTDIR =
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
VERSION = 0.1

GOBUILDFLAGS =
# Alternate flags to use gccgo, allowing cross-compiling for x86 from
# x86_64, and presumably better optimization. Install this package:
#   apt-get install gccgo-multilib
# GOBUILDFLAGS = -compiler gccgo -gccgoflags "-O3 -m32 -static-libgo"

all: pt-websocket-server/pt-websocket-server

pt-websocket-server/pt-websocket-server: pt-websocket-server/*.go websocket/*.go
	cd pt-websocket-server && go build $(GOBUILDFLAGS)

pt-websocket-client/pt-websocket-client: pt-websocket-client/*.go
	cd pt-websocket-client && go build $(GOBUILDFLAGS)

doc/pt-websocket-server.1: obj-$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)/bin/pt-websocket-server
	help2man --no-info --name "WebSocket server pluggable transport" --version-string "$(VERSION)" -o "$@" "$<"

install: pt-websocket-server/pt-websocket-server
	mkdir -p "$(DESTDIR)$(BINDIR)"
	cp -f "$<" "$(DESTDIR)$(BINDIR)"

clean:
	rm -f pt-websocket-server/pt-websocket-server pt-websocket-client/pt-websocket-client
	rm -f doc/pt-websocket-server.1

fmt:
	go fmt ./pt-websocket-server ./pt-websocket-client ./websocket

.PHONY: all install clean fmt