File: Makefile

package info (click to toggle)
pwntools 4.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,508 kB
  • sloc: python: 59,870; ansic: 48,351; asm: 45,047; sh: 396; makefile: 256
file content (39 lines) | stat: -rw-r--r-- 823 bytes parent folder | download | duplicates (2)
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
35
36
37
38
39
subdirs=$(shell find . -mindepth 1 -maxdepth 1 -type d | xargs -n1 basename)
tags=base stable beta dev
ROOT=$(shell git rev-parse --show-toplevel)
CMD ?= zsh

ifneq ($(HISTFILE),)
MOUNT_HISTFILE=--mount type=bind,source="$(HISTFILE)",target=/home/pwntools/.history
endif

all: $(tags) $(subdirs)

tags: $(tags)

$(subdirs)::
	@echo "Building $@"
	docker build -t pwntools/pwntools:$(shell basename $(@)) "$@"

develop::
	docker run -it \
		--privileged \
		--net=host \
		--hostname localhost \
		--ulimit core=-1:-1 \
		$(MOUNT_HISTFILE) \
		--mount type=bind,source="$(ROOT)",target=/home/pwntools/pwntools \
		pwntools/pwntools:$(shell basename $(@)) \
		$(CMD)

debug:
	@echo "Subdirs   $(subdirs)"
	@echo "Tags      $(tags)"

clean:
	docker container prune
	docker

FORCE:

.PHONY: all $(subdirs) $(makefiles) $(tags)