Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request moby#2 from rtyler/freebsd-makefile
Introduce a Makefile for building on FreeBSD
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# This file exists to support the non-Docker-based build requirements for | ||
# FreeBSD/Docker | ||
# | ||
export AUTO_GOPATH=1 | ||
export DEST_DIR=$(PWD)/bundles/bin | ||
export RUNC_PATH="$(GOPATH)/src/github.com/opencontainers/runc" | ||
export CONTAINERD_PATH="$(GOPATH)/src/github.com/containerd/containerd" | ||
export LIBNETWORK_PATH="$(GOPATH)/src/github.com/docker/libnetwork" | ||
export TINI_PATH="$(GOPATH)/tini" | ||
|
||
binary: $(DEST_DIR)/docker-containerd $(DEST_DIR)/docker-proxy | ||
./hack/make.sh binary | ||
|
||
$(DEST_DIR)/docker-containerd: prepare | ||
if [ ! -d $(CONTAINERD_PATH) ]; then \ | ||
git clone https://github.com/freebsd-docker/containerd.git $(CONTAINERD_PATH); \ | ||
fi; | ||
cd $(CONTAINERD_PATH) && \ | ||
$(MAKE) && \ | ||
cp bin/containerd $(DEST_DIR)/docker-containerd && \ | ||
cp bin/containerd-shim $(DEST_DIR)/docker-containerd-shim && \ | ||
cp bin/ctr $(DEST_DIR)/docker-containerd-ctr | ||
|
||
$(DEST_DIR)/docker-proxy: prepare | ||
if [ ! -d $(LIBNETWORK_PATH) ]; then \ | ||
git clone https://github.com/freebsd-docker/libnetwork.git $(LIBNETWORK_PATH); \ | ||
fi; | ||
cd $(LIBNETWORK_PATH) && \ | ||
go build -o $(DEST_DIR)/docker-proxy github.com/docker/libnetwork/cmd/proxy | ||
|
||
|
||
runc: | ||
if [ ! -d $(RUNC_PATH) ]; then \ | ||
git clone https://github.com/freebsd-docker/runc.git $(RUNC_PATH); \ | ||
fi; | ||
cd $(RUNC_PATH) && \ | ||
$(MAKE) | ||
|
||
tini: check-depends | ||
if [ ! -d $(TINI_PATH) ]; then \ | ||
git clone https://github.com/krallin/tini.git $(TINI_PATH); \ | ||
fi; | ||
cd $(TINI_PATH) && \ | ||
cmake . && \ | ||
$(MAKE) tini-static | ||
|
||
check-depends: | ||
echo ">> Verify that you have CMake installed" | ||
|
||
prepare: bundles/bin | ||
|
||
bundles/bin: | ||
mkdir -p bundles/bin | ||
|
||
.PHONY: check-depends prepare |