You are here: Home / presentations / Boxgrinder / Boxgrinder Makefile

Boxgrinder Makefile

by Alan Milligan last modified Sep 05, 2012 05:43 AM
Running boxgrinder with make targets

DEBUG=--debug
VERSION=13
DIST=bastionlinux
OPTIONS=
PLUGBASE=build/appliances/x86_64/$(DIST)/$(VERSION)/$(DIST)$(VERSION)

all: clean bastionlinux.ami


#
# boxgrinder command-line
#
%:
boxgrinder-build $(DEBUG) $(DIST)$(VERSION).appl $(OPTIONS)

#
# call any above rule and post it to AWS
#
%.ami:
$(MAKE) $* OPTIONS="-p bastion-ec2 -d ami"

%.ebs:
$(MAKE) $* OPTIONS="-p bastion-ec2 -d ebs"

%.vmware:
$(MAKE) $* OPTIONS="-p vmware --platform-config type:enterprise,thin_disk:true"

$(PLUGBASE)/vmware-plugin/$(DIST)$(VERSION).vmx:
$(MAKE) $(DIST).vmware

%.ovf: $(PLUGBASE)/vmware-plugin/$(DIST)$(VERSION).vmx
ovftool --compress=9 -tt=ovf -st=vmx $(PLUGBASE)/vmware-plugin/$(DIST)$(VERSION).vmx $(PLUGBASE)/vmware-plugin/$(DIST)$(VERSION).ovf

clean:
rm -rf build/appliances/x86_64/$(DIST)/$(VERSION)/$(DIST)$(VERSION)/* && \
rm -rf log/*.log