include unittest.mk
include assert.mk
include import.mk

ifdef $(call unittest,with_module_prefix)

$(call import,test/module.mk,bob)
$(call assert_equal, $(bob.variable1), v1)

endif
ifdef $(call unittest,with_module_prefix_and_spaces)

$(call import, test/module.mk , sue )
$(call assert_equal, $(sue.variable1), v1)

endif
ifdef $(call unittest,without_module_prefix)

$(call import,test/module.mk)
$(call assert_equal, $(variable1), v1)

endif

Add checks for defined variables

include unittest.mk
include assert.mk
include import.mk

ifdef $(call unittest,with_module_prefix)

$(call import,test/module.mk,bob)
$(call assert_equal, $(bob.variable1), v1)
$(call assert_equal, $(bob.defn.member1), 4)

endif
ifdef $(call unittest,with_module_prefix_and_spaces)

$(call import, test/module.mk , sue )
$(call assert_equal, $(sue.variable1), v1)
$(call assert_equal, $(sue.defn.member1), 4)

endif
ifdef $(call unittest,without_module_prefix)

$(call import,test/module.mk)
$(call assert_equal, $(variable1), v1)
$(call assert_equal, $(defn.member1), 4)

endif


-load luamake.so

ifdef WINDIR
# ASSUMES we have makenew and libgnumake-1.dll.a in this directory
platform_opts = -L. -lgnumake-1.dll
endif

ifeq ($(shell uname),Darwin)
platform_opts = -undefined dynamic_lookup
endif

ifeq ($(shell uname),Linux)
platform_opts = -fPIC
endif

luamake.so: luamake.c
	gcc -Wall -shared -o $@ $^ $(platform_opts) -llua5.3 -I/usr/include/lua5.3

.PHONY: test

$(lua require,luamake)

test:
	# Call module function directly
	$(info $(lua proc,hi,another hello))
	# Use eval to convert to string for display
	$(info result is $(lua eval,tostring(55)))

Fix include path for OS X homebrew

-load luamake.so

ifdef WINDIR
# ASSUMES we have makenew and libgnumake-1.dll.a in this directory
platform_opts = -L. -lgnumake-1.dll
endif

ifeq ($(shell uname),Darwin)
platform_opts = -undefined dynamic_lookup -I/usr/local/Cellar/lua/5.3.5_1/include/lua
endif

ifeq ($(shell uname),Linux)
platform_opts = -fPIC -I/usr/include/lua5.3
endif

luamake.so: luamake.c
	gcc -Wall -shared -o $@ $^ $(platform_opts) -llua5.3

.PHONY: test

$(lua require,luamake)

test:
	# Call module function directly
	$(info $(lua proc,hi,another hello))
	# Use eval to convert to string for display
	$(info result is $(lua eval,tostring(55)))


LD_FILE = boards/samd21x18-bootloader.ld
USB_VID = 0x239A
USB_PID = 0x8028
USB_PRODUCT = "pIRKey M0"
USB_MANUFACTURER = "Adafruit Industries LLC"

CHIP_VARIANT = SAMD21E18A
CHIP_FAMILY = samd21

INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE

# A number of modules are removed for pIRKey to make room for frozen libraries.
# Many I/O functions are not available.
# math is very large and is also removed.
CIRCUITPY_ANALOGIO = 0
CIRCUITPY_MATH = 0
CIRCUITPY_NEOPIXEL_WRITE = 0
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_RTC = 0
CIRCUITPY_SAMD = 0
CIRCUITPY_USB_MIDI = 1
CIRCUITPY_TOUCHIO = 0
CIRCUITPY_SMALL_BUILD = 1
# Make more room.
SUPEROPT_GC = 0

# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IRRemote

Remove DotStar from pIRkey M0 for now to free up space

LD_FILE = boards/samd21x18-bootloader.ld
USB_VID = 0x239A
USB_PID = 0x8028
USB_PRODUCT = "pIRKey M0"
USB_MANUFACTURER = "Adafruit Industries LLC"

CHIP_VARIANT = SAMD21E18A
CHIP_FAMILY = samd21

INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE

# A number of modules are removed for pIRKey to make room for frozen libraries.
# Many I/O functions are not available.
# math is very large and is also removed.
CIRCUITPY_ANALOGIO = 0
CIRCUITPY_MATH = 0
CIRCUITPY_NEOPIXEL_WRITE = 0
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_RTC = 0
CIRCUITPY_SAMD = 0
CIRCUITPY_USB_MIDI = 1
CIRCUITPY_TOUCHIO = 0
CIRCUITPY_SMALL_BUILD = 1
# Make more room.
SUPEROPT_GC = 0

# Include these Python libraries in firmware.
# FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IRRemote


# Define the default make configuration. Not all defaults are defined here, but
# all command line options are listed here for convenience.

# Define the target to build
target := $(target)

# Define debug vs. release
release := 0

# Build 32-bit or 64-bit target
arch := $(arch)

# Enable verbose builds
verbose := 0

# Define the output directories
ifeq ($(release), 1)
    OUT_DIR := $(BUILD_ROOT)/release-$(arch)
else
    OUT_DIR := $(BUILD_ROOT)/debug-$(arch)
endif

BIN_DIR := $(OUT_DIR)/bin
LIB_DIR := $(OUT_DIR)/lib
OBJ_DIR := $(OUT_DIR)/obj
ETC_DIR := $(OUT_DIR)/etc

# Use @ suppression in non-verbose builds
ifeq ($(verbose),0)
    Q := @
else
    $(info Bin dir = $(BIN_DIR))
    $(info Lib dir = $(LIB_DIR))
    $(info Obj dir = $(OBJ_DIR))
    $(info Etc dir = $(ETC_DIR))
    $(info Target = $(target))
    $(info Release = $(release))
    $(info Arch = $(arch))
endif

Use CURDIR instead of BUILD_ROOT for output files

# Define the default make configuration. Not all defaults are defined here, but
# all command line options are listed here for convenience.

# Define the target to build
target := $(target)

# Define debug vs. release
release := 0

# Build 32-bit or 64-bit target
arch := $(arch)

# Enable verbose builds
verbose := 0

# Define the output directories
ifeq ($(release), 1)
    OUT_DIR := $(CURDIR)/release-$(arch)
else
    OUT_DIR := $(CURDIR)/debug-$(arch)
endif

BIN_DIR := $(OUT_DIR)/bin
LIB_DIR := $(OUT_DIR)/lib
OBJ_DIR := $(OUT_DIR)/obj
ETC_DIR := $(OUT_DIR)/etc

# Use @ suppression in non-verbose builds
ifeq ($(verbose),0)
    Q := @
else
    $(info Bin dir = $(BIN_DIR))
    $(info Lib dir = $(LIB_DIR))
    $(info Obj dir = $(OBJ_DIR))
    $(info Etc dir = $(ETC_DIR))
    $(info Target = $(target))
    $(info Release = $(release))
    $(info Arch = $(arch))
endif


LOCAL_DIR := $(GET_LOCAL_DIR)

INCLUDES += -I$(LOCAL_DIR)/include -I$(LK_TOP_DIR)/platform/msm_shared
INCLUDES += -I$(LK_TOP_DIR)/dev/gcdb/display -I$(LK_TOP_DIR)/dev/gcdb/display/include

PLATFORM := msm8916

MEMBASE := 0x8F600000 # SDRAM
MEMSIZE := 0x00100000 # 1MB

BASE_ADDR        := 0x80000000
SCRATCH_ADDR     := 0x90000000

#DEFINES += DISPLAY_SPLASH_SCREEN=1
DEFINES += DISPLAY_TYPE_MIPI=1
DEFINES += DISPLAY_TYPE_DSI6G=1

MODULES += \
	dev/keys \
	dev/vib \
	lib/ptable \
	dev/pmic/pm8x41 \
	lib/libfdt \
	dev/gcdb/display

DEFINES += \
	MEMSIZE=$(MEMSIZE) \
	MEMBASE=$(MEMBASE) \
	BASE_ADDR=$(BASE_ADDR) \
	SCRATCH_ADDR=$(SCRATCH_ADDR)

OBJS += \
	$(LOCAL_DIR)/init.o \
	$(LOCAL_DIR)/meminfo.o \
	$(LOCAL_DIR)/target_display.o \
	$(LOCAL_DIR)/oem_panel.o

Revert "Do Not Merge: Disable Splash screen in LK."

LOCAL_DIR := $(GET_LOCAL_DIR)

INCLUDES += -I$(LOCAL_DIR)/include -I$(LK_TOP_DIR)/platform/msm_shared
INCLUDES += -I$(LK_TOP_DIR)/dev/gcdb/display -I$(LK_TOP_DIR)/dev/gcdb/display/include

PLATFORM := msm8916

MEMBASE := 0x8F600000 # SDRAM
MEMSIZE := 0x00100000 # 1MB

BASE_ADDR        := 0x80000000
SCRATCH_ADDR     := 0x90000000

DEFINES += DISPLAY_SPLASH_SCREEN=1
DEFINES += DISPLAY_TYPE_MIPI=1
DEFINES += DISPLAY_TYPE_DSI6G=1

MODULES += \
	dev/keys \
	dev/vib \
	lib/ptable \
	dev/pmic/pm8x41 \
	lib/libfdt \
	dev/gcdb/display

DEFINES += \
	MEMSIZE=$(MEMSIZE) \
	MEMBASE=$(MEMBASE) \
	BASE_ADDR=$(BASE_ADDR) \
	SCRATCH_ADDR=$(SCRATCH_ADDR)

OBJS += \
	$(LOCAL_DIR)/init.o \
	$(LOCAL_DIR)/meminfo.o \
	$(LOCAL_DIR)/target_display.o \
	$(LOCAL_DIR)/oem_panel.o


# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/initfiles/p9_vas_scom.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2016,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_vas_scom
$(call BUILD_PROCEDURE)

Add no variable tracking to initfile procedures to imporve build time

# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/initfiles/p9_vas_scom.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2016,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_vas_scom
lib$(PROCEDURE)_COMMONFLAGS+=-fno-var-tracking-assignments
$(call BUILD_PROCEDURE)


# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

$(eval $(call gb_Module_Module,icu))

ifeq ($(SYSTEM_ICU),NO)
$(eval $(call gb_Module_add_targets,icu,\
	UnpackedTarball_icu \
	ExternalPackage_icu \
	ExternalProject_icu \
))
endif

# vim: set noet sw=4 ts=4:

Revert "Don't cripple the icu data"

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

$(eval $(call gb_Module_Module,icu))

ifeq ($(SYSTEM_ICU),NO)
$(eval $(call gb_Module_add_targets,icu,\
	UnpackedTarball_icu \
	UnpackedTarball_icu_data \
	ExternalPackage_icu \
	ExternalProject_icu \
))
endif

# vim: set noet sw=4 ts=4:


#############################################################
#
# libshake
#
#############################################################
LIBSHAKE_VERSION = master
LIBSHAKE_SITE = $(call github,zear,libShake,$(LIBSHAKE_VERSION))
LIBSHAKE_LICENSE = MIT
LIBSHAKE_LICENSE_FILES = LICENSE.txt
LIBSHAKE_INSTALL_STAGING = YES

LIBSHAKE_MAKE_ENV = CC="$(TARGET_CC)" PREFIX=/usr

define LIBSHAKE_BUILD_CMDS
	$(LIBSHAKE_MAKE_ENV) $(MAKE) -C $(@D)
endef

define LIBSHAKE_INSTALL_STAGING_CMDS
	$(LIBSHAKE_MAKE_ENV) DESTDIR="$(STAGING_DIR)" $(MAKE) -C $(@D) install
endef

define LIBSHAKE_INSTALL_TARGET_CMDS
	$(LIBSHAKE_MAKE_ENV) DESTDIR="$(TARGET_DIR)" $(MAKE) -C $(@D) install-lib
endef

$(eval $(generic-package))

Update the buildroot rules to use the linux backend.

#############################################################
#
# libshake
#
#############################################################
LIBSHAKE_VERSION = master
LIBSHAKE_SITE = $(call github,zear,libShake,$(LIBSHAKE_VERSION))
LIBSHAKE_LICENSE = MIT
LIBSHAKE_LICENSE_FILES = LICENSE.txt
LIBSHAKE_INSTALL_STAGING = YES

LIBSHAKE_MAKE_ENV = CC="$(TARGET_CC)" PREFIX=/usr

define LIBSHAKE_BUILD_CMDS
	$(LIBSHAKE_MAKE_ENV) $(MAKE) -C $(@D) BACKEND=LINUX
endef

define LIBSHAKE_INSTALL_STAGING_CMDS
	$(LIBSHAKE_MAKE_ENV) DESTDIR="$(STAGING_DIR)" $(MAKE) -C $(@D) BACKEND=LINUX install
endef

define LIBSHAKE_INSTALL_TARGET_CMDS
	$(LIBSHAKE_MAKE_ENV) DESTDIR="$(TARGET_DIR)" $(MAKE) -C $(@D) BACKEND=LINUX install-lib
endef

$(eval $(generic-package))


# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

$(eval $(call gb_Module_Module,odk))

$(eval $(call gb_Module_add_targets,odk,\
	CustomTarget_odkcommon \
	$(if $(filter WNT,$(OS)),CustomTarget_cli) \
	$(if $(DOXYGEN),CustomTarget_doxygen) \
	CustomTarget_check \
	CustomTarget_bin \
	CustomTarget_lib \
	CustomTarget_settings \
	CustomTarget_autodoc \
	CustomTarget_idl \
	Executable_unoapploader \
	Zip_odkexamples \
))

ifneq ($(SOLAR_JAVA),)
$(eval $(call gb_Module_add_targets,odk,\
	CustomTarget_unowinreg \
	CustomTarget_classes \
	CustomTarget_javadoc \
	$(if $(filter WNT,$(OS)),Library_unowinreg) \
	Zip_uno_loader_classes \
))
endif

$(eval $(call gb_Module_add_targets,odk,\
	Zip_odkcommon \
))

# vim: set noet sw=4 ts=4:

Add comment about dependency gotcha

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

$(eval $(call gb_Module_Module,odk))

$(eval $(call gb_Module_add_targets,odk,\
	CustomTarget_odkcommon \
	$(if $(filter WNT,$(OS)),CustomTarget_cli) \
	$(if $(DOXYGEN),CustomTarget_doxygen) \
	CustomTarget_check \
	CustomTarget_bin \
	CustomTarget_lib \
	CustomTarget_settings \
	CustomTarget_autodoc \
	CustomTarget_idl \
	Executable_unoapploader \
	Zip_odkexamples \
))

ifneq ($(SOLAR_JAVA),)
$(eval $(call gb_Module_add_targets,odk,\
	CustomTarget_unowinreg \
	CustomTarget_classes \
	CustomTarget_javadoc \
	$(if $(filter WNT,$(OS)),Library_unowinreg) \
	Zip_uno_loader_classes \
))
endif

# This apparently needs to come last, as the various CustomTarget_* add to
# odkcommon_ZIPLIST that is used here:
$(eval $(call gb_Module_add_targets,odk,\
	Zip_odkcommon \
))

# vim: set noet sw=4 ts=4:


# Copyright (c) 2008-2015 The OpenRC Authors.
# See the Authors file at the top-level directory of this distribution and
# https://github.com/OpenRC/openrc/blob/master/AUTHORS
#
# This file is part of OpenRC. It is subject to the license terms in
# the LICENSE file found in the top-level directory of this
# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
# This file may not be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.

SFX=		.Linux.in
PKG_PREFIX?=	/usr

CPPFLAGS+=	-D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700
LIBDL=		-Wl,-Bdynamic -ldl

ifeq (${MKSELINUX},yes)
CPPFLAGS+= -DHAVE_SELINUX
LIBSELINUX?= -lselinux
LDADD += $(LIBSELINUX)

ifneq (${MKPAM},pam)
# if using selinux but not pam then we need crypt
LIBCRYPT?= -lcrypt
LDADD += $(LIBCRYPT)
endif

endif

ifeq (${MKAUDIT},yes)
LIBAUDIT?=	-laudit
CPPFLAGS+=	-DHAVE_AUDIT
LDADD+=		${LIBAUDIT}
endif

Drop the use of the _BSD_SOURCE macro on Linux

# Copyright (c) 2008-2015 The OpenRC Authors.
# See the Authors file at the top-level directory of this distribution and
# https://github.com/OpenRC/openrc/blob/master/AUTHORS
#
# This file is part of OpenRC. It is subject to the license terms in
# the LICENSE file found in the top-level directory of this
# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
# This file may not be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.

SFX=		.Linux.in
PKG_PREFIX?=	/usr

CPPFLAGS+=	-D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700
LIBDL=		-Wl,-Bdynamic -ldl

ifeq (${MKSELINUX},yes)
CPPFLAGS+= -DHAVE_SELINUX
LIBSELINUX?= -lselinux
LDADD += $(LIBSELINUX)

ifneq (${MKPAM},pam)
# if using selinux but not pam then we need crypt
LIBCRYPT?= -lcrypt
LDADD += $(LIBCRYPT)
endif

endif

ifeq (${MKAUDIT},yes)
LIBAUDIT?=	-laudit
CPPFLAGS+=	-DHAVE_AUDIT
LDADD+=		${LIBAUDIT}
endif


CFLAGS = -fPIC -g -Wall -Werror -D_GNU_SOURCE
SRCS =
CXX_SRCS = src/Posix.cpp
ifeq ($(SUPPORT_GLIB),yes)
CXX_SRCS = src/Glib.cpp
endif

CPPFLAGS += -I$(SRCDIR)/toolbox/include
CPPFLAGS += -I$(CURDIR)/../heap/include
CPPFLAGS += -I$(CURDIR)/../probe/include

ifeq ($(SUPPORT_GLIB),yes)
CPPFLAGS +=$(CPPFLAGS_GLIB)
LDFLAGS += $(LDFLAGS_GLIB)
endif

NAME = edleak_preload
BUILD_TYPE = staticlib

include $(BUILDDIR)/srcbuild.mk

Fix posix preload that was disabled when glib was enabled

CFLAGS = -fPIC -g -Wall -Werror -D_GNU_SOURCE
SRCS =
CXX_SRCS = src/Posix.cpp
ifeq ($(SUPPORT_GLIB),yes)
CXX_SRCS += src/Glib.cpp
endif

CPPFLAGS += -I$(SRCDIR)/toolbox/include
CPPFLAGS += -I$(CURDIR)/../heap/include
CPPFLAGS += -I$(CURDIR)/../probe/include

ifeq ($(SUPPORT_GLIB),yes)
CPPFLAGS +=$(CPPFLAGS_GLIB)
LDFLAGS += $(LDFLAGS_GLIB)
endif

NAME = edleak_preload
BUILD_TYPE = staticlib

include $(BUILDDIR)/srcbuild.mk


NDK_TOOLCHAIN_VERSION := 4.9
APP_MODULES := c++_shared servojni gstreamer
APP_PLATFORM := android-18
APP_STL:= c++_shared
APP_ABI:= armeabi-v7a x86

Set android toolchain version correctly.

NDK_TOOLCHAIN_VERSION := clang
APP_MODULES := c++_shared servojni gstreamer
APP_PLATFORM := android-18
APP_STL:= c++_shared
APP_ABI:= armeabi-v7a x86


# goal for this make file is to generate dockerfile from an upstream project

DOCKER_FILE ?=
DOCKER_FILE_URL ?=

PROXY_CONFIG_CONTENT ?= $(shell cat $(PROXY_DOCKER_ENV_FILE))

include mk/utils/proxy.mk

get-upstream-dockerfile:
		# get the dockerfile.machine from github.com/docker/machine
		curl -s $(DOCKER_FILE_URL) > $(DOCKER_FILE)

gen-dockerfile: proxy-config get-upstream-dockerfile
		echo 'generating docker file'
		echo 'cat $(PROXY_DOCKER_ENV_FILE)'
		sed "/FROM.*/ r $(PROXY_DOCKER_ENV_FILE)" $(DOCKER_FILE) > $(DOCKER_FILE).t && mv $(DOCKER_FILE).t $(DOCKER_FILE)
		# setup workdir and add current folder as /go/src/github.com/$GH_USER/$GH_REPO
		sed "s#WORKDIR.*#WORKDIR /go/src/github.com/$(GH_USER)/$(GH_REPO)#g" $(DOCKER_FILE) > $(DOCKER_FILE).t && mv $(DOCKER_FILE).t $(DOCKER_FILE)
		sed "s#ADD.*#ADD . /go/src/github.com/$(GH_USER)/$(GH_REPO)#g" $(DOCKER_FILE) > $(DOCKER_FILE).t && mv $(DOCKER_FILE).t $(DOCKER_FILE)

Fix the build Dockerfile gen

# goal for this make file is to generate dockerfile from an upstream project

DOCKER_FILE ?=
DOCKER_FILE_URL ?=

PROXY_CONFIG_CONTENT ?= $(shell cat $(PROXY_DOCKER_ENV_FILE))

include mk/utils/proxy.mk

get-upstream-dockerfile:
		# get the dockerfile.machine from github.com/docker/machine
		curl -s $(DOCKER_FILE_URL) > $(DOCKER_FILE)

gen-dockerfile: proxy-config get-upstream-dockerfile
		echo 'generating docker file'
		echo 'cat $(PROXY_DOCKER_ENV_FILE)'
		sed "/FROM.*/ r $(PROXY_DOCKER_ENV_FILE)" $(DOCKER_FILE) > $(DOCKER_FILE).t && mv $(DOCKER_FILE).t $(DOCKER_FILE)
		# setup workdir and add current folder as /go/src/github.com/$GH_USER/$GH_REPO
		sed "s#WORKDIR.*#WORKDIR /go/src/github.com/$(GH_USER)/$(GH_REPO)#g" $(DOCKER_FILE) > $(DOCKER_FILE).t && mv $(DOCKER_FILE).t $(DOCKER_FILE)
		sed "s#COPY.*#COPY . /go/src/github.com/$(GH_USER)/$(GH_REPO)#g" $(DOCKER_FILE) > $(DOCKER_FILE).t && mv $(DOCKER_FILE).t $(DOCKER_FILE)


###############################################################################
# This is where all of the top-level, project-specific information is supplied.

CFLAGS         += -MMD -MP -m64 -Wall -Wpedantic
CXXFLAGS       += $(CFLAGS) -std=c++1y

CFLAGS_DEBUG   += $(CXXFLAGS) -g -ggdb
CFLAGS_RELEASE += $(CXXFLAGS) -Ofast -march=corei7 -mtune=corei7

CFLAGS_LIB     += -fPIC

ifdef OPT
    CXXFLAGS_TO_USE = $(CFLAGS_RELEASE)
else
    CXXFLAGS_TO_USE = $(CFLAGS_DEBUG)
endif

GCC_HOME=/usr/local/bin

CC  := $(GCC_HOME)/g++
CXX := $(CC)
LD  := $(CC)

LDFLAGS     :=
LDFLAGS_LIB := $(LDFLAGS) -shared

INSTALL_PREFIX := $(HOME)/tmp

ifeq ($(OS),OSX)
    CFLAGS += -DOS_OSX
else
    CFLAGS += -DOS_LINUX
    CFLAGS_DEBUG += -gstabs
endif

MAIN.deps    := ICALC_INTERFACE
DEFCALC.deps := ICALC_INTERFACE

Add option to hide symbols by default

###############################################################################
# This is where all of the top-level, project-specific information is supplied.

HIDE_SYMS = 1

VISIBILITY_HIDDEN = $(if $(HIDE_SYMS),-fvisibility=hidden,)

CFLAGS         += -MMD -MP -m64 -Wall -Wpedantic
CXXFLAGS       += $(CFLAGS) -std=c++1y $(VISIBILITY_HIDDEN)

CFLAGS_DEBUG   += $(CXXFLAGS) -g -ggdb
CFLAGS_RELEASE += $(CXXFLAGS) -Ofast -march=corei7 -mtune=corei7

CFLAGS_LIB     += -fPIC

ifdef OPT
    CXXFLAGS_TO_USE = $(CFLAGS_RELEASE)
else
    CXXFLAGS_TO_USE = $(CFLAGS_DEBUG)
endif

GCC_HOME=/usr/local/bin

CC  := $(GCC_HOME)/g++
CXX := $(CC)
LD  := $(CC)

LDFLAGS     :=
LDFLAGS_LIB := $(LDFLAGS) -shared

INSTALL_PREFIX := $(HOME)/tmp

ifeq ($(OS),OSX)
    CFLAGS += -DOS_OSX
else
    CFLAGS += -DOS_LINUX
    CFLAGS_DEBUG += -gstabs
endif

MAIN.deps    := ICALC_INTERFACE
DEFCALC.deps := ICALC_INTERFACE


###########################################
## A thin wrapper around BUILD_EXECUTABLE
## Common flags for native tests are added.
###########################################

LOCAL_CFLAGS += -DGTEST_OS_LINUX -DGTEST_HAS_STD_STRING
LOCAL_C_INCLUDES += bionic \
                    bionic/libstdc++/include \
                    external/gtest/include \
                    external/stlport/stlport
LOCAL_STATIC_LIBRARIES +=
LOCAL_SHARED_LIBRARIES += libstlport

ifndef LOCAL_MODULE_PATH
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)
endif

include $(BUILD_EXECUTABLE)

Fix native test static lib.

###########################################
## A thin wrapper around BUILD_EXECUTABLE
## Common flags for native tests are added.
###########################################

LOCAL_CFLAGS += -DGTEST_OS_LINUX -DGTEST_HAS_STD_STRING
LOCAL_C_INCLUDES += bionic \
                    bionic/libstdc++/include \
                    external/gtest/include \
                    external/stlport/stlport
LOCAL_STATIC_LIBRARIES += libgtest libgtest_main
LOCAL_SHARED_LIBRARIES += libstlport

ifndef LOCAL_MODULE_PATH
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_NATIVE_TESTS)
endif

include $(BUILD_EXECUTABLE)


# $Id$
#
#
# Makefile to generate build tools
#

STAMP = buildmk.stamp

ALWAYS = build2/generated_lists

all: $(STAMP) $(ALWAYS)
	@$(MAKE) -s -f build2/build2.mk

build2/generated_lists:
	@echo config_m4_files = ext/*/config*.m4 >> $@
	if test -f Makefile.global; then echo php_gtk_m4 = php_gtk_new.m4 >> $@; else echo php_gtk_m4 = php_gtk_old.m4 >> $@; fi

$(STAMP):
	phpize
	@test -f php_gtk.m4 && rm php_gtk.m4
	touch $(STAMP)

Use standard 'if' syntax (patch from Alan).

# $Id$
#
#
# Makefile to generate build tools
#

STAMP = buildmk.stamp

ALWAYS = build2/generated_lists

all: $(STAMP) $(ALWAYS)
	@$(MAKE) -s -f build2/build2.mk

build2/generated_lists:
	@echo config_m4_files = ext/*/config*.m4 >> $@
	if test -f Makefile.global; then echo php_gtk_m4 = php_gtk_new.m4 >> $@; else echo php_gtk_m4 = php_gtk_old.m4 >> $@; fi

$(STAMP):
	phpize
	if test -f php_gtk.m4; then rm php_gtk.m4; fi
	touch $(STAMP)


# -*- makefile -*-
# Copyright 2016 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Board specific files build

# TODO(b/132204142): Sweetberry's USB connection fails to initialize properly
# when built using the 8.2.0 tool chain leave it with the 4.9.x.
CROSS_COMPILE_arm:=arm-none-eabi-

CHIP:=stm32
CHIP_FAMILY:=stm32f4
CHIP_VARIANT:=stm32f446

board-y=board.o

Drop LTO workaround from sweetberry

# -*- makefile -*-
# Copyright 2016 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Board specific files build

CHIP:=stm32
CHIP_FAMILY:=stm32f4
CHIP_VARIANT:=stm32f446

board-y=board.o


# $FreeBSD$

PORTSDIR?=	/usr/ports
BSDPORTMK?=	${PORTSDIR}/Mk/bsd.port.mk

# Needed to keep bsd.own.mk from reading in /etc/src.conf
# and setting MK_* variables when building ports.
_WITHOUT_SRCCONF=

# Enable CTF conversion on request.
.if defined(WITH_CTF)
.undef NO_CTF
.endif

.include <bsd.own.mk>
.include "${BSDPORTMK}"

Work around the autotools problem with the 10.0 version.

# $FreeBSD$

PORTSDIR?=	/usr/ports
BSDPORTMK?=	${PORTSDIR}/Mk/bsd.port.mk

# Needed to keep bsd.own.mk from reading in /etc/src.conf
# and setting MK_* variables when building ports.
_WITHOUT_SRCCONF=

# Enable CTF conversion on request.
.if defined(WITH_CTF)
.undef NO_CTF
.endif

.include <bsd.own.mk>
.include "${BSDPORTMK}"

.if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK)
# Work around an issue where FreeBSD 10.0 is detected as FreeBSD 1.x.
run-autotools-fixup:
	find ${WRKSRC} -type f \( -name config.libpath -o \
		-name config.rpath -o -name configure -o -name libtool.m4 \) \
		-exec sed -i '' -e 's/freebsd1\*)/SHOULDNOTMATCHANYTHING1)/' \
		-e 's/freebsd\[123\]\*)/SHOULDNOTMATCHANYTHING2)/' {} +

.ORDER: run-autotools run-autotools-fixup do-configure
do-configure: run-autotools-fixup
.endif


LOCAL_PATH := $(call my-dir)

# libloki
include $(CLEAR_VARS)
LOCAL_SRC_FILES := loki_flash.c loki_patch.c
LOCAL_MODULE := libloki_static
LOCAL_MODULE_TAGS := eng
include $(BUILD_STATIC_LIBRARY)

# build static binary
include $(CLEAR_VARS)
LOCAL_SRC_FILES := loki_flash.c loki_patch.c loki_find.c main.c
LOCAL_MODULE := loki_tool_static
LOCAL_MODULE_STEM := loki_tool
LOCAL_MODULE_TAGS := eng
# LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
LOCAL_STATIC_LIBRARIES := libc
LOCAL_FORCE_STATIC_EXECUTABLE := true
include $(BUILD_EXECUTABLE)

Add unlok option when building with NDK

LOCAL_PATH := $(call my-dir)

# libloki
include $(CLEAR_VARS)
LOCAL_SRC_FILES := loki_flash.c loki_patch.c
LOCAL_MODULE := libloki_static
LOCAL_MODULE_TAGS := eng
include $(BUILD_STATIC_LIBRARY)

# build static binary
include $(CLEAR_VARS)
LOCAL_SRC_FILES := loki_flash.c loki_patch.c loki_find.c loki_unlok.c main.c
LOCAL_MODULE := loki_tool_static
LOCAL_MODULE_STEM := loki_tool
LOCAL_MODULE_TAGS := eng
# LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
LOCAL_STATIC_LIBRARIES := libc
LOCAL_FORCE_STATIC_EXECUTABLE := true
include $(BUILD_EXECUTABLE)


VPATH+=	${TOPDIR}/common/thread

THREAD_MODEL=	posix

SRCS+=	mutex_${THREAD_MODEL}.cc
SRCS+=	sleep_queue_${THREAD_MODEL}.cc
SRCS+=	thread_${THREAD_MODEL}.cc

LDADD+=	-lpthread

Add a define that can be checked for threading presence.

VPATH+=	${TOPDIR}/common/thread

THREAD_MODEL=	posix

SRCS+=	mutex_${THREAD_MODEL}.cc
SRCS+=	sleep_queue_${THREAD_MODEL}.cc
SRCS+=	thread_${THREAD_MODEL}.cc

CFLAGS+=-DTHREADS

LDADD+=	-lpthread


# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_ioe_tl_scom.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2016,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_fbc_ioe_tl_scom
$(call BUILD_PROCEDURE)

Add no variable tracking to initfile procedures to imporve build time

# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_ioe_tl_scom.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2016,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_fbc_ioe_tl_scom
lib$(PROCEDURE)_COMMONFLAGS+=-fno-var-tracking-assignments
$(call BUILD_PROCEDURE)


.PHONY: all install-deps lint test unit-test integration-test fmt help

all: install-deps lint test

install-deps:
	go get -t github.com/basho-labs/riak-go-client/...

lint: install-deps
	go vet github.com/basho-labs/riak-go-client/...

unit-test: lint
	go test -v github.com/basho-labs/riak-go-client/...

integration-test: lint
	go test -v -tags=integration github.com/basho-labs/riak-go-client/...

# TODO: add integration-test
test: lint unit-test

fmt:
	gofmt -s -w .

help:
	@echo ''
	@echo ' Targets:'
	@echo '--------------------------------------------------'
	@echo ' all              - Run everything                '
	@echo ' fmt              - Format code                   '
	@echo ' lint             - Run jshint                    '
	@echo ' test             - Run unit & integration tests  '
	@echo ' unit-test        - Run unit tests                '
	@echo ' integration-test - Run integration tests         '
	@echo '--------------------------------------------------'
	@echo ''

Add integration tests to the test target

.PHONY: all install-deps lint test unit-test integration-test fmt help

all: install-deps lint test

install-deps:
	go get -t github.com/basho-labs/riak-go-client/...

lint: install-deps
	go vet github.com/basho-labs/riak-go-client/...

unit-test: lint
	go test -v github.com/basho-labs/riak-go-client/...

integration-test: lint
	go test -v -tags=integration github.com/basho-labs/riak-go-client/...

test: unit-test integration-test

fmt:
	gofmt -s -w .

help:
	@echo ''
	@echo ' Targets:'
	@echo '--------------------------------------------------'
	@echo ' all              - Run everything                '
	@echo ' fmt              - Format code                   '
	@echo ' lint             - Run jshint                    '
	@echo ' test             - Run unit & integration tests  '
	@echo ' unit-test        - Run unit tests                '
	@echo ' integration-test - Run integration tests         '
	@echo '--------------------------------------------------'
	@echo ''


<%inherit file="local:templates.master"/>

<%def name="title()">
  Contact
</%def>

SAUCE

Contact

To contact the developer, just send an e-mail to
sauce [at] moritz-schlarb.de.

If you experience bugs or have an idea for improvement, you can also
just file an issue
via the Github issue tracking system.

Fix missing mailto: on about page


# Compilation flags for all files.
CFLAGS += -ansi
# This code was originally written in the mid-90s;
# X/Open 5.0 was all there was :/
CPPDEFINES = -D_XOPEN_SOURCE=500
# utf8proc lib usually lives in here:
CPPFLAGS := $(CPPFLAGS) -I/usr/local/include $(CPPDEFINES)
LDFLAGS += -L/usr/local/lib
LDLIBS = -lm -lutf8proc

Use -D_XOPEN_SOURCE=600 to play nice on OS X.

# Compilation flags for all files.
CFLAGS += -ansi
# X/Open 6.0 standardizes features used in this K&R C source...
CPPDEFINES = -D_XOPEN_SOURCE=600
# utf8proc lib usually lives in here:
CPPFLAGS := $(CPPFLAGS) -I/usr/local/include $(CPPDEFINES)
LDFLAGS += -L/usr/local/lib
LDLIBS = -lm -lutf8proc


#
# This is all stuff pjones should not have done the way he did initially, and
# it's deprecated and will eventually go away.
#

ifneq ($(origin prefix),undefined)
  ifeq ($(origin PREFIX),undefined)
    override PREFIX = $(prefix)
  endif
endif
ifneq ($(origin exec_prefix),undefined)
  ifeq ($(origin EXEC_PREFIX),undefined)
    override EXEC_PREFIX = $(exec_prefix)
  endif
endif
ifneq ($(origin libdir),undefined)
  ifeq ($(origin LIBDIR),undefined)
    override LIBDIR = $(libdir)
  endif
endif
ifneq ($(origin datadir),undefined)
  ifeq ($(origin DATADIR),undefined)
    override DATADIR = $(datadir)
  endif
endif
ifneq ($(origin mandir),undefined)
  ifeq ($(origin MANDIR),undefined)
    override MANDIR = $(mandir)
  endif
endif
ifneq ($(origin includedir),undefined)
  ifeq ($(origin INCLUDEDIR),undefined)
    override INCLUDEDIR = $(includedir)
  endif
endif
ifneq ($(origin bindir),undefined)
  ifeq ($(origin BINDIR),undefined)
    override BINDIR = $(bindir)
  endif
endif

# vim:ft=make

Make CC_FOR_BUILD and CCLD_FOR_BUILD override HOSTCC/HOSTCCLD

#
# This is all stuff pjones should not have done the way he did initially, and
# it's deprecated and will eventually go away.
#

ifneq ($(origin prefix),undefined)
  ifeq ($(origin PREFIX),undefined)
    override PREFIX = $(prefix)
  endif
endif
ifneq ($(origin exec_prefix),undefined)
  ifeq ($(origin EXEC_PREFIX),undefined)
    override EXEC_PREFIX = $(exec_prefix)
  endif
endif
ifneq ($(origin libdir),undefined)
  ifeq ($(origin LIBDIR),undefined)
    override LIBDIR = $(libdir)
  endif
endif
ifneq ($(origin datadir),undefined)
  ifeq ($(origin DATADIR),undefined)
    override DATADIR = $(datadir)
  endif
endif
ifneq ($(origin mandir),undefined)
  ifeq ($(origin MANDIR),undefined)
    override MANDIR = $(mandir)
  endif
endif
ifneq ($(origin includedir),undefined)
  ifeq ($(origin INCLUDEDIR),undefined)
    override INCLUDEDIR = $(includedir)
  endif
endif
ifneq ($(origin bindir),undefined)
  ifeq ($(origin BINDIR),undefined)
    override BINDIR = $(bindir)
  endif
endif
ifneq ($(origin CC_FOR_BUILD),undefined)
  ifeq ($(origin HOSTCC),file)
    override HOSTCC = $(CC_FOR_BUILD)
  endif
endif
ifneq ($(origin CCLD_FOR_BUILD),undefined)
  ifeq ($(origin HOSTCCLD),file)
    override HOSTCCLD = $(CCLD_FOR_BUILD)
  endif
endif

# vim:ft=make


# See fix-libtool-la for more documentation.  Basically, just include
# this file where Libtool libraries are defined.

%.la.stamp: %.la
	$(build_aux_dir)/fix-libtool-la $< $@

LTLIBRARIES_STAMPS = $(LTLIBRARIES:=.stamp)
CLEANFILES += $(LTLIBRARIES_STAMPS) $(LTLIBRARIES:=.bak)
EXTRA_DIST += $(build_aux_dir)/fix-libtool-la
all-local: $(LTLIBRARIES_STAMPS)

Work around installed libtool libraries under windows.

# See fix-libtool-la for more documentation.  Basically, just include
# this file where Libtool libraries are defined.

%.la.stamp: %.la
	$(build_aux_dir)/fix-libtool-la $< $@

LTLIBRARIES_STAMPS = $(LTLIBRARIES:=.stamp)
CLEANFILES += $(LTLIBRARIES_STAMPS) $(LTLIBRARIES:=.bak)
EXTRA_DIST += $(build_aux_dir)/fix-libtool-la
all-local: $(LTLIBRARIES_STAMPS)

## ------------------------------------------------------ ##
## Workaround installed libtool libraries under windows.  ##
## ------------------------------------------------------ ##

# Our trick, defining libdir = ${bindir} so that under Windows the
# dlls are found where expected, does not work perfectly.  In
# particular libtool might issue an *.la containing:
#
# # The name that we can dlopen(3).
# dlname='../bin/libuobject.dll'
#
# and dlopen fails.  Note that "../bin" is useless, we just got out of
# bin, and enter again.  If we remove this indirection, everything
# works.  If we remove the la file, ltdl finds the *.dll file and
# again, it works.  It has been reported several times that installing
# *.la files makes no sense.  Yet, I (Akim), am a bit worried of
# getting rid of the *.la files, they can be useful later.  Besides,
# if we remove them, libtool is unable to uninstall the libraries,
# which results in distcheck failures.
#
# Now the question is "where are the libtool libraries we just
# installed?"  As already used above, LTLIBRARIES includes all the
# (builddir) *.la files.  They feature a line:
#
# # Directory that this library needs to be installed in:
# libdir='/usr/local/bin'
#
# which is what we need.  Don't forget DESTDIR though.
install-exec-hook:
	-case "$(URBI_HOST):$(LTLIBRARIES)" in		\
	  (*:) ;;					\
	  (*mingw*:*)					\
	    for lib in $(LTLIBRARIES); do		\
	      libdir=$$(source $$lib && echo $$libdir);	\
	      perl -pi -e "s{^dlname='.*/}{dlname='}g"	\
	        $(DESTDIR)$$libdir/$$(basename $$lib);;	\
	    done;					\
	esac


package=native_ds_store
$(package)_version=1.1.0
$(package)_download_path=https://bitbucket.org/al45tair/ds_store/get
$(package)_download_file=v$($(package)_version).tar.bz2
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=921596764d71d1bbd3297a90ef6d286f718794d667e4f81d91d14053525d64c1
$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
$(package)_dependencies=native_biplist

define $(package)_build_cmds
    python setup.py build
endef

define $(package)_stage_cmds
    mkdir -p $($(package)_install_libdir) && \
    python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
endef

Update native ds store location

package=native_ds_store
$(package)_version=1.1.2
$(package)_download_path=https://github.com/al45tair/ds_store/archive/
$(package)_download_file=v$($(package)_version).tar.gz
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=3b3ecb7bf0a5157f5b6010bc3af7c141fb0ad3527084e63336220d22744bc20c
$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
$(package)_dependencies=native_biplist

define $(package)_build_cmds
    python setup.py build
endef

define $(package)_stage_cmds
    mkdir -p $($(package)_install_libdir) && \
    python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
endef


MAKE     ?= make
DIR_LIST := apple/ banana/ cake/

.PHONY: all
all:
	@for dir in $(DIR_LIST); do \
		$(MAKE) -C $$dir; \
	done

.PHONY: clean
clean:
	@for dir in $(DIR_LIST); do \
		$(MAKE) -C $$dir $@; \
	done

.PHONY: cleanobj
objclean:
	@for dir in $(DIR_LIST); do \
		$(MAKE) -C $$dir $@; \
	done

Fix target name: objclean -> cleanobj

MAKE     ?= make
DIR_LIST := apple/ banana/ cake/

.PHONY: all
all:
	@for dir in $(DIR_LIST); do \
		$(MAKE) -C $$dir; \
	done

.PHONY: clean
clean:
	@for dir in $(DIR_LIST); do \
		$(MAKE) -C $$dir $@; \
	done

.PHONY: cleanobj
cleanobj:
	@for dir in $(DIR_LIST); do \
		$(MAKE) -C $$dir $@; \
	done


LD_FILE = boards/samd21x18-bootloader-external-flash.ld
USB_VID = 0x239A
USB_PID = 0xD1ED
USB_PRODUCT = "HalloWing M0 Express"
USB_MANUFACTURER = "Adafruit Industries LLC"

SPI_FLASH_FILESYSTEM = 1
LONGINT_IMPL = MPZ

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel

Remove HID from hallowing so we have more room for other stuff.

LD_FILE = boards/samd21x18-bootloader-external-flash.ld
USB_VID = 0x239A
USB_PID = 0xD1ED
USB_PRODUCT = "HalloWing M0 Express"
USB_MANUFACTURER = "Adafruit Industries LLC"

SPI_FLASH_FILESYSTEM = 1
LONGINT_IMPL = MPZ

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel


#
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# This is a build configuration for the product aspects that
# are specific to the emulator.

PRODUCT_PROPERTY_OVERRIDES := \
    ro.ril.hsxpa=1 \
    ro.ril.gprsclass=10 \
    ro.adb.qemud=1

PRODUCT_COPY_FILES := \
    development/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
    development/data/etc/vold.conf:system/etc/vold.conf \
    development/tools/emulator/system/camera/media_profiles.xml:system/etc/media_profiles.xml \

Add goldfish audio hw to board/generic_x86

#
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# This is a build configuration for the product aspects that
# are specific to the emulator.

PRODUCT_PROPERTY_OVERRIDES := \
    ro.ril.hsxpa=1 \
    ro.ril.gprsclass=10 \
    ro.adb.qemud=1

PRODUCT_COPY_FILES := \
    development/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
    development/data/etc/vold.conf:system/etc/vold.conf \
    development/tools/emulator/system/camera/media_profiles.xml:system/etc/media_profiles.xml

PRODUCT_PACKAGES := \
    audio.primary.goldfish


# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/nest/p9_mss_eff_grouping.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2015,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_mss_eff_grouping
OBJS+=p9_fbc_utils.o
$(call ADD_MODULE_INCDIR,$(PROCEDURE),$(ROOTPATH)/chips/p9/procedures/hwp/memory/)
$(call ADD_MODULE_INDDIR,$(PROCEDURE),$(ROOTPATH)/chips/p9/procedures/hwp/memory/lib)
$(call BUILD_PROCEDURE)

Add Memory Subsystem FIR support

# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/nest/p9_mss_eff_grouping.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2015,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_mss_eff_grouping
OBJS+=p9_fbc_utils.o
$(call ADD_MODULE_INCDIR,$(PROCEDURE),$(ROOTPATH)/chips/p9/procedures/hwp/memory/)
$(call BUILD_PROCEDURE)


USB_VID = 0x239A
USB_PID = 0x8026
USB_PRODUCT = "Feather M4 Express"
USB_MANUFACTURER = "Adafruit Industries LLC"

CHIP_VARIANT = SAMD51J19A
CHIP_FAMILY = samd51

QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = GD25Q16C
LONGINT_IMPL = MPZ

CIRCUITPY_VECTORIO = 1

Add EVE support for Feather M4 Express

USB_VID = 0x239A
USB_PID = 0x8026
USB_PRODUCT = "Feather M4 Express"
USB_MANUFACTURER = "Adafruit Industries LLC"

CHIP_VARIANT = SAMD51J19A
CHIP_FAMILY = samd51

QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = GD25Q16C
LONGINT_IMPL = MPZ

CIRCUITPY_VECTORIO = 1
CIRCUITPY__EVE = 1


# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/initfiles/p9_int_scom.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2016,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_int_scom
$(call BUILD_PROCEDURE)

Add no variable tracking to initfile procedures to imporve build time

# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/initfiles/p9_int_scom.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2016,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_int_scom
lib$(PROCEDURE)_COMMONFLAGS+=-fno-var-tracking-assignments
$(call BUILD_PROCEDURE)


<%inherit file="base.mak"/>
		${message}
        <%
            temp = False
            if u and u.temporary:
                temp = True
        %>
        % if temp:

You were assigned an anonymous account. When you register, this profile will be automatically converted into your newly-registered profile.

If you don't want this to happen, please log out now. Note that this will make it impossible for you to access any of the features, including edit or deletion, associated with the anonymous account you have been using.

        % else:

        % endif

                Login

				<form action="/login?act=login" method="POST">
					Username: <input type="text" name="username">

					Password: <input type="text" name="password">

					<input type="submit" value="Login" />
				</form>

				Don't have an account? Register here.

				<form action="/login?act=register" method="POST">
					Username: <input type="text" name="username">

					Password: <input type="text" name="password">

					<input type="submit" value="Login" />
				</form>

Use password field types for passwords

<%inherit file="base.mak"/>
		${message}
        <%
            temp = False
            if u and u.temporary:
                temp = True
        %>
        % if temp:

You were assigned an anonymous account. When you register, this profile will be automatically converted into your newly-registered profile.

If you don't want this to happen, please log out now. Note that this will make it impossible for you to access any of the features, including edit or deletion, associated with the anonymous account you have been using.

        % else:

        % endif

                Login

				<form action="/login?act=login" method="POST">
					Username: <input type="text" name="username">

					Password: <input type="password" name="password">

					<input type="submit" value="Login" />
				</form>

				Don't have an account? Register here.

				<form action="/login?act=register" method="POST">
					Username: <input type="text" name="username">

					Password: <input type="password" name="password">

					<input type="submit" value="Login" />
				</form>


global_admiral: storage_global_admiral network_global_admiral utilities_global_admiral instance_pool_global_admiral
	cd $(BUILD_GLOBAL_ADMIRAL); $(TF_REFRESH);
	# Refresh terraform at the end, to make sure all output is present
	# https://github.com/hashicorp/terraform/issues/2598

plan_global_admiral: plan_storage_global_admiral plan_network_global_admiral plan_utilities_global_admiral plan_instance_pool_global_admiral

refresh_global_admiral: init_global_admiral
	cd $(BUILD); $(TF_REFRESH)

destroy_global_admiral: destroy_instance_pool_global_admiral destroy_utilities_global_admiral destroy_network_global_admiral destroy_storage_global_admiral

.PHONY: global_admiral destroy_global_admiral refresh_global_admiral plan_global_admiral

Fix admiral build location variable

global_admiral: storage_global_admiral network_global_admiral utilities_global_admiral instance_pool_global_admiral
	cd $(BUILD_GLOBAL_ADMIRAL); $(TF_REFRESH);
	# Refresh terraform at the end, to make sure all output is present
	# https://github.com/hashicorp/terraform/issues/2598

plan_global_admiral: plan_storage_global_admiral plan_network_global_admiral plan_utilities_global_admiral plan_instance_pool_global_admiral

refresh_global_admiral: init_global_admiral
	cd $(BUILD_GLOBAL_ADMIRAL); $(TF_REFRESH)

destroy_global_admiral: destroy_instance_pool_global_admiral destroy_utilities_global_admiral destroy_network_global_admiral destroy_storage_global_admiral

.PHONY: global_admiral destroy_global_admiral refresh_global_admiral plan_global_admiral


USB_VID = 0x239A
USB_PID = 0x809F
USB_PRODUCT = "NUCLEO-F446RE - CPy"
USB_MANUFACTURER = "STMicroelectronics"

INTERNAL_FLASH_FILESYSTEM = 1

MCU_SERIES = F4
MCU_VARIANT = STM32F446xx
MCU_PACKAGE = LQFP64

LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F446_fs.ld

# Too big for the flash
CIRCUITPY_AUDIOCORE = 0
CIRCUITPY_AUDIOPWMIO = 0
CIRCUITPY_BITMAPTOOLS = 0
CIRCUITPY_BLEIO_HCI = 0
CIRCUITPY_VECTORIO = 0
CIRCUITPY_TOUCHIO = 0
CIRCUITPY_RAINBOWIO = 0
CIRCUITPY_USB_HID = 0
CIRCUITPY_USB_MIDI = 0
CIRCUITPY_JSON = 0
# Requires neopixel_write or SPI (dotstar)
CIRCUITPY_PIXELBUF = 0
# No requirements, but takes extra flash
CIRCUITPY_ULAB = 0
CIRCUITPY_GAMEPADSHIFT  = 0
CIRCUITPY_BITBANGIO = 0
CIRCUITPY_NEOPIXEL_WRITE = 0
CIRCUITPY_SDCARDIO = 0
CIRCUITPY_DISPLAYIO = 0
CIRCUITPY_KEYPAD = 0

Add USB VID and PID from STM.

USB_VID = 0x0483
USB_PID = 0x572A
USB_PRODUCT = "NUCLEO-F446RE - CPy"
USB_MANUFACTURER = "STMicroelectronics"

INTERNAL_FLASH_FILESYSTEM = 1

MCU_SERIES = F4
MCU_VARIANT = STM32F446xx
MCU_PACKAGE = LQFP64

LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F446_fs.ld

# Too big for the flash
CIRCUITPY_AUDIOCORE = 0
CIRCUITPY_AUDIOPWMIO = 0
CIRCUITPY_BITMAPTOOLS = 0
CIRCUITPY_BLEIO_HCI = 0
CIRCUITPY_VECTORIO = 0
CIRCUITPY_TOUCHIO = 0
CIRCUITPY_RAINBOWIO = 0
CIRCUITPY_USB_HID = 0
CIRCUITPY_USB_MIDI = 0
CIRCUITPY_JSON = 0
# Requires neopixel_write or SPI (dotstar)
CIRCUITPY_PIXELBUF = 0
# No requirements, but takes extra flash
CIRCUITPY_ULAB = 0
CIRCUITPY_GAMEPADSHIFT  = 0
CIRCUITPY_BITBANGIO = 0
CIRCUITPY_NEOPIXEL_WRITE = 0
CIRCUITPY_SDCARDIO = 0
CIRCUITPY_DISPLAYIO = 0
CIRCUITPY_KEYPAD = 0


Add script to dump basic configuration values

#!/usr/bin/make -f

include Config.mk

all: config_mk

config_mk:
	@echo "* Config.mk"
	@echo "OSXVersion: $(OSXVersion)"
	@echo "RUDIX: $(RUDIX)"
	@echo "RUDIX_UNIVERSAL: $(RUDIX_UNIVERSAL)"
	@echo "RUDIX_DISABLE_DEPENDENCY_TRACKING: $(RUDIX_DISABLE_DEPENDENCY_TRACKING)"
	@echo "RUDIX_SAVE_CONFIGURE_CACHE: $(RUDIX_SAVE_CONFIGURE_CACHE)"
	@echo "RUDIX_STRIP_PACKAGE: $(RUDIX_STRIP_PACKAGE)"
	@echo "RUDIX_ENABLE_NLS: $(RUDIX_ENABLE_NLS)"
	@echo "RUDIX_BUILD_WITH_STATIC_LIBS: $(RUDIX_BUILD_WITH_STATIC_LIBS)"
	@echo "RUDIX_BUILD_STATIC_LIBS: $(RUDIX_BUILD_STATIC_LIBS)"
	@echo "RUDIX_PARALLEL_EXECUTION: $(RUDIX_PARALLEL_EXECUTION)"
	@echo "RUDIX_LABELS: $(RUDIX_LABELS)"
	@echo "RUDIX_RUN_ALL_TESTS: $(RUDIX_RUN_ALL_TESTS)"


# Copyright (C) 2011 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

# Include all the java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)

# The name of the jar file to create.
LOCAL_MODULE := littlemock-r2

# Build a static jar file.
include $(BUILD_STATIC_JAVA_LIBRARY)

Remove revision suffix from library name.

# Copyright (C) 2011 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

# Include all the java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)

# The name of the jar file to create.
LOCAL_MODULE := littlemock

# Build a static jar file.
include $(BUILD_STATIC_JAVA_LIBRARY)


Add recipes to generate Python test fixtures

# TARGETS #

# Run fixture runners.
#
# This target runs scripts written in Python to generate test fixtures.

test-fixtures-python:
	$(QUIET) $(FIND_PYTHON_TESTS_FIXTURES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
		echo ""; \
		echo "Generating test fixtures: $$file"; \
		$(PYTHON) $$file || exit 1; \
	done

.PHONY: test-fixtures-python

# Run fixture runners.
#
# This target runs a list of scripts written in Python to generate fixtures.

test-fixtures-python-files:
	$(QUIET) for file in $(FILES); do \
		echo ""; \
		echo "Generating test fixtures: $$file"; \
		$(PYTHON) $$file || exit 1; \
	done

.PHONY: test-fixtures-python-files


# These are the functions which clang needs when it is targetting a previous
# version of the OS. The issue is that the backend may use functions which were
# not present in the libgcc that shipped on the platform. In such cases, we link
# with a version of the library which contains private_extern definitions of all
# the extra functions which might be referenced.

Description := Static runtime libraries for clang/Darwin.

Configs :=
UniversalArchs :=

# Configuration for targetting 10.4 on x86. We need a few functions missing from
# libgcc_s.10.4.dylib.
Configs += x86_10.4
UniversalArchs.x86_10.4 := i386 x86_64

# Configuration for targetting armv6. We need a few additional functions which
# must be in the same linkage unit.
Configs += armv6
UniversalArchs.armv6 := armv6

CC := gcc

CFLAGS := -Wall -Werror -O3 -fomit-frame-pointer

FUNCTIONS.x86_10.4 := floatundidf floatundisf floatundixf
FUNCTIONS.armv6 := switch16 switch32 switch8 switchu8 \
                   save_vfp_d8_d15_regs restore_vfp_d8_d15_regs

VISIBILITY_HIDDEN := 1


# Fedora Linux rules
all: .intl .freetype .fribidi .zlib \
	.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
	.flac .speex .faad .faac .lame .ebml .matroska .ffmpeg .dvdcss \
	.live .goom2k4 .caca .mod .x264  .xml .twolame \
	.mpcdec \
	.dvdnav .dvbpsi .wxwidgets .dirac \
	.dca .raw1394 .dc1394 .lua .zvbi \
	.aclocal

Add schroedinger to Fedora contrib and remove some libraries that are available in the distro itself.

# Fedora Linux rules
# Most dependencies are available from livna repro.
all: .a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
	.flac .speex .faad .faac .lame .ebml .matroska .ffmpeg \
	.live .goom2k4 .caca .mod .x264  .xml .twolame \
	.mpcdec \
	.dvbpsi .dirac .schroedinger \
	.dca .lua .zvbi


# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit_training_adv.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2017,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
-include 00common.mk

PROCEDURE=p9_mss_draminit_training_adv
$(eval $(call ADD_MEMORY_INCDIRS,$(PROCEDURE)))
$(call BUILD_PROCEDURE)


STOP Recovery: Added support for FFDC collection of CME and SGPE.

# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/pm/p9_pm_recovery_ffdc_base.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2017,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
PROCEDURE = p9_pm_recovery_ffdc_base
FFDC_INC=$(ROOTPATH)/chips/p9/procedures/hwp/lib/
lib$(PROCEDURE)_DEPLIBS+=p9_pm_ocb_indir_setup_linear
lib$(PROCEDURE)_DEPLIBS+=p9_cme_sram_access
$(call ADD_MODULE_INCDIR,$(FFDC_INC))
$(call BUILD_PROCEDURE)


# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: procedure.rules.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2015,2016
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG

BUILD_PROCEDURE = $(eval $(call __BUILD_PROCEDURE))

define __BUILD_PROCEDURE
OBJS += $(PROCEDURE).o
endef


# Copyright (c) 2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# ARM 64 settings

MACHINETYPE := virt
KERNELPARAMS :=
MACHINEACCELERATORS :=

QEMUCMD := qemu-system-aarch64


Create empty files for OMI init procedures.

# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_omi_init.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2018,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
# Makefile for exp_omi_init HWP


#
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# This is a build configuration for the product aspects that
# are specific to the emulator.

PRODUCT_PROPERTY_OVERRIDES := \
    ro.ril.hsxpa=1 \
    ro.ril.gprsclass=10 \
    ro.adb.qemud=1

PRODUCT_COPY_FILES := \
    development/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
    development/data/etc/vold.conf:system/etc/vold.conf \
    development/tools/emulator/system/camera/media_profiles.xml:system/etc/media_profiles.xml \

PRODUCT_PACKAGES := \
    audio.primary.goldfish \
    power.goldfish

Make sure to copy codec setup files to their proper filesystem location on the emulator

#
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# This is a build configuration for the product aspects that
# are specific to the emulator.

PRODUCT_PROPERTY_OVERRIDES := \
    ro.ril.hsxpa=1 \
    ro.ril.gprsclass=10 \
    ro.adb.qemud=1

PRODUCT_COPY_FILES := \
    development/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
    development/data/etc/vold.conf:system/etc/vold.conf \
    development/tools/emulator/system/camera/media_profiles.xml:system/etc/media_profiles.xml \
    development/tools/emulator/system/camera/media_codecs.xml:system/etc/media_codecs.xml \

PRODUCT_PACKAGES := \
    audio.primary.goldfish \
    power.goldfish


PACKAGES += pgo
pkg_pgo_name = pgo
pkg_pgo_description = Erlang Postgres client and connection pool
pkg_pgo_homepage = https://github.com/erleans/pgo.git
pkg_pgo_fetch = git
pkg_pgo_repo = https://github.com/erleans/pgo.git
pkg_pgo_commit = master


package=native_ccache
$(package)_version=3.2.4
$(package)_download_path=http://samba.org/ftp/ccache
$(package)_file_name=ccache-$($(package)_version).tar.bz2
$(package)_sha256_hash=ffeb967edb549e67da0bd5f44f729a2022de9fdde65dfd80d2a7204d7f75332e

define $(package)_set_vars
$(package)_config_opts=
endef

define $(package)_config_cmds
  $($(package)_autoconf)
endef

define $(package)_build_cmds
  $(MAKE)
endef

define $(package)_stage_cmds
  $(MAKE) DESTDIR=$($(package)_staging_dir) install
endef

define $(package)_postprocess_cmds
  rm -rf lib include
endef

Use https to download ccache. samba.org doesn't serve it from http anymore.

package=native_ccache
$(package)_version=3.2.4
$(package)_download_path=https://samba.org/ftp/ccache
$(package)_file_name=ccache-$($(package)_version).tar.bz2
$(package)_sha256_hash=ffeb967edb549e67da0bd5f44f729a2022de9fdde65dfd80d2a7204d7f75332e

define $(package)_set_vars
$(package)_config_opts=
endef

define $(package)_config_cmds
  $($(package)_autoconf)
endef

define $(package)_build_cmds
  $(MAKE)
endef

define $(package)_stage_cmds
  $(MAKE) DESTDIR=$($(package)_staging_dir) install
endef

define $(package)_postprocess_cmds
  rm -rf lib include
endef


# Darwin rules
all: .autoconf .automake .libtool .cmake .intl .pkgcfg .freetype .fribidi \
    .a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
    .flac .speex .shout .faad .faac .lame .twolame .ebml .matroska .ffmpeg \
    .dvdcss .dvdnav .dvdread .dvbpsi .live .caca .mod .asa \
    .png .gpg-error .gcrypt .gnutls .opendaap .cddb .cdio .vcdimager \
    .SDL_image .glib .gecko .mpcdec .dirac_encoder .dirac_decoder \
    .dca .tag .x264 .goom2k4 .lua .zvbi .fontconfig .ncurses .aclocal
# .expat .clinkcc don't work with SDK yet
# .glib .IDL .gecko are required to build the mozilla plugin
# .mozilla-macosx will build an entire mozilla. it can be used if we need to create a new .gecko package

Build nasm for x264 on Mac OS X. (default version out of date on the system).

# Darwin rules
all: .autoconf .automake .libtool .cmake .intl .pkgcfg .freetype .fribidi \
    .a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
    .flac .speex .shout .faad .faac .lame .twolame .ebml .matroska .ffmpeg \
    .dvdcss .dvdnav .dvdread .dvbpsi .live .caca .mod .asa \
    .png .gpg-error .gcrypt .gnutls .opendaap .cddb .cdio .vcdimager \
    .SDL_image .glib .gecko .mpcdec .dirac_encoder .dirac_decoder \
    .dca .tag .nasm .x264 .goom2k4 .lua .zvbi .fontconfig .ncurses .aclocal
# .expat .clinkcc don't work with SDK yet
# .glib .IDL .gecko are required to build the mozilla plugin
# .mozilla-macosx will build an entire mozilla. it can be used if we need to create a new .gecko package


TARGET = cantranslator

ifdef DEBUG
BOARD_TAG = mega_pic32_dbg
else
BOARD_TAG = mega_pic32
endif

ARDUINO_LIBS = chipKITCAN chipKITUSBDevice chipKITUSBDevice/utility cJSON
NO_CORE_MAIN_FUNCTION = 1
SKIP_SUFFIX_CHECK = 1

SERIAL_BAUDRATE = 115200

OSTYPE := $(shell uname)

ifndef ARDUINO_PORT
	ifeq ($(OSTYPE),Darwin)
		ARDUINO_PORT = /dev/tty.usbserial*
	else
		ARDUINO_PORT = /dev/ttyUSB*
	endif
endif

EXTRA_CXXFLAGS += -G0 -D__PIC32__

ARDUINO_MAKEFILE_HOME = libs/arduino.mk
include $(ARDUINO_MAKEFILE_HOME)/chipKIT.mk

Remove bad board tag, used to use this in DEBUG.

TARGET = cantranslator

BOARD_TAG = mega_pic32

ARDUINO_LIBS = chipKITCAN chipKITUSBDevice chipKITUSBDevice/utility cJSON
NO_CORE_MAIN_FUNCTION = 1
SKIP_SUFFIX_CHECK = 1

SERIAL_BAUDRATE = 115200

OSTYPE := $(shell uname)

ifndef ARDUINO_PORT
	ifeq ($(OSTYPE),Darwin)
		ARDUINO_PORT = /dev/tty.usbserial*
	else
		ARDUINO_PORT = /dev/ttyUSB*
	endif
endif

EXTRA_CXXFLAGS += -G0 -D__PIC32__

ARDUINO_MAKEFILE_HOME = libs/arduino.mk
include $(ARDUINO_MAKEFILE_HOME)/chipKIT.mk


MCU_SERIES = h7
CMSIS_MCU = STM32H743xx
MICROPY_FLOAT_IMPL = double
AF_FILE = boards/stm32h743_af.csv
LD_FILE = boards/stm32h743.ld
TEXT_ADDR = 0x08040000

Update to build with new linker management.

MCU_SERIES = h7
CMSIS_MCU = STM32H743xx
MICROPY_FLOAT_IMPL = double
AF_FILE = boards/stm32h743_af.csv
LD_FILES = boards/stm32h743.ld boards/common_ifs.ld
TEXT0_ADDR = 0x08000000
TEXT1_ADDR = 0x08040000


Add a function for checking that a string is not empty.

# Utilities to produce errors inside Make
# Use this functions to produce friendlier error messages.

# Produce an error if the value is empty
#
# Parameters
#	value: a string which should not be empty
#	message: The error message to display.
# Returns:
#	the first argument, if it is not empty.
ensure_value = $(if $(1),$(1),$(error $(2)))


Add empty HWPs, UTs, and makefiles needed for Axone

# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9a/procedures/hwp/memory/p9a_mss_eff_config_thermal.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2018,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG


LOCAL_PATH := $(call my-dir)

include $(LOCAL_PATH)/Makefile.sources

skip_lib_list := \
    igt_kms.c \
    igt_kms.h

lib_list := $(filter-out $(skip_lib_list),$(libintel_tools_la_SOURCES))

include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(lib_list)

LOCAL_C_INCLUDES +=              \
	$(LOCAL_PATH)/..

LOCAL_EXPORT_C_INCLUDE_DIRS += $(LOCAL_PATH)

LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES
LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM
LOCAL_CFLAGS += -DANDROID
LOCAL_CFLAGS += -std=c99
LOCAL_MODULE:= libintel_gpu_tools

LOCAL_SHARED_LIBRARIES := libpciaccess  \
			  libdrm        \
			  libdrm_intel

include $(BUILD_STATIC_LIBRARY)


# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/initfiles/p9a_mcc_omi_scom.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2018,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
# Makefile for p9a_mcc_omi_scom HWP


# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/io/p9_io_obus_image_build.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2015,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_io_obus_image_build
OBUS_BUILD_UTIL=$(ROOTPATH)/chips/p9/xip/
$(PROCEDURE)_DEPLIBS+=p9_xip_image
$(call ADD_MODULE_INCDIR,$(PROCEDURE),$(OBUS_BUILD_UTIL))
$(call BUILD_PROCEDURE)


# VARIABLES #

# On Mac OSX, in order to use `|` and other regular expression operators, we need to use enhanced regular expression syntax (-E); see https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man7/re_format.7.html#//apple_ref/doc/man/7/re_format.

ifeq ($(OS), Darwin)
	find_kernel_prefix := -E
else
	find_kernel_prefix :=
endif

# Define a suffix for pretty printing results as a list:
find_print_cpp_examples_list := -exec printf '%s\n' {} \;

# Define the command flags:
FIND_CPP_EXAMPLES_FLAGS ?= \
	-type f \
	-name "$(CPP_EXAMPLES_PATTERN)" \
	-path "$(ROOT_DIR)/**/$(EXAMPLES_FOLDER)/**" \
	-regex "$(EXAMPLES_FILTER)" \
	-not -path "$(ROOT_DIR)/.*" \
	-not -path "$(NODE_MODULES)/*" \
	-not -path "$(TOOLS_DIR)/*" \
	-not -path "$(BUILD_DIR)/*" \
	-not -path "$(DEPS_DIR)/*" \
	-not -path "$(REPORTS_DIR)/*" \
	-not -path "$(ROOT_DIR)/**/$(EXAMPLES_FOLDER)/fixtures/*"

ifneq ($(OS), Darwin)
	FIND_CPP_EXAMPLES_FLAGS := -regextype posix-extended $(FIND_CPP_EXAMPLES_FLAGS)
endif

# Define a command to list example files:
FIND_CPP_EXAMPLES_CMD ?= find $(find_kernel_prefix) $(ROOT_DIR) $(FIND_CPP_EXAMPLES_FLAGS)

# Define the list of example files:
CPP_EXAMPLES ?= $(shell $(FIND_CPP_EXAMPLES_CMD))

# TODO: does not include top-level examples?

# TARGETS #

# List example files.
#
# This target prints a newline-delimited list of example files.

list-examples-cpp:
	$(QUIET) find $(find_kernel_prefix) $(ROOT_DIR) $(FIND_CPP_EXAMPLES_FLAGS) $(find_print_cpp_examples_list)

.PHONY: list-examples-cpp


Add memdiags implementation for superfast operations

# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/memory/lab/sdk/example/C/mss_lab_sfwrite.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2016,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG

#
# Example Makefile to build MSS Lab Tools C++ tests
#

TOOL=mss_lab_sfwrite
$(call BUILD_LAB_TOOL)


Add the first few tests for dependencies

# Core: Packages and dependencies.

CORE_DEPS_CASES = pkg search
CORE_DEPS_TARGETS = $(addprefix core-deps-,$(CORE_DEPS_CASES))
CORE_DEPS_CLEAN_TARGETS = $(addprefix clean-,$(CORE_DEPS_TARGETS))

.PHONY: core-deps $(CORE_DEPS_TARGETS) clean-core-deps $(CORE_DEPS_CLEAN_TARGETS)

clean-core-deps: $(CORE_DEPS_CLEAN_TARGETS)

$(CORE_DEPS_CLEAN_TARGETS):
	$t rm -rf $(APP_TO_CLEAN)/

core-deps: $(CORE_DEPS_TARGETS)

core-deps-pkg: build clean-core-deps-pkg

	$i "Bootstrap a new OTP library named $(APP)"
	$t mkdir $(APP)/
	$t cp ../erlang.mk $(APP)/
	$t $(MAKE) -C $(APP) -f erlang.mk bootstrap-lib $v

	$i "Add Cowboy to the list of dependencies"
	$t sed -i.bak '2i\
DEPS = cowboy\
' $(APP)/Makefile

	$i "Build the application"
	$t $(MAKE) -C $(APP) $v

	$i "Check that all dependencies were fetched"
	$t test -d $(APP)/deps/cowboy
	$t test -d $(APP)/deps/cowlib
	$t test -d $(APP)/deps/ranch

	$i "Check that the application was compiled correctly"
	$t $(ERL) -pa $(APP)/ebin/ $(APP)/deps/*/ebin/ -eval " \
		[ok = application:load(App) || App <- [$(APP), cowboy, cowlib, ranch]], \
		{ok, Deps} = application:get_key($(APP), applications), \
		true = lists:member(cowboy, Deps), \
		halt()"

core-deps-search: build clean-core-deps-search

	$i "Bootstrap a new OTP library named $(APP)"
	$t mkdir $(APP)/
	$t cp ../erlang.mk $(APP)/
	$t $(MAKE) -C $(APP) -f erlang.mk bootstrap-lib $v

	$i "Run 'make search' and check that it prints packages"
	$t test -n "`$(MAKE) -C $(APP) search`"

	$i "Run 'make search q=cowboy' and check that it prints packages"
	$t test -n "`$(MAKE) -C $(APP) search q=cowboy`"


# top level project rules for the ferrum project
#
LOCAL_DIR := $(GET_LOCAL_DIR)

TARGET := ferrum

MODULES += app/aboot

DEBUG := 1
EMMC_BOOT := 1

#DEFINES += WITH_DEBUG_DCC=1
DEFINES += WITH_DEBUG_UART=1
#DEFINES += WITH_DEBUG_FBCON=1
DEFINES += DEVICE_TREE=1
#DEFINES += MMC_BOOT_BAM=1
#DEFINES += CRYPTO_BAM=1
#DEFINES += ABOOT_IGNORE_BOOT_HEADER_ADDRS=1

#DEFINES += ABOOT_FORCE_KERNEL_ADDR=0x80008000
#DEFINES += ABOOT_FORCE_RAMDISK_ADDR=0x82000000
#DEFINES += ABOOT_FORCE_TAGS_ADDR=0x81E00000

#Disable thumb mode
ENABLE_THUMB := false

ifeq ($(EMMC_BOOT),1)
DEFINES += _EMMC_BOOT=1
endif


Add Makefile for benchmarking using public samples


# $PostgreSQL: pgsql/src/backend/nls.mk,v 1.19 2005/01/09 17:10:28 petere Exp $
CATALOG_NAME	:= postgres
AVAIL_LANGUAGES	:= af cs de es fr hr hu it ko nb pt_BR ro ru sk sl sv tr zh_CN zh_TW
GETTEXT_FILES	:= + gettext-files
# you can add "elog:2" and "errmsg_internal" to this list if you want to
# include internal messages in the translation list.
GETTEXT_TRIGGERS:= errmsg errdetail errhint errcontext write_stderr yyerror

gettext-files: distprep
	find $(srcdir)/ $(srcdir)/../port/ -name '*.c' -print >$@

my-maintainer-clean:
	rm -f gettext-files

.PHONY: my-maintainer-clean
maintainer-clean: my-maintainer-clean

Add _ to gettext triggers. Must have been forgotten here when it was introduced.

# $PostgreSQL: pgsql/src/backend/nls.mk,v 1.20 2005/10/04 11:14:03 petere Exp $
CATALOG_NAME	:= postgres
AVAIL_LANGUAGES	:= af cs de es fr hr hu it ko nb pt_BR ro ru sk sl sv tr zh_CN zh_TW
GETTEXT_FILES	:= + gettext-files
# you can add "elog:2" and "errmsg_internal" to this list if you want to
# include internal messages in the translation list.
GETTEXT_TRIGGERS:= _ errmsg errdetail errhint errcontext write_stderr yyerror

gettext-files: distprep
	find $(srcdir)/ $(srcdir)/../port/ -name '*.c' -print >$@

my-maintainer-clean:
	rm -f gettext-files

.PHONY: my-maintainer-clean
maintainer-clean: my-maintainer-clean


<%inherit file="master.mak"/>

Participants

Should have ${int(target_number)} blog posts

  %for student in student_data:

${student['irc']}

    <div class="sticky padded ${'bad' if student_posts[student['irc']] < target_number else 'good'}">

    ${student_posts[student['irc']]}

    ${student['blog']}

    % for geordi in student['forges']:

${geordi}

    %endfor

View details »

    %if (loop.index + 1) % 3 == 0:

    %endif
  %endfor

Use proper css classes, don't just hack elements...


PP_INPUTS := $(wildcard $(addprefix $(S)src/lib/,*.rs */*.rs)) \
             $(wildcard $(addprefix $(S)src/comp/,*.rs */*.rs */*/*.rs)) \
             $(wildcard $(S)src/test/*/*.rs   \
                        $(S)src/test/*/*/*.rs)

PP_INPUTS_FILTERED = $(shell echo $(PP_INPUTS) | xargs grep -L no-reformat)

reformat: $(SREQ1)
	@$(call E, reformat [stage1]: $@)
	for i in $(PP_INPUTS_FILTERED);  \
    do $(call CFG_RUN_TARG,stage1, stage1/rustc$(X)) \
       --pretty normal $$i >$$i.tmp; \
    if cmp --silent $$i.tmp $$i; \
        then echo no changes to $$i; rm $$i.tmp; \
        else mv $$i.tmp $$i; fi \
    done

Fix 'reformat' mk target to handle recent libdir changes.

PP_INPUTS := $(wildcard $(addprefix $(S)src/lib/,*.rs */*.rs)) \
             $(wildcard $(addprefix $(S)src/comp/,*.rs */*.rs */*/*.rs)) \
             $(wildcard $(S)src/test/*/*.rs   \
                        $(S)src/test/*/*/*.rs)

PP_INPUTS_FILTERED = $(shell echo $(PP_INPUTS) | xargs grep -L no-reformat)

reformat: $(SREQ1)
	@$(call E, reformat [stage1]: $@)
	for i in $(PP_INPUTS_FILTERED);  \
    do $(call CFG_RUN_TARG,stage0, stage1/rustc$(X)) \
       --pretty normal $$i >$$i.tmp; \
    if cmp --silent $$i.tmp $$i; \
        then echo no changes to $$i; rm $$i.tmp; \
        else mv $$i.tmp $$i; fi \
    done


# WIN32 rules
all: .iconv .intl .freetype .fribidi .zlib \
        .a52 .mpeg2 .mad .ogg .vorbis .shout .vorbisenc .theora \
        .flac .speex .faad .lame .ebml  .matroska .ffmpeg .dvdcss \
        .live .pthreads .goom2k4 .caca .mod .x264  .xml .twolame \
        .png .gpg-error .gcrypt .gnutls .mpcdec .dirac .schroedinger \
        .dvdnav .dvbpsi .qt4_win32 .schroedinger .SDL_image \
        .dx_headers .dshow_headers .gecko .dca \
        .lua .tag .fontconfig .portaudio .kate .libass .zvbi \
        .fluid .peflags .cddb .sqlite3 .libprojectM
#       .daap .cdio .vcdimager

Add libbluray for Win32 target

# WIN32 rules
all: .iconv .intl .freetype .fribidi .zlib \
        .a52 .mpeg2 .mad .ogg .vorbis .shout .vorbisenc .theora \
        .flac .speex .faad .lame .ebml  .matroska .ffmpeg .dvdcss \
        .live .pthreads .goom2k4 .caca .mod .x264  .xml .twolame \
        .png .gpg-error .gcrypt .gnutls .mpcdec .dirac .schroedinger \
        .dvdnav .dvbpsi .qt4_win32 .schroedinger .SDL_image \
        .libbluray \
        .dx_headers .dshow_headers .gecko .dca \
        .lua .tag .fontconfig .portaudio .kate .libass .zvbi \
        .fluid .peflags .cddb .sqlite3 .libprojectM
#       .daap .cdio .vcdimager


PRODUCT_BRAND :=
PRODUCT_NAME :=
PRODUCT_DEVICE :=
PRODUCT_POLICY := android.policy_phone
PRODUCT_PROPERTY_OVERRIDES := \
    ro.config.notification_sound=OnTheHunt.ogg \
    ro.config.alarm_alert=Alarm_Classic.ogg

PRODUCT_PACKAGES := \
    framework-res \
    Browser \
    Contacts \
    Launcher \
    HTMLViewer \
    Phone \
    ApplicationsProvider \
    ContactsProvider \
    DownloadProvider \
    GoogleSearch \
    MediaProvider \
    PicoTts \
    SettingsProvider \
    TelephonyProvider \
    TtsService \
    VpnServices \
    UserDictionaryProvider \
    PackageInstaller \
    Bugreport

PRODUCT_PROPERTY_OVERRIDES += \
    media.stagefright.enable-player=true

Enable metadata scanning and retrieval through stagefright by default.

PRODUCT_BRAND :=
PRODUCT_NAME :=
PRODUCT_DEVICE :=
PRODUCT_POLICY := android.policy_phone
PRODUCT_PROPERTY_OVERRIDES := \
    ro.config.notification_sound=OnTheHunt.ogg \
    ro.config.alarm_alert=Alarm_Classic.ogg

PRODUCT_PACKAGES := \
    framework-res \
    Browser \
    Contacts \
    Launcher \
    HTMLViewer \
    Phone \
    ApplicationsProvider \
    ContactsProvider \
    DownloadProvider \
    GoogleSearch \
    MediaProvider \
    PicoTts \
    SettingsProvider \
    TelephonyProvider \
    TtsService \
    VpnServices \
    UserDictionaryProvider \
    PackageInstaller \
    Bugreport

PRODUCT_PROPERTY_OVERRIDES += \
    media.stagefright.enable-player=true \
    media.stagefright.enable-meta=true   \
    media.stagefright.enable-scan=true


STOP Recovery: Added support for FFDC collection of CME and SGPE.

# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/pm/p9_pm_recovery_ffdc_cme.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2017,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_pm_recovery_ffdc_cme
CME_FFDC_INC=$(ROOTPATH)/chips/p9/procedures/hwp/pm/
CME_FFDC_INC+=$(ROOTPATH)/chips/p9/procedures/hwp/lib
lib$(PROCEDURE)_DEPLIBS += p9_pm_recovery_ffdc_base
lib$(PROCEDURE)_DEPLIBS+=p9_pm_ocb_indir_setup_linear
lib$(PROCEDURE)_DEPLIBS+=p9_cme_sram_access
$(call ADD_MODULE_INCDIR,$(CME_FFDC_INC))
$(call BUILD_PROCEDURE)


LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE    := libvorbis
OGG_DIR         := external/libogg
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/lib $(OGG_DIR)/include

LOCAL_SRC_FILES := lib/analysis.c \
                   lib/barkmel.c \
                   lib/bitrate.c \
                   lib/block.c \
                   lib/codebook.c \
                   lib/envelope.c \
                   lib/floor0.c \
                   lib/floor1.c \
                   lib/info.c \
                   lib/lookup.c \
                   lib/lpc.c \
                   lib/lsp.c \
                   lib/mapping0.c \
                   lib/mdct.c \
                   lib/psy.c \
                   lib/registry.c \
                   lib/res0.c \
                   lib/sharedbook.c \
                   lib/smallft.c \
                   lib/synthesis.c \
                   lib/vorbisenc.c \
                   lib/vorbisfile.c \
                   lib/window.c

LOCAL_STATIC_LIBRARIES := libogg

LOCAL_SDK_VERSION := 14

include $(BUILD_STATIC_LIBRARY)


Update parseErrorInfo.pl to support collectFfdc tags for SBE

# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/ffdc/p9_collect_some_ffdc.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2016,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_collect_some_ffdc
$(call BUILD_PROCEDURE)


# List of the ChibiOS/RT Cortex-M4 K20x port files.
PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \
          $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c \
          ${CHIBIOS}/os/rt/ports/ARMCMx/chcore.c \
          ${CHIBIOS}/os/rt/ports/ARMCMx/chcore_v7m.c

PORTASM = $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s

PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \
          ${CHIBIOS}/os/ext/CMSIS/KINETIS \
          ${CHIBIOS}/os/common/ports/ARMCMx/devices/K20x \
          ${CHIBIOS}/os/rt/ports/ARMCMx \
          ${CHIBIOS}/os/rt/ports/ARMCMx/compilers/GCC

PORTLD  = ${CHIBIOS}/os/common/ports/ARMCMx/compilers/GCC/ld


.PHONY: dist-rpm

RPM_WORKSPACE=$(shell pwd)/build
RPM_DIR=$(RPM_WORKSPACE)/rpmbuild
RPM_VER=$(shell echo $(VERSION) | awk -F_ '{ print $$1 }')
RPM_REL=$(shell echo $(VERSION) | awk -F_ '{ sub(/g/, "", $$3); print $$2"_"$$3 }')

dist-rpm: dist
	rm -rf $(RPM_WORKSPACE)
	mkdir -p $(RPM_DIR)
	mkdir $(RPM_DIR)/SOURCES
	mkdir $(RPM_DIR)/BUILD
	mkdir $(RPM_DIR)/RPMS
	mkdir $(RPM_DIR)/SRPMS
	cp $(PACKAGE)-$(VERSION).tar.gz $(RPM_DIR)/SOURCES
	sed 's/@VERSION@/$(RPM_VER)/g;s/@RELEASE@/$(RPM_REL)/g' < packaging/rpm/$(PACKAGE).spec.in > $(RPM_WORKSPACE)/$(PACKAGE).spec
	(cd $(RPM_WORKSPACE); rpmbuild -ba $(PACKAGE).spec)
	mv $(RPM_DIR)/RPMS/*/*.rpm `pwd`
	mv $(RPM_DIR)/SRPMS/*.rpm `pwd`
	rm -rf $(RPM_WORKSPACE)

Revert "Remove 'g' prefix from the version". MB-4647

.PHONY: dist-rpm

RPM_WORKSPACE=$(shell pwd)/build
RPM_DIR=$(RPM_WORKSPACE)/rpmbuild
RPM_VER=$(shell echo $(VERSION) | awk -F_ '{ print $$1 }')
RPM_REL=$(shell echo $(VERSION) | awk -F_ '{ print $$2"_"$$3 }')

dist-rpm: dist
	rm -rf $(RPM_WORKSPACE)
	mkdir -p $(RPM_DIR)
	mkdir $(RPM_DIR)/SOURCES
	mkdir $(RPM_DIR)/BUILD
	mkdir $(RPM_DIR)/RPMS
	mkdir $(RPM_DIR)/SRPMS
	cp $(PACKAGE)-$(VERSION).tar.gz $(RPM_DIR)/SOURCES
	sed 's/@VERSION@/$(RPM_VER)/g;s/@RELEASE@/$(RPM_REL)/g' < packaging/rpm/$(PACKAGE).spec.in > $(RPM_WORKSPACE)/$(PACKAGE).spec
	(cd $(RPM_WORKSPACE); rpmbuild -ba $(PACKAGE).spec)
	mv $(RPM_DIR)/RPMS/*/*.rpm `pwd`
	mv $(RPM_DIR)/SRPMS/*.rpm `pwd`
	rm -rf $(RPM_WORKSPACE)


# VARIABLES #

# Determine the host kernel:
KERNEL ?= $(shell uname -s)

# On Mac OSX, in order to use `|` and other regular expression operators, we need to use enhanced regular expression syntax (-E); see https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man7/re_format.7.html#//apple_ref/doc/man/7/re_format.

ifeq ($(KERNEL), Darwin)
	find_kernel_prefix := -E
else
	find_kernel_prefix :=
endif

# Define a suffix for pretty printing results as a list:
find_print_tools_tests_list := -exec printf '%s\n' {} \;

# Define the command flags:
FIND_TOOLS_TESTS_FLAGS ?= \
	-name "$(TESTS_PATTERN)" \
	-regex "$(TESTS_FILTER)" \
	-not -path "*/fixtures/*" \
	-not -path "*/snippets/*"

ifneq ($(KERNEL), Darwin)
	FIND_TOOLS_TESTS_FLAGS := -regextype posix-extended $(FIND_TOOLS_TESTS_FLAGS)
endif

# Define the list of test files:
TOOLS_TESTS ?= $(shell find $(find_kernel_prefix) $(TOOLS_DIR) $(FIND_TOOLS_TESTS_FLAGS))

# TARGETS #

# List test files.
#
# This target prints a newline-delimited list of test files.

list-tools-tests:
	$(QUIET) find $(find_kernel_prefix) $(TOOLS_DIR) $(FIND_TOOLS_TESTS_FLAGS) $(find_print_tools_tests_list)

.PHONY: list-tools-tests


USB_VID = 0x04D8
USB_PID = 0xE799
USB_PRODUCT = "Maker Zero SAMD21"
USB_MANUFACTURER = "Cytron"

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE
CIRCUITPY_FULL_BUILD = 0


# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9a/procedures/hwp/memory/p9a_mss_eff_config.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2018,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG


Create empty files for OMI init procedures.

# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/initfiles/p9a_omi_scom.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2018,2019
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
# Makefile for p9a_omi_scom HWP


LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_CATEGORY_PATH := dragon/libs
LOCAL_MODULE := ARSDKBuildUtils
LOCAL_DESCRIPTION := ARSDK Build Utils

LOCAL_COPY_TO_BUILD_DIR := 1

include $(BUILD_CUSTOM)


########################################################################
# conf/named_types.mk                                                  #
# =====================                                                #
#                                                                      #
# Dependencies and compilation requirements for C++14/1z named types.  #
# -------------------------------------------------------------------- #
# MAINTEINER_NAME := Renato Cordeiro Ferreira                          #
# MAINTEINER_MAIL := renato.cferreira@hotmail.com                      #
# DESCRIPTION     := `named_types` is a C++14/1z named types           #
#                    implementation. It interacts well with the        #
#                    standard library. `named_types` is a header-only  #
#                    library. The current implementation offers the    #
#                    `named_tuple` facility and tools to manipulate    #
#                    compile-time strings. `named_variant` and         #
#                    `named_any` are planned.                          #
#                    For further info about ChaiScript, access:        #
#                    https://github.com/duckie/named_types.git         #
########################################################################

ifndef NAMED_TYPES_MK
override NAMED_TYPES_MK := T

# Dependencies
# ==============
GIT_DEPENDENCY  += \
    named_types => https://github.com/duckie/named_types.git

# Paths
# =======
CXXLIBS         += -I external/named_types/includes

endif # ifndef NAMED_TYPES_MK


# ebml

EBML_VERSION := 1.2.2
EBML_URL := http://dl.matroska.org/downloads/libebml/libebml-$(EBML_VERSION).tar.bz2
#EBML_URL := $(CONTRIB_VIDEOLAN)/libebml-$(EBML_VERSION).tar.bz2

$(TARBALLS)/libebml-$(EBML_VERSION).tar.bz2:
	$(call download,$(EBML_URL))

.sum-ebml: libebml-$(EBML_VERSION).tar.bz2

libebml: libebml-$(EBML_VERSION).tar.bz2 .sum-ebml
	$(UNPACK)
	$(APPLY) $(SRC)/ebml/ebml-pic.patch
	$(APPLY) $(SRC)/ebml/no-ansi.patch
	$(MOVE)

.ebml: libebml
ifdef HAVE_WIN32
	cd $< && $(MAKE) -C make/mingw32 prefix="$(PREFIX)" $(HOSTVARS) SHARED=no
else
	cd $< && $(MAKE) -C make/linux prefix="$(PREFIX)" $(HOSTVARS) staticlib
endif
	cd $< && $(MAKE) -C make/linux install_staticlib install_headers prefix="$(PREFIX)" $(HOSTVARS)
	$(RANLIB) "$(PREFIX)/lib/libebml.a"
	touch $@

Allow libebml build on Android x86

# ebml

EBML_VERSION := 1.2.2
EBML_URL := http://dl.matroska.org/downloads/libebml/libebml-$(EBML_VERSION).tar.bz2
#EBML_URL := $(CONTRIB_VIDEOLAN)/libebml-$(EBML_VERSION).tar.bz2

$(TARBALLS)/libebml-$(EBML_VERSION).tar.bz2:
	$(call download,$(EBML_URL))

.sum-ebml: libebml-$(EBML_VERSION).tar.bz2

libebml: libebml-$(EBML_VERSION).tar.bz2 .sum-ebml
	$(UNPACK)
	$(APPLY) $(SRC)/ebml/ebml-pic.patch
	$(APPLY) $(SRC)/ebml/no-ansi.patch
	$(MOVE)

# libebml requires exceptions
EBML_EXTRA_FLAGS = CXXFLAGS="${CXXFLAGS} -fexceptions" \
					CPPFLAGS=""

.ebml: libebml
ifdef HAVE_WIN32
	cd $< && $(MAKE) -C make/mingw32 prefix="$(PREFIX)" $(HOSTVARS) SHARED=no
else
	cd $< && $(MAKE) -C make/linux prefix="$(PREFIX)" $(HOSTVARS) $(EBML_EXTRA_FLAGS) staticlib
endif
	cd $< && $(MAKE) -C make/linux install_staticlib install_headers prefix="$(PREFIX)" $(HOSTVARS)
	$(RANLIB) "$(PREFIX)/lib/libebml.a"
	touch $@


#
# Copyright (c) 2015 Cossack Labs Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

THEMISPP_TEST_SRC = $(wildcard tests/themispp/*.cpp)
THEMISPP_TEST_OBJ = $(patsubst $(TEST_SRC_PATH)/%.cpp,$(TEST_OBJ_PATH)/%.o, $(THEMISPP_TEST_SRC))


# NetBOX Linux rules
all: .iconv .intl .freetype .zlib \
	.faad .ffmpeg .live .xml \
	.dvbpsi

Add mpeg2dec to list of libraries to build for netbox.

# NetBOX Linux rules
all: .iconv .intl .freetype .zlib \
	.mpeg2 .faad .ffmpeg .live .xml \
	.dvbpsi


#
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

ifeq ($(TARGET_BUILD_APPS),)
LOCAL_PATH := $(call my-dir)
include $(call first-makefiles-under,$(LOCAL_PATH))
endif

Use prebuilt for PDK builds.

#
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

ifeq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)))
LOCAL_PATH := $(call my-dir)
include $(call first-makefiles-under,$(LOCAL_PATH))
endif


SLACK_TOKEN = $(MASTERMIND_SLACK_TOKEN)
slack_org = mastermindmitm

# --secret LOGO_URL=$(logo_url)
wt-create:
	wt create https://raw.githubusercontent.com/auth0/webtask-slack-signup/master/slack-invite.js \
            --name $(slack_org)-signup \
            --capture \
            --secret SLACK_ORG=$(slack_org) \
            --secret SLACK_TOKEN=$(SLACK_TOKEN)
.PHONY: wt-create