# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/memory/p9_mss_freq.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

# Include the macros and things for MSS procedures
-include 00common.mk

PROCEDURE=p9_mss_freq
$(eval $(call ADD_MEMORY_INCDIRS,$(PROCEDURE)))
lib$(PROCEDURE)_DEPLIBS+=mss
$(call BUILD_PROCEDURE)

Change mss build to account for double free in wrappers

# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/memory/p9_mss_freq.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

# Include the macros and things for MSS procedures
-include 00common.mk

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


<%def name="footer()">

</%def>

Raise the moksha logo a little


# Copyright (C) 2010 Erik Rainey
#
# 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.

-include $(PRELUDE)
TARGET		:= clmath
TARGETTYPE	:= library
CSOURCES	:= clmath.c
-include $(FINALE)

Enable CL in math lib

# Copyright (C) 2010 Erik Rainey
#
# 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.

-include $(PRELUDE)
TARGET		:= clmath
TARGETTYPE	:= library
CSOURCES	:= clmath.c
USE_OPENCL      := true
-include $(FINALE)


USB_VID = 0x239A
USB_PID = 0x80F6
USB_PRODUCT = "Pico:ed"
USB_MANUFACTURER = "ELECFREAKS"

CHIP_VARIANT = RP2040
CHIP_FAMILY = rp2

EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ"

CIRCUITPY__EVE = 1

Modify USB VID and PID of the Pico:ed

USB_VID = 0x2E8A
USB_PID = 0x1026
USB_PRODUCT = "Pico:ed"
USB_MANUFACTURER = "ELECFREAKS"

CHIP_VARIANT = RP2040
CHIP_FAMILY = rp2

EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ"

CIRCUITPY__EVE = 1


USB_VID = 0x239A
USB_PID = 0x80CA
USB_PRODUCT = "Matrix Portal M4"
USB_MANUFACTURER = "Adafruit Industries LLC"

CHIP_VARIANT = SAMD51J19A
CHIP_FAMILY = samd51

QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C"
LONGINT_IMPL = MPZ

CIRCUITPY_LTO_PARTITION = one

CIRCUITPY_AESIO = 0
CIRCUITPY_ONEWIREIO = 0
CIRCUITPY_PARALLELDISPLAY = 0
CIRCUITPY_SDCARDIO = 0
CIRCUITPY_SHARPDISPLAY = 0
CIRCUITPY_ZLIB=0

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

Disable gifio on matrixportal to reclaim flash space

USB_VID = 0x239A
USB_PID = 0x80CA
USB_PRODUCT = "Matrix Portal M4"
USB_MANUFACTURER = "Adafruit Industries LLC"

CHIP_VARIANT = SAMD51J19A
CHIP_FAMILY = samd51

QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C"
LONGINT_IMPL = MPZ

CIRCUITPY_LTO_PARTITION = one

CIRCUITPY_AESIO = 0
CIRCUITPY_GIFIO = 0
CIRCUITPY_ONEWIREIO = 0
CIRCUITPY_PARALLELDISPLAY = 0
CIRCUITPY_SDCARDIO = 0
CIRCUITPY_SHARPDISPLAY = 0
CIRCUITPY_ZLIB=0

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


USB_VID = 0x1B4F
USB_PID = 0x0015
USB_PRODUCT = "RedBoard Turbo Board"
USB_MANUFACTURER = "SparkFun Electronics"

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

SPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = "W25Q32FV"
LONGINT_IMPL = MPZ

CIRCUITPY_FULL_BUILD = 0

# Turn off audioio/audiobusio/usbmidi to save flash space since this board
# is resource limited

CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_AUDIOIO = 0
CIRCUITPY_USB_MIDI = 0

Revert "Disabled audioio, audiobusio, USB midi for sparkfun_redboard_turbo to save flash space"


USB_VID = 0x239A
USB_PID = 0x80AC
USB_PRODUCT = "CrumpS2"
USB_MANUFACTURER = "CrumpSpace"

INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = MPZ

# The default queue depth of 16 overflows on release builds,
# so increase it to 32.
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32

CIRCUITPY_ESP_FLASH_MODE=dio
CIRCUITPY_ESP_FLASH_FREQ=40m
CIRCUITPY_ESP_FLASH_SIZE=4MB

CIRCUITPY_BITBANG_APA102 = 1

CIRCUITPY_MODULE=wrover

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

Update PID/VID to real values

USB_VID = 0x1209
USB_PID = 0x3141
USB_PRODUCT = "CrumpS2"
USB_MANUFACTURER = "CrumpSpace"

INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = MPZ

# The default queue depth of 16 overflows on release builds,
# so increase it to 32.
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32

CIRCUITPY_ESP_FLASH_MODE=dio
CIRCUITPY_ESP_FLASH_FREQ=40m
CIRCUITPY_ESP_FLASH_SIZE=4MB

CIRCUITPY_BITBANG_APA102 = 1

CIRCUITPY_MODULE=wrover

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


LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_CFLAGS += -DMXT_VERSION=\"$(GIT_VERSION)\"
LOCAL_C_INCLUDES += $(SRC_PATH)
LOCAL_SRC_FILES := jniinterface.c
LOCAL_LDLIBS := -llog
LOCAL_STATIC_LIBRARIES := maxtouch
LOCAL_MODULE    := libmaxtouch-jni

include $(BUILD_SHARED_LIBRARY)

Fix missing libusbdroid dependency for libmaxtouch-jni

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_CFLAGS += -DMXT_VERSION=\"$(GIT_VERSION)\"
LOCAL_C_INCLUDES += $(SRC_PATH)
LOCAL_SRC_FILES := jniinterface.c
LOCAL_LDLIBS := -llog
LOCAL_STATIC_LIBRARIES := maxtouch libusbdroid
LOCAL_MODULE    := libmaxtouch-jni

include $(BUILD_SHARED_LIBRARY)


.PHONY: image tag show-tag
default: push

ORG?=linuxkit
ifeq ($(HASH),)
HASH_COMMIT?=HEAD # Setting this is only really useful with the show-tag target
HASH?=$(shell git ls-tree --full-tree $(HASH_COMMIT) -- $(CURDIR) | awk '{print $$3}')

ifneq ($(HASH_COMMIT),HEAD) # Others can't be dirty by definition
DIRTY=$(shell git update-index -q --refresh && git diff-index --quiet HEAD -- $(CURDIR) || echo "-dirty")
endif
endif

TAG=$(ORG)/$(IMAGE):$(HASH)$(DIRTY)

BASE_DEPS=Dockerfile Makefile

# Get a release tag, if present
RELEASE=$(shell git tag -l --points-at HEAD)

ifdef NETWORK
NET_OPT=
else
NET_OPT=--network=none
endif

ifeq ($(DOCKER_CONTENT_TRUST),)
ifndef NOTRUST
export DOCKER_CONTENT_TRUST=1
endif
endif

show-tag:
	@echo $(TAG)

tag: $(BASE_DEPS) $(DEPS)
	docker pull $(TAG) || docker build $(NET_OPT) -t $(TAG) .

push: tag
ifneq ($(DIRTY),)
	$(error Your repository is not clean. Will not push package image.)
endif
	docker pull $(TAG) || docker push $(TAG)
ifneq ($(RELEASE),)
	docker tag $(TAG) $(ORG)/$(IMAGE):$(RELEASE)
	docker push $(ORG)/$(IMAGE):$(RELEASE)
endif

Reduce the number of times variables containing `$(shell...)` are invoked.

.PHONY: image tag show-tag
default: push

ORG?=linuxkit
ifeq ($(HASH),)
HASH_COMMIT?=HEAD # Setting this is only really useful with the show-tag target
HASH?=$(shell git ls-tree --full-tree $(HASH_COMMIT) -- $(CURDIR) | awk '{print $$3}')

ifneq ($(HASH_COMMIT),HEAD) # Others can't be dirty by definition
DIRTY:=$(shell git update-index -q --refresh && git diff-index --quiet HEAD -- $(CURDIR) || echo "-dirty")
endif
endif

TAG:=$(ORG)/$(IMAGE):$(HASH)$(DIRTY)

BASE_DEPS=Dockerfile Makefile

# Get a release tag, if present
RELEASE:=$(shell git tag -l --points-at HEAD)

ifdef NETWORK
NET_OPT=
else
NET_OPT=--network=none
endif

ifeq ($(DOCKER_CONTENT_TRUST),)
ifndef NOTRUST
export DOCKER_CONTENT_TRUST=1
endif
endif

show-tag:
	@echo $(TAG)

tag: $(BASE_DEPS) $(DEPS)
	docker pull $(TAG) || docker build $(NET_OPT) -t $(TAG) .

push: tag
ifneq ($(DIRTY),)
	$(error Your repository is not clean. Will not push package image.)
endif
	docker pull $(TAG) || docker push $(TAG)
ifneq ($(RELEASE),)
	docker tag $(TAG) $(ORG)/$(IMAGE):$(RELEASE)
	docker push $(ORG)/$(IMAGE):$(RELEASE)
endif


LOCAL_PATH := $(call my-dir)
PROJECT_ROOT:= $(call my-dir)/..

include $(CLEAR_VARS)

OPENCV_INSTALL_MODULES:=on
OPENCV_CAMERA_MODULES:=off
OPENCV_LIB_TYPE:=STATIC
include $(PROJECT_ROOT)/../third_party/OpenCV_sdk_native/jni/OpenCV.mk

LOCAL_MODULE    := tango_ros_native
LOCAL_SRC_FILES := $(LOCAL_PATH)/src/tango_ros_node.cpp $(LOCAL_PATH)/src/tango_ros_util.cpp
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
LOCAL_CFLAGS  += -g3 -ggdb --std=c++11 -pthread -fPIC -fexceptions -frtti -Wunused-parameter -Wunused-variable
LOCAL_LDLIBS += -landroid -lm -llog
LOCAL_STATIC_LIBRARIES += roscpp_android_ndk miniglog
LOCAL_SHARED_LIBRARIES := tango_client_api tango_support_api
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(BUILD_SHARED_LIBRARY)

include $(PROJECT_ROOT)/../third_party/miniglog/Android.mk
$(call import-add-path, $(PROJECT_ROOT)/../third_party)
$(call import-module,roscpp_android_ndk)
$(call import-add-path, $(PROJECT_ROOT)/../third_party/tango_api)
$(call import-module,tango_client_api)
$(call import-module,tango_support_api)

Fix linking error for tango_ros_native.

LOCAL_PATH := $(call my-dir)
PROJECT_ROOT:= $(call my-dir)/..

include $(CLEAR_VARS)

OPENCV_INSTALL_MODULES:=on
OPENCV_CAMERA_MODULES:=off
OPENCV_LIB_TYPE:=STATIC
include $(PROJECT_ROOT)/../third_party/OpenCV_sdk_native/jni/OpenCV.mk

LOCAL_MODULE    := tango_ros_native
LOCAL_SRC_FILES := $(LOCAL_PATH)/src/tango_ros_node.cpp $(LOCAL_PATH)/src/tango_ros_util.cpp
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
LOCAL_CFLAGS  += -g3 -ggdb --std=c++11 -pthread -fPIC -fexceptions -frtti -Wunused-parameter -Wunused-variable
LOCAL_LDLIBS += -landroid -lm -llog
LOCAL_STATIC_LIBRARIES += roscpp_android_ndk miniglog
LOCAL_SHARED_LIBRARIES := tango_client_api tango_support_api
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_DISABLE_FATAL_LINKER_WARNINGS=true
include $(BUILD_SHARED_LIBRARY)

include $(PROJECT_ROOT)/../third_party/miniglog/Android.mk
$(call import-add-path, $(PROJECT_ROOT)/../third_party)
$(call import-module,roscpp_android_ndk)
$(call import-add-path, $(PROJECT_ROOT)/../third_party/tango_api)
$(call import-module,tango_client_api)
$(call import-module,tango_support_api)


# sinit version
VERSION = 0.9.1

# paths
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man

CC = cc
LD = $(CC)
CPPFLAGS =
CFLAGS   = -Wextra -Wall -Wno-unused-result -Os $(CPPFLAGS)
LDFLAGS  = -static

Remove -Wno-unused-result and add -s

# sinit version
VERSION = 0.9.1

# paths
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man

CC = cc
LD = $(CC)
CPPFLAGS =
CFLAGS   = -Wextra -Wall -Os $(CPPFLAGS)
LDFLAGS  = -s -static


# VARIABLES #

# Define the path to the [remark][1] executable.
#
# To install remark:
#     $ npm install remark
#
# [1]: https://www.npmjs.com/package/remark

MARKDOWN_LINT ?= $(BIN_DIR)/remark

# Define [remark-lint][1] as the lint plugin.
#
# To install remark-lint:
#     $ npm install remark-lint
#
# [1]: https://www.npmjs.com/package/remark-lint

REMARK_LINT_PLUGIN ?= remark-lint

# Define the path to the remark configuration file:
REMARK_CONF ?= $(CONFIG_DIR)/remark/.remarkrc.js

# Define the path to the remark ignore file:
REMARK_IGNORE ?= $(CONFIG_DIR)/remark/.remarkignore

# Define the command-line options when invoking the remark executable:
MARKDOWN_LINT_FLAGS ?= \
	--ext $(MARKDOWN_FILENAME_EXT) \
	--rc-path $(REMARK_CONF) \
	--ignore-path $(REMARK_IGNORE) \
	--no-stdout \
	--no-ignore \
	--no-config

Print only warnings and errors when linting Markdown

# VARIABLES #

# Define the path to the [remark][1] executable.
#
# To install remark:
#     $ npm install remark
#
# [1]: https://www.npmjs.com/package/remark

MARKDOWN_LINT ?= $(BIN_DIR)/remark

# Define [remark-lint][1] as the lint plugin.
#
# To install remark-lint:
#     $ npm install remark-lint
#
# [1]: https://www.npmjs.com/package/remark-lint

REMARK_LINT_PLUGIN ?= remark-lint

# Define the path to the remark configuration file:
REMARK_CONF ?= $(CONFIG_DIR)/remark/.remarkrc.js

# Define the path to the remark ignore file:
REMARK_IGNORE ?= $(CONFIG_DIR)/remark/.remarkignore

# Define the command-line options when invoking the remark executable:
MARKDOWN_LINT_FLAGS ?= \
	--ext $(MARKDOWN_FILENAME_EXT) \
	--rc-path $(REMARK_CONF) \
	--ignore-path $(REMARK_IGNORE) \
	--no-stdout \
	--no-ignore \
	--no-config \
	--quiet


# Copyright (c) 2015, Loïc Hoguin <essen@ninenines.eu>
# This file is part of erlang.mk and subject to the terms of the ISC License.

ifneq ($(wildcard $(DEPS_DIR)/triq),)
.PHONY: triq

# Targets.

tests:: triq

define triq_run
$(ERL) -pa $(CURDIR)/ebin $(DEPS_DIR)/*/ebin \
	-eval "try $(1) of true -> halt(0); _ -> halt(1) catch error:undef -> io:format(\"Undefined property or module~n\"), halt() end."
endef

ifdef t
ifeq (,$(findstring :,$(t)))
triq: test-build
	@$(call triq_run,triq:check($(t)))
else
triq: test-build
	@echo Testing $(t)/0
	@$(call triq_run,triq:check($(t)()))
endif
else
triq: test-build
	$(eval MODULES := $(shell find ebin -type f -name \*.beam \
		| sed "s/ebin\//'/;s/\.beam/',/" | sed '$$s/.$$//'))
	$(gen_verbose) $(call triq_run,[true] =:= lists:usort([triq:check(M) || M <- [$(MODULES)]]))
endif
endif

Use an Erlang snippet for Triq

# Copyright (c) 2015, Loïc Hoguin <essen@ninenines.eu>
# This file is part of erlang.mk and subject to the terms of the ISC License.

ifneq ($(wildcard $(DEPS_DIR)/triq),)
.PHONY: triq

# Targets.

tests:: triq

define triq_check.erl
	code:add_pathsa(["$(CURDIR)/ebin", "$(DEPS_DIR)/*/ebin"]),
	try
		case $(1) of
			all -> [true] =:= lists:usort([triq:check(M) || M <- [$(MODULES)]]);
			module -> triq:check($(2));
			function -> triq:check($(2))
		end
	of
		true -> halt(0);
		_ -> halt(1)
	catch error:undef ->
		io:format("Undefined property or module~n"),
		halt(0)
	end.
endef

ifdef t
ifeq (,$(findstring :,$(t)))
triq: test-build
	@$(call erlang,$(call triq_check.erl,module,$(t)))
else
triq: test-build
	@echo Testing $(t)/0
	@$(call erlang,$(call triq_check.erl,function,$(t)()))
endif
else
triq: test-build
	$(eval MODULES := $(shell find ebin -type f -name \*.beam \
		| sed "s/ebin\//'/;s/\.beam/',/" | sed '$$s/.$$//'))
	$(gen_verbose) $(call erlang,$(call triq_check.erl,all,undefined))
endif
endif


# see http://mobile.tutsplus.com/tutorials/android/ndk-tutorial/

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_LDLIBS := -llog
LOCAL_MODULE    := sqlg
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../sqlite-amalgamation
LOCAL_SRC_FILES := ../native/sqlg_all.c
include $(BUILD_SHARED_LIBRARY)

Fix sqlite compiler flags to help pass Cordova-sqlite-storage test suite

# see http://mobile.tutsplus.com/tutorials/android/ndk-tutorial/

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_LDLIBS := -llog
LOCAL_MODULE    := sqlg
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../sqlite-amalgamation
LOCAL_CFLAGS += -DSQLITE_TEMP_STORE=2 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE
LOCAL_SRC_FILES := ../native/sqlg_all.c
include $(BUILD_SHARED_LIBRARY)


LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := viaVR
LOCAL_SRC_FILES := rendererWrapper.cpp videoRenderer.cpp videoInfo.cpp log.cpp
LOCAL_SRC_FILES += decoders/rawDecoder.cpp
LOCAL_SRC_FILES += threads/helpers/renderingPass.cpp threads/helpers/shader.cpp
LOCAL_SRC_FILES += threads/decoder.cpp threads/uploader.cpp threads/renderer.cpp threads/presenter.cpp
LOCAL_SRC_FILES += frames/frameCPU.cpp frames/frameGPUu.cpp frames/frameGPUi.cpp frames/frameGPUo.cpp
LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv3
LOCAL_CPPFLAGS := -std=c++11

include $(BUILD_SHARED_LIBRARY)

Add pattern generator to the makefile

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := viaVR
LOCAL_SRC_FILES := rendererWrapper.cpp videoRenderer.cpp videoInfo.cpp log.cpp
LOCAL_SRC_FILES += decoders/rawDecoder.cpp decoders/patternGenerator.cpp
LOCAL_SRC_FILES += threads/helpers/renderingPass.cpp threads/helpers/shader.cpp
LOCAL_SRC_FILES += threads/decoder.cpp threads/uploader.cpp threads/renderer.cpp threads/presenter.cpp
LOCAL_SRC_FILES += frames/frameCPU.cpp frames/frameGPUu.cpp frames/frameGPUi.cpp frames/frameGPUo.cpp
LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv3
LOCAL_CPPFLAGS := -std=c++11

include $(BUILD_SHARED_LIBRARY)


LATEX_FILES ?= $(wildcard *.tex)

all: $(LATEX_FILES:.tex=.pdf)

clean:
	@for f in $(LATEX_FILES); do latexmk -C $$f; done

open: all
	@open `ls -rt $(LATEX_FILES)|tail -1|sed 's/\.tex$$/.pdf/'`

.SUFFIXES: .tex .pdf

%.pdf: %.tex
	latexmk -pdf $<

Change 'make open' to only build the latest tex file

LATEX_FILES ?= $(wildcard *.tex)
LATEST_TEX = $(shell ls -rt *.tex|tail -1)

all: $(LATEX_FILES:.tex=.pdf)

clean:
	@for f in $(LATEX_FILES); do latexmk -C $$f; done

open: $(LATEST_TEX:.tex=.pdf)
	@open $<

.SUFFIXES: .tex .pdf

%.pdf: %.tex
	latexmk -pdf $<


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

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

Change to ccache 3.4.3 for depends

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

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


$(warning Deprecated feature: It is no longer necessary to include component_common.mk.)
$(warning The line "include $$(IDF_PATH)/make/component_common.mk" can be removed from component.mk files.)

Build system: Change deprecation message to include component path, easier to fix

$(warning Deprecated feature: No longer necessary to include component_common.mk from $(COMPONENT_PATH)/component.mk)


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

LOCAL_MODULE_TAGS := samples tests

# Only compile source java files in this apk.
LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_STATIC_JAVA_LIBRARIES += android-support-v13

LOCAL_PACKAGE_NAME := Support13Demos

LOCAL_SDK_VERSION := current

include $(BUILD_PACKAGE)

# Use the folloing include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))

Fix up the makefiles and some samples.

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

LOCAL_MODULE_TAGS := samples tests

# Only compile source java files in this apk.
LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_STATIC_JAVA_LIBRARIES += android-support-v13

LOCAL_PACKAGE_NAME := Support13Demos

LOCAL_SDK_VERSION := current

LOCAL_DEX_PREOPT := false

include $(BUILD_PACKAGE)

# Use the folloing include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))


VPATH := $(srcdir)

COMMON_CFLAGS :=
METAL_CFLAGS :=

include $(srcdir)/kernel/$(platform)/main.mk
include $(srcdir)/kernel/port/main.mk

DEBUG ?= -g
OPT ?= -O2

COMMON_CFLAGS += \
	-std=c11 \
	-Wall -Werror -Wextra -Wno-unused-parameter \
	$(DEBUG) \
	$(OPT)

METAL_CFLAGS += \
	-nostdlib \
	-ffreestanding

CFLAGS := $(COMMON_CFLAGS) $(METAL_CFLAGS)

LIBS = -lgcc

linker_script = $(srcdir)/kernel/$(platform)/link.ld

objects := $(ssrc:.S=.o) $(csrc:.c=.o)

depfiles := $(objects:.o=.dmk)

kernel.$(platform).elf: $(objects) $(linker_script)
	@echo LINK $@
	@$(LD) -o $@ $(objects) $(CFLAGS) $(LDFLAGS) $(LIBS) -T $(linker_script)

clean:
	@echo CLEAN
	@rm -f \
		$(shell find * -name '*.o') \
		kernel.*.elf \
		$(depfiles) \
		$(cleanfiles)

%.o: %.S
	@echo AS $<
	@$(CC) -MMD -MF $@.dmk $(CFLAGS) -DASM_FILE -c -o $@ $<
%.o: %.c
	@echo CC $<
	@$(CC) -MMD -MF $@.dmk $(CFLAGS) -c -o $@ $<

-include $(depfiles)

Disable built in implicit rules & auto-deleting intermediates.

VPATH := $(srcdir)

COMMON_CFLAGS :=
METAL_CFLAGS :=

include $(srcdir)/kernel/$(platform)/main.mk
include $(srcdir)/kernel/port/main.mk

DEBUG ?= -g
OPT ?= -O2

COMMON_CFLAGS += \
	-std=c11 \
	-Wall -Werror -Wextra -Wno-unused-parameter \
	$(DEBUG) \
	$(OPT)

METAL_CFLAGS += \
	-nostdlib \
	-ffreestanding

CFLAGS := $(COMMON_CFLAGS) $(METAL_CFLAGS)

LIBS = -lgcc

linker_script = $(srcdir)/kernel/$(platform)/link.ld

objects := $(ssrc:.S=.o) $(csrc:.c=.o)

depfiles := $(objects:.o=.dmk)

kernel.$(platform).elf: $(objects) $(linker_script)
	@echo LINK $@
	@$(LD) -o $@ $(objects) $(CFLAGS) $(LDFLAGS) $(LIBS) -T $(linker_script)

clean:
	@echo CLEAN
	@rm -f \
		$(shell find * -name '*.o') \
		kernel.*.elf \
		$(depfiles) \
		$(cleanfiles)

%.o: %.S
	@echo AS $<
	@$(CC) -MMD -MF $@.dmk $(CFLAGS) -DASM_FILE -c -o $@ $<
%.o: %.c
	@echo CC $<
	@$(CC) -MMD -MF $@.dmk $(CFLAGS) -c -o $@ $<

-include $(depfiles)

.SUFFIXES:
.SECONDARY:


INITIAL_CXX_FLAGS += -Wall
ifdef DEBUG
    INITIAL_CXX_FLAGS += -g
else
    INITIAL_CXX_FLAGS += -O3
endif

CXX_FLAGS := $(INITIAL_CXX_FLAGS) $(CXX_FLAGS)

Hide variables in asio for compatibility with other libraries.

INITIAL_CXX_FLAGS += -Wall -fvisibility=hidden -fvisibility-inlines-hidden
ifdef DEBUG
    INITIAL_CXX_FLAGS += -g
else
    INITIAL_CXX_FLAGS += -O3
endif

CXX_FLAGS := $(INITIAL_CXX_FLAGS) $(CXX_FLAGS)


# VARIABLES #

# Define the command for `node`:
NODE ?= node

# Define the root directory from which to search for modules:
MODULE_NAMES_DIR ?= $(ROOT_DIR)/lib/node_modules

# Define the path of the executable:
LIST_MODULE_NAMES ?= $(TOOLS_DIR)/ls/module-names/bin/cli

# Define the command flags:
LIST_MODULE_NAMES_FLAGS ?= \
	--dir $(MODULE_NAMES_DIR)

# TARGETS #

# List all module names.
#
# This target prints a list of all module names.

list-module-names: $(LIST_MODULE_NAMES)
	$(QUIET) $(NODE) $(LIST_MODULE_NAMES) $(LIST_MODULE_NAMES_FLAGS)

.PHONY: list-module-names

Add node_modules directory as a prerequisite

# VARIABLES #

# Define the command for `node`:
NODE ?= node

# Define the root directory from which to search for modules:
MODULE_NAMES_DIR ?= $(ROOT_DIR)/lib/node_modules

# Define the path of the executable:
LIST_MODULE_NAMES ?= $(TOOLS_DIR)/ls/module-names/bin/cli

# Define the command flags:
LIST_MODULE_NAMES_FLAGS ?= \
	--dir $(MODULE_NAMES_DIR)

# TARGETS #

# List all module names.
#
# This target prints a list of all module names.

list-module-names: $(LIST_MODULE_NAMES) $(NODE_MODULES)
	$(QUIET) $(NODE) $(LIST_MODULE_NAMES) $(LIST_MODULE_NAMES_FLAGS)

.PHONY: list-module-names


# -Wno-unused-parameter is because IronBee is so callback heavy multiple
# implements ignore one or more of their parameters.
# In C++, we could ommit the name, but not in C.
AM_CPPFLAGS += @IB_DEBUG@ \
             -I$(top_srcdir) \
             -I$(top_srcdir)/include \
             -I$(top_builddir)/include \
             -I$(top_srcdir)/util \
             -I$(top_srcdir)/engine \
             -DMODULE_BASE_PATH=$(libexecdir) \
             -DRULE_BASE_PATH=$(libdir) \
             -DLUA_BASE_PATH=$(luadir) \
             -Wno-unused-parameter

# Alias for "check"
test: check

.PHONY: test

Remove the "make test" alias for "make check".


################################################################
# project name
################################################################

project_name := basis

################################################################
# modules -- list of directories in which to search
# for module.mk include files
################################################################

# libraries

# Caution: Order of libraries is important since used also in linking.
# Calling library must precede callee library in listing.  That is,
# the most "basic" libraries must go last in the list (unless, of
# course, they are only template libraries, so nobody needs to link to
# them).

modules += .

MAKEFILE_STANDALONE = true

################################################################
# extras -- list of extra files to be included
# in distribution tar file
################################################################

extras := README.md LICENSE.md

################################################################
# additional project-specific make settings and rules
################################################################

# gsl
LDLIBS += -lgsl
LDLIBS += -lgslcblas
CPPFLAGS += -DHAVE_INLINE

# basis submodule
#   map vs. hash for space lookup in basis library
CPPFLAGS += -DBASIS_HASH

################################
# "neighboring" libraries
################################

# put parent directory in include path
#   This allows use of #include<> and relative path for current
#   module header files.  Putting this *before* $(install_prefix)/include insures
#   latest development versions are found before any installed versions.
#
# Note: This doesn't let us find *libraries* in the parent's
# subdirectories, though.  These must be defined separately through

CPPFLAGS += -I..

# link to neghboring libraries
LDFLAGS += -L../am -L../mcutils
LDLIBS +=  -lam -lmcutils

Fix module configuration for standalone build

################################################################
# project name
################################################################

project_name := basis

################################################################
# modules -- list of directories in which to search
# for module.mk include files
################################################################

# libraries

# Caution: Order of libraries is important since used also in linking.
# Calling library must precede callee library in listing.  That is,
# the most "basic" libraries must go last in the list (unless, of
# course, they are only template libraries, so nobody needs to link to
# them).

modules += . ../am ../mcutils ../fmt

MAKEFILE_STANDALONE = true

################################################################
# extras -- list of extra files to be included
# in distribution tar file
################################################################

extras := README.md LICENSE.md

################################################################
# additional project-specific make settings and rules
################################################################

# gsl
LDLIBS += -lgsl
LDLIBS += -lgslcblas
CPPFLAGS += -DHAVE_INLINE

# basis submodule
#   map vs. hash for space lookup in basis library
CPPFLAGS += -DBASIS_HASH

################################
# "neighboring" libraries
################################

# put parent directory in include path
#   This allows use of #include<> and relative path for current
#   module header files.  Putting this *before* $(install_prefix)/include insures
#   latest development versions are found before any installed versions.
#
# Note: This doesn't let us find *libraries* in the parent's
# subdirectories, though.  These must be defined separately through

CPPFLAGS += -I..


package=rust
$(package)_version=1.16.0
$(package)_download_path=https://static.rust-lang.org/dist
$(package)_file_name=rust-$($(package)_version)-x86_64-unknown-linux-gnu.tar.gz
$(package)_sha256_hash=48621912c242753ba37cad5145df375eeba41c81079df46f93ffb4896542e8fd

define $(package)_stage_cmds
  ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig
endef

Update Rust from v1.28.0 to v1.32.0.

package=rust
$(package)_version=1.32.0
$(package)_download_path=https://static.rust-lang.org/dist
$(package)_file_name=rust-$($(package)_version)-x86_64-unknown-linux-gnu.tar.gz
$(package)_sha256_hash=e024698320d76b74daf0e6e71be3681a1e7923122e3ebd03673fcac3ecc23810

define $(package)_stage_cmds
  ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig
endef


# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/nest/p9_tod_setup.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_tod_setup
OBJS+=p9_tod_utils.o
$(call BUILD_PROCEDURE)

Resolve FW TOD Compiler Problems

# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/nest/p9_tod_setup.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_tod_setup
$(call BUILD_PROCEDURE)


USB_VID = 0x239A
USB_PID = 0x8072
USB_PRODUCT = "OHS2020 Badge"
USB_MANUFACTURER = "Adafruit Industries LLC"

MCU_CHIP = nrf52840

QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = "W25Q32JV_IQ"

Update the VID and USB company string

USB_VID = 0x239A
USB_PID = 0x8080
USB_PRODUCT = "OHS2020 Badge"
USB_MANUFACTURER = "OSHWA"

MCU_CHIP = nrf52840

QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = "W25Q32JV_IQ"


PLATFORM_FLAVOR ?= dra7xx

CFG_WITH_STACK_CANARIES ?= y
CFG_WITH_STATS ?= y
CFG_WITH_SOFTWARE_PRNG ?= n

$(call force,CFG_8250_UART,y)
$(call force,CFG_ARM32_core,y)
$(call force,CFG_GENERIC_BOOT,y)
$(call force,CFG_PM_STUBS,y)
ifeq ($(PLATFORM_FLAVOR),am43xx)
$(call force,CFG_NO_SMP,y)
$(call force,CFG_PL310,y)
$(call force,CFG_PL310_LOCKED,y)
$(call force,CFG_SECURE_TIME_SOURCE_REE,y)
include core/arch/arm/cpu/cortex-a9.mk
else
CFG_OTP_SUPPORT ?= y
$(call force,CFG_SECURE_TIME_SOURCE_CNTPCT,y)
include core/arch/arm/cpu/cortex-a15.mk
endif
$(call force,CFG_SM_PLATFORM_HANDLER,y)
$(call force,CFG_GIC,y)
ifneq ($(CFG_WITH_SOFTWARE_PRNG),y)
$(call force,CFG_DRA7_RNG,y)
endif

# 32-bit flags
core_arm32-platform-aflags	+= -mfpu=neon

ta-targets = ta_arm32

Disable TRNG use on AM43xx

PLATFORM_FLAVOR ?= dra7xx

CFG_WITH_STACK_CANARIES ?= y
CFG_WITH_STATS ?= y
CFG_WITH_SOFTWARE_PRNG ?= n

$(call force,CFG_8250_UART,y)
$(call force,CFG_ARM32_core,y)
$(call force,CFG_GENERIC_BOOT,y)
$(call force,CFG_PM_STUBS,y)
ifeq ($(PLATFORM_FLAVOR),am43xx)
CFG_WITH_SOFTWARE_PRNG = y
$(call force,CFG_NO_SMP,y)
$(call force,CFG_PL310,y)
$(call force,CFG_PL310_LOCKED,y)
$(call force,CFG_SECURE_TIME_SOURCE_REE,y)
include core/arch/arm/cpu/cortex-a9.mk
else
CFG_OTP_SUPPORT ?= y
$(call force,CFG_SECURE_TIME_SOURCE_CNTPCT,y)
include core/arch/arm/cpu/cortex-a15.mk
endif
$(call force,CFG_SM_PLATFORM_HANDLER,y)
$(call force,CFG_GIC,y)
ifneq ($(CFG_WITH_SOFTWARE_PRNG),y)
$(call force,CFG_DRA7_RNG,y)
endif

# 32-bit flags
core_arm32-platform-aflags	+= -mfpu=neon

ta-targets = ta_arm32


# Base Build portion of makefile
##### PLEASE DO NOT CHANGE THIS FILE #####
##### If one of these sections does not meet your needs, consider copying its
##### contents into ../Makefile and commenting out the include and adding a
##### comment about what you did and why.

.PHONY: all build test push clean container-clean bin-clean version

SHELL := /bin/bash

BUILD_IMAGE ?= golang:1.7-alpine

all: VERSION.txt build

build: linux

linux:
#	@echo "No code to build to build in "$@" - try 'make container'

VERSION.txt:
	@echo $(VERSION) >VERSION.txt

version:
	@echo VERSION:$(VERSION)

clean: container-clean bin-clean

container-clean:
	rm -rf .container-* .dockerfile* .push-* linux darwin container VERSION.txt .docker_image

bin-clean:
	rm -rf .go bin

Remove .tmp in the python-docker clean rule

# Base Build portion of makefile
##### PLEASE DO NOT CHANGE THIS FILE #####
##### If one of these sections does not meet your needs, consider copying its
##### contents into ../Makefile and commenting out the include and adding a
##### comment about what you did and why.

.PHONY: all build test push clean container-clean bin-clean version

SHELL := /bin/bash

BUILD_IMAGE ?= golang:1.7-alpine

all: VERSION.txt build

build: linux

linux:
#	@echo "No code to build to build in "$@" - try 'make container'

VERSION.txt:
	@echo $(VERSION) >VERSION.txt

version:
	@echo VERSION:$(VERSION)

clean: container-clean bin-clean

container-clean:
	rm -rf .container-* .dockerfile* .push-* linux darwin container VERSION.txt .docker_image

bin-clean:
	rm -rf .go bin .tmp


# VARIABLES #

# Define the command for setting executable permissions:
MAKE_EXECUTABLE ?= chmod +x

# Define the path of the linter executable:
FILENAME_LINTER ?= $(TOOLS_DIR)/lint/filenames/lint.sh

# TARGETS #

# Lint filenames.
#
# This target lints filenames.

lint-filenames:
	$(QUIET) $(MAKE_EXECUTABLE) $(FILENAME_LINTER)
	$(QUIET) $(FILENAME_LINTER)

.PHONY: lint-filenames

Update to use renamed file

# VARIABLES #

# Define the command for setting executable permissions:
MAKE_EXECUTABLE ?= chmod +x

# Define the path of the linter executable:
FILENAME_LINTER ?= $(TOOLS_DIR)/lint/filenames/lint

# TARGETS #

# Lint filenames.
#
# This target lints filenames.

lint-filenames:
	$(QUIET) $(MAKE_EXECUTABLE) $(FILENAME_LINTER)
	$(QUIET) $(FILENAME_LINTER)

.PHONY: lint-filenames


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

LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := android-support-v13
LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_PACKAGE_NAME := DeskClock

LOCAL_OVERRIDES_PACKAGES := AlarmClock

LOCAL_SDK_VERSION := current

LOCAL_PROGUARD_FLAG_FILES := proguard.flags

include $(BUILD_PACKAGE)

# Use the following include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))

Move SDK version to 17

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

LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := android-support-v13
LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_PACKAGE_NAME := DeskClock

LOCAL_OVERRIDES_PACKAGES := AlarmClock

LOCAL_SDK_VERSION := 17

LOCAL_PROGUARD_FLAG_FILES := proguard.flags

include $(BUILD_PACKAGE)

# Use the following include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))


# Copyright 2020 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

BASEBOARD:=nucleo-h743zi

board-y=board.o
board-y+=fpsensor_detect.o

# Enable on device tests
test-list-y=\
       aes \
       compile_time_macros \
       crc \
       fpsensor \
       mutex \
       pingpong \
       rsa \
       rsa3 \
       rtc \
       sha256 \
       sha256_unrolled \
       stm32f_rtc \
       utils \

Build the same tests as dartmonkey

# Copyright 2020 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

BASEBOARD:=nucleo-h743zi

board-y=board.o
board-y+=fpsensor_detect.o

# Enable on device tests
test-list-y=\
       aes \
       compile_time_macros \
       crc \
       flash_physical \
       flash_write_protect \
       fpsensor \
       mpu \
       mutex \
       pingpong \
       rollback \
       rollback_entropy \
       rsa3 \
       rtc \
       scratchpad \
       sha256 \
       sha256_unrolled \
       stm32f_rtc \
       utils \


#!/usr/bin/make -f

config.status: configure
	./configure

configure: configure.ac Makefile.am src/config.h.in libtool ltmain.sh
	automake --copy --add-missing
	autoconf

src/config.h.in: configure.ac libtool
	autoheader

libtool ltmain.sh: aclocal.m4
	libtoolize --copy --force

# Need to re-run aclocal whenever acinclude.m4 is modified.
aclocal.m4: acinclude.m4
	aclocal

clean:
	rm -f libtool ltmain.sh aclocal.m4 Makefile.in src/config.h.in config.cache

# Do not edit or modify anything in this comment block.
# The arch-tag line is a file identity tag for the GNU Arch
# revision control system.
#
# arch-tag: 2b02bfd0-d5ed-489b-a554-2bf36903cca9

Make aclocal.m4 depend on acinclude.m4.

#!/usr/bin/make -f

config.status: configure
	./configure

configure: configure.ac aclocal.m4 Makefile.am src/config.h.in libtool ltmain.sh
	automake --copy --add-missing
	autoconf

src/config.h.in: configure.ac libtool
	autoheader

libtool ltmain.sh: aclocal.m4
	libtoolize --copy --force

# Need to re-run aclocal whenever acinclude.m4 is modified.
aclocal.m4: acinclude.m4
	aclocal

clean:
	rm -f libtool ltmain.sh aclocal.m4 Makefile.in src/config.h.in config.cache

# Do not edit or modify anything in this comment block.
# The arch-tag line is a file identity tag for the GNU Arch
# revision control system.
#
# arch-tag: 2b02bfd0-d5ed-489b-a554-2bf36903cca9


USB_VID = 0x239A
USB_PID = 0x80F4
USB_PRODUCT = "Pico"
USB_MANUFACTURER = "Raspberry Pi"

CHIP_VARIANT = RP2040
CHIP_FAMILY = rp2

INTERNAL_FLASH_FILESYSTEM = 1

Add Gameduino 3X Dazzler support on raspberry_pi_pico

USB_VID = 0x239A
USB_PID = 0x80F4
USB_PRODUCT = "Pico"
USB_MANUFACTURER = "Raspberry Pi"

CHIP_VARIANT = RP2040
CHIP_FAMILY = rp2

INTERNAL_FLASH_FILESYSTEM = 1

CIRCUITPY__EVE = 1


HASFEATURE = $(findstring $(1), $(.FEATURES))
REQERROR   = Required feature "$(strip $(1))" not supported by $(MAKE)
REQUIRE    = $(and $(or $(HASFEATURE), $(error $(REQERROR))),)

$(call REQUIRE, else-if)
$(call REQUIRE, order-only)
$(call REQUIRE, target-specific)

Use $(filter) instead of $(findstring) to query GNU Make $(.FEATURES)

HASFEATURE = $(filter $(1), $(.FEATURES))
REQERROR   = Required feature "$(strip $(1))" not supported by $(MAKE)
REQUIRE    = $(and $(or $(HASFEATURE), $(error $(REQERROR))),)

$(call REQUIRE, else-if)
$(call REQUIRE, order-only)
$(call REQUIRE, target-specific)


noop=
space=$(noop) $(noop)

# Function:    execute
# Description: Export list of libraries path, execute command and store the
#              execution time and LUPS of a LBM simulation if a timing file
#              path is provided.
# Argument $1: Dynamic libraries paths (separated by spaces)
# Argument $2: LBM simulation command (in a string) to execute
# Argument $3: (optional) timing file path
define execute
	@timing=$$(echo "$(3)" | xargs); \
	[[ "$$timing" == "" ]] && timing=/dev/null; \
	export DYLD_LIBRARY_PATH=$$DYLD_LIBRARY_PATH$(subst $(space):,:,$(addprefix :,$(1))); \
	start=$$(date +%s); \
	echo $$(eval "$(2) | tee $(STD_FILE)" ) | sed -n 's/.*average lups: \(.*\).*/\1/p' > $$timing; \
	end=$$(date +%s); \
	T=$$(($$end-$$start)); \
	printf "$$T" >> $$timing;
endef

# Rule .stdout: set STD_FILE as the standard output for execute
.stdout: ;@:
	$(eval STD_FILE=/dev/tty)

.PHONY: .stdout

# Binary arguments
ITER=200000

Allow makefile to run either on Mac OSX or Linux

noop=
space=$(noop) $(noop)
SHELL=/bin/bash

# Function:    execute
# Description: Export list of libraries path, execute command and store the
#              execution time and LUPS of a LBM simulation if a timing file
#              path is provided.
# Argument $1: Dynamic libraries paths (separated by spaces)
# Argument $2: LBM simulation command (in a string) to execute
# Argument $3: (optional) timing file path
define execute
	@timing=$$(echo "$(3)" | xargs); \
	llp_var=$(if $(filter $(shell uname),Darwin),"DYLD_LIBRARY_PATH","LD_LIBRARY_PATH"); \
	[[ "$$timing" == "" ]] && timing=/dev/null; \
	eval "export $$llp_var=$$$$llp_var$(subst $(space):,:,$(addprefix :,$(1)))"; \
	start=$$(date +%s); \
	echo $$(eval "$(2) | tee $(STD_FILE)" ) | sed -n 's/.*average lups: \(.*\).*/\1/p' > $$timing; \
	end=$$(date +%s); \
	T=$$(($$end-$$start)); \
	printf "$$T" >> $$timing;
endef

# Rule .stdout: set STD_FILE as the standard output for execute
.stdout: ;@:
	$(eval STD_FILE=/dev/tty)

.PHONY: .stdout

# Binary arguments
ITER=200000


# Build target for Single Linked List
$(addprefix $(BUILD_DIR), slist.o): $(addprefix $(LIB_DIR), lists/slist.c) $(addprefix $(INC_DIR), slist.h) | build
	$(CC) $(CFLAGS) -c $< -o $@

# Build target for Double Linked List
$(addprefix $(BUILD_DIR), dlist.o): $(addprefix $(LIB_DIR), lists/dlist.c) $(addprefix $(INC_DIR), dlist.h) | build
	$(CC) $(CFLAGS) -c $< -o $@

slist.o: $(addprefix $(BUILD_DIR), slist.o)

dlist.o: $(addprefix $(BUILD_DIR), dlist.o)

Change Makefile for list targets.

SL_LIST_INC := $(addprefix $(LIB_DIR), lists/sl_list.c) $(addprefix $(INC_DIR), sl_list.h)
DL_LIST_INC := $(addprefix $(LIB_DIR), lists/dl_list.c) $(addprefix $(INC_DIR), dl_list.h)

# Build target for Single Linked List
$(addprefix $(BUILD_DIR), sl_list.o): $(SL_LIST_INC) | build
	$(CC) $(CFLAGS) -c $< -o $@

# Build target for Double Linked List
$(addprefix $(BUILD_DIR), dl_list.o): $(DL_LIST_INC) | build
	$(CC) $(CFLAGS) -c $< -o $@

sl_list.o: $(addprefix $(BUILD_DIR), sl_list.o)

dl_list.o: $(addprefix $(BUILD_DIR), dl_list.o)


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

LOCAL_SRC_FILES := main.cpp \
../../../Classes/AppDelegate.cpp \
../../../Classes/GameScene.cpp

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../libs/cocos2dx \
                    $(LOCAL_PATH)/../../../libs/cocos2dx/platform \
                    $(LOCAL_PATH)/../../../libs/cocos2dx/include \
                    $(LOCAL_PATH)/../../../libs/CocosDenshion/include \
                    $(LOCAL_PATH)/../../../Classes

# it is used for ndk-r5
# if you build with ndk-r4, comment it
# because the new Windows toolchain doesn't support Cygwin's drive
# mapping (i.e /cygdrive/c/ instead of C:/)
LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/../../libs/armeabi) \
                -lcocos2d -llog -lcocosdenshion \
                -L$(call host-path, $(LOCAL_PATH)/../../../libs/cocos2dx/platform/third_party/android/libraries) -lcurl

include $(BUILD_SHARED_LIBRARY)

Add OpenGL library to makefile

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

LOCAL_SRC_FILES := main.cpp \
../../../Classes/AppDelegate.cpp \
../../../Classes/GameScene.cpp

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../libs/cocos2dx \
                    $(LOCAL_PATH)/../../../libs/cocos2dx/platform \
                    $(LOCAL_PATH)/../../../libs/cocos2dx/include \
                    $(LOCAL_PATH)/../../../libs/CocosDenshion/include \
                    $(LOCAL_PATH)/../../../Classes

# it is used for ndk-r5
# if you build with ndk-r4, comment it
# because the new Windows toolchain doesn't support Cygwin's drive
# mapping (i.e /cygdrive/c/ instead of C:/)
LOCAL_LDLIBS := -L$(call host-path, $(LOCAL_PATH)/../../libs/armeabi) \
                -lcocos2d -llog -lcocosdenshion \
                -lGLESv1_CM \
                -L$(call host-path, $(LOCAL_PATH)/../../../libs/cocos2dx/platform/third_party/android/libraries) -lcurl

include $(BUILD_SHARED_LIBRARY)


# sinit version
VERSION = 0.1

# paths
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/man

CC = cc
LD = $(CC)
CPPFLAGS =
CFLAGS   = -Wall -Os $(CPPFLAGS)
LDFLAGS  = -static

Bump up version to v0.2

# sinit version
VERSION = 0.2

# paths
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/man

CC = cc
LD = $(CC)
CPPFLAGS =
CFLAGS   = -Wall -Os $(CPPFLAGS)
LDFLAGS  = -static


# -*- 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_Package_Package,infoplist,$(call gb_CustomTarget_get_workdir,sysui/infoplist)))

$(eval $(call gb_Package_add_files,infoplist,pck,\
	PkgInfo \
	Info.plist \
))

$(eval $(call gb_Package_add_files,infoplist,bin,\
	$(foreach lang,en-US $(gb_WITH_LANG),InfoPlist_$(lang).zip) \
))

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

Move Mac OS X Info.plist into instdir

# -*- 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_Package_Package,infoplist,$(call gb_CustomTarget_get_workdir,sysui/infoplist)))

$(eval $(call gb_Package_set_outdir,infoplist,$(gb_INSTROOT)))

$(eval $(call gb_Package_add_files,infoplist,,\
	PkgInfo \
	Info.plist \
))

$(eval $(call gb_Package_add_files,infoplist,bin,\
	$(foreach lang,en-US $(gb_WITH_LANG),InfoPlist_$(lang).zip) \
))

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


.TH PROCWAIT 1 "VERSION"

.SH NAME
procwait \- wait for process to terminate
.SH SYNOPSIS
\fBprocwait\fP [\fIOPTIONS\fP] \fIPID\fP...
.SH DESCRIPTION
\fBprocwait\fP allows to wait until a process or (processes) identified by PID
is terminated.
.SH OPTIONS
.TP
\fB-h\fP, \fB--help\fP
Shows brief help and exits.
.TP
\fB-q\fP, \fB--quiet\fP
Only print essential output and errors.
.TP
\fB-s\fP \fINUM\fP[ms], \fB--sleep\fP \fINUM\fP[ms]
Seconds (milliseconds) to sleep between process checks.
.TP
\fB-V\fP, \fB--version\fP
Shows program version and exits.
.TP
\fB-v\fP, \fB--verbose\fP
Turn on extra output.
.SH COPYRIGHT
Copyright (c) 2013-2014 Tuomo Hartikainen. Procwait is free software; see the
sources for copying conditions.
.SH AUTHOR
Tuomo Hartikainen <tth@harski.org>.
.SH SEE ALSO
\fBwait(1p)\fP

Add --name argument to man page

.TH PROCWAIT 1 "VERSION"

.SH NAME
procwait \- wait for process to terminate
.SH SYNOPSIS
\fBprocwait\fP [\fIOPTIONS\fP] \fIPID\fP...
.SH DESCRIPTION
\fBprocwait\fP allows to wait until a process or (processes) identified by PID
is terminated.
.SH OPTIONS
.TP
\fB-h\fP, \fB--help\fP
Shows brief help and exits.
.TP
\fB-n \fINAME\fP, \fB--name \fINAME\fP
Parse PID from process NAME.
.TP
\fB-q\fP, \fB--quiet\fP
Only print essential output and errors.
.TP
\fB-s\fP \fINUM\fP[ms], \fB--sleep\fP \fINUM\fP[ms]
Seconds (milliseconds) to sleep between process checks.
.TP
\fB-V\fP, \fB--version\fP
Shows program version and exits.
.TP
\fB-v\fP, \fB--verbose\fP
Turn on extra output.
.SH COPYRIGHT
Copyright (c) 2013-2014 Tuomo Hartikainen. Procwait is free software; see the
sources for copying conditions.
.SH AUTHOR
Tuomo Hartikainen <tth@harski.org>.
.SH SEE ALSO
\fBwait(1p)\fP


#/
# @license Apache-2.0
#
# Copyright (c) 2017 The Stdlib Authors.
#
# 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.
#/

# VARIABLES #

# Define the path of the executable:
LIST_PACKAGE_NAMES ?= $(TOOLS_PKGS_DIR)/pkgs/names/bin/cli

# Define the command flags:
LIST_PACKAGE_NAMES_FLAGS ?=

# TARGETS #

# List all package names.
#
# This target prints a list of all package names.

list-pkgs-names: $(LIST_PACKAGE_NAMES) $(NODE_MODULES)
	$(QUIET) NODE_PATH="$(NODE_PATH)" $(NODE) $(LIST_PACKAGE_NAMES) $(LIST_PACKAGE_NAMES_FLAGS) $(SRC_DIR)

.PHONY: list-pkgs-names

Update docs and support searching in a specified directory

#/
# @license Apache-2.0
#
# Copyright (c) 2017 The Stdlib Authors.
#
# 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.
#/

# VARIABLES #

# Define the path of the executable:
LIST_PACKAGE_NAMES ?= $(TOOLS_PKGS_DIR)/pkgs/names/bin/cli

# Define the command flags:
LIST_PACKAGE_NAMES_FLAGS ?=

# Define the directory from which to search for packages:
LIST_PACKAGE_NAMES_DIR ?= $(SRC_DIR)

# RULES #

#/
# Prints a list of all package names.
#
# @param {string} [LIST_PACKAGE_NAMES_DIR] - absolute path of the directory from which to search for packages (default: source directory)
#
# @example
# make list-pkgs-names
#
# @example
# make list-pkgs-names LIST_PACKAGE_NAMES_DIR=$PWD/lib/node_modules/\@stdlib/utils
#/
list-pkgs-names: $(LIST_PACKAGE_NAMES) $(NODE_MODULES)
	$(QUIET) NODE_PATH="$(NODE_PATH)" $(NODE) $(LIST_PACKAGE_NAMES) $(LIST_PACKAGE_NAMES_FLAGS) $(LIST_PACKAGE_NAMES_DIR)

.PHONY: list-pkgs-names


WAYS = seq par

AUTO_BINARY = $(notdir $@)
AUTO_WAY  = $(patsubst %/,%,$(dir $@))

DPH_BINARIES = $(foreach binary, $(BINARIES), $(if $($(binary)_DPH), $(foreach way, $(WAYS), $(way)/$(binary))))

include $(TOPDIR)/mk/common.mk

ifeq (,$(BINARY))
.PHONY: all $(DPH_BINARIES) force

all: $(DPH_BINARIES)

$(DPH_BINARIES): force
	$(MAKE) BINARY=$(AUTO_BINARY) WAY=$(AUTO_WAY)

force:
else

ifeq ($($(BINARY)_DPH),prim)
WAY_FLAGS = -package dph-prim-$(WAY) -odir $(WAY) -hidir $(WAY)
else
WAY_FLAGS = -fdph-$(WAY) -package dph-$(WAY) -odir $(WAY) -hidir $(WAY)
endif

$(WAY)/$(BINARY): $($(BINARY)_SOURCES) $(BENCH_DEP)
	@mkdir $(WAY) || true
	$(HC) -o $@ --make $< $(DPH_FLAGS) $(WAY_FLAGS) $(BENCH_FLAGS)

endif

.PHONY: clean

clean:
	$(RM) -r $(WAYS)

.PHONY: bench

$(BENCH_DEP):
	cd $(BENCH_DIR) && $(MAKE)

Add -package dph-prim-$(WAY) when compiling vectorised examples

WAYS = seq par

AUTO_BINARY = $(notdir $@)
AUTO_WAY  = $(patsubst %/,%,$(dir $@))

DPH_BINARIES = $(foreach binary, $(BINARIES), $(if $($(binary)_DPH), $(foreach way, $(WAYS), $(way)/$(binary))))

include $(TOPDIR)/mk/common.mk

ifeq (,$(BINARY))
.PHONY: all $(DPH_BINARIES) force

all: $(DPH_BINARIES)

$(DPH_BINARIES): force
	$(MAKE) BINARY=$(AUTO_BINARY) WAY=$(AUTO_WAY)

force:
else

ifeq ($($(BINARY)_DPH),prim)
WAY_FLAGS = -package dph-prim-$(WAY) -odir $(WAY) -hidir $(WAY)
else
WAY_FLAGS = -fdph-$(WAY) -package dph-$(WAY) -package dph-prim-$(WAY) -odir $(WAY) -hidir $(WAY)
endif

$(WAY)/$(BINARY): $($(BINARY)_SOURCES) $(BENCH_DEP)
	@mkdir $(WAY) || true
	$(HC) -o $@ --make $< $(DPH_FLAGS) $(WAY_FLAGS) $(BENCH_FLAGS)

endif

.PHONY: clean

clean:
	$(RM) -r $(WAYS)

.PHONY: bench

$(BENCH_DEP):
	cd $(BENCH_DIR) && $(MAKE)


# Docker image build targets

# User needs to have administrator privileges or be a member of group 'docker'

DOCKER := docker
IMAGE_PREFIX := meetings
BUILD_DIR := docker
VIRT_DIR := virt
GEARSLOTHD_IMAGE := gearslothd
MARKER_PREFIX := docker-
MARKER_BUILD_PREFIX := $(BUILD_DIR)/$(MARKER_PREFIX)

VIRT_IMAGES := gearmand

GEARSLOTHD_MARKER := $(MARKER_BUILD_PREFIX)$(GEARSLOTHD_IMAGE)
MARKERS := $(addprefix $(MARKER_BUILD_PREFIX),$(VIRT_IMAGES))

# Source files for running gearslothd daemon

GEARSLOTHD_SRC := package.json $(shell find bin lib -type f)

.PHONY: build-docker
build-docker: $(GEARSLOTHD_MARKER) $(MARKERS)

# Gearslothd docker container

$(GEARSLOTHD_MARKER): Dockerfile $(GEARSLOTHD_SRC) $(BUILD_DIR)
	$(DOCKER) build -t $(IMAGE_PREFIX)/$(GEARSLOTHD_IMAGE) .
	touch $@

# Other custom containers

.SECONDEXPANSION:

$(MARKERS): $(MARKER_BUILD_PREFIX)%: $$(wildcard $(VIRT_DIR)/%/*) $(BUILD_DIR)
	$(DOCKER) build -t $(IMAGE_PREFIX)/$* $(VIRT_DIR)/$*
	touch $@

$(BUILD_DIR):
	mkdir -p $@
	touch $@

# Remove image markers, but leave actual images

.PHONY: clean-docker
clean-docker:
	rm -rf $(BUILD_DIR)

Fix to build mysql image also

# Docker image build targets

# User needs to have administrator privileges or be a member of group 'docker'

DOCKER := docker
IMAGE_PREFIX := meetings
BUILD_DIR := docker
VIRT_DIR := virt
GEARSLOTHD_IMAGE := gearslothd
MARKER_PREFIX := docker-
MARKER_BUILD_PREFIX := $(BUILD_DIR)/$(MARKER_PREFIX)

VIRT_IMAGES := gearmand mysql

GEARSLOTHD_MARKER := $(MARKER_BUILD_PREFIX)$(GEARSLOTHD_IMAGE)
MARKERS := $(addprefix $(MARKER_BUILD_PREFIX),$(VIRT_IMAGES))

# Source files for running gearslothd daemon

GEARSLOTHD_SRC := package.json $(shell find bin lib -type f)

.PHONY: build-docker
build-docker: $(GEARSLOTHD_MARKER) $(MARKERS)

# Gearslothd docker container

$(GEARSLOTHD_MARKER): Dockerfile $(GEARSLOTHD_SRC) $(BUILD_DIR)
	$(DOCKER) build -t $(IMAGE_PREFIX)/$(GEARSLOTHD_IMAGE) .
	touch $@

# Other custom containers

.SECONDEXPANSION:

$(MARKERS): $(MARKER_BUILD_PREFIX)%: $$(wildcard $(VIRT_DIR)/%/*) $(BUILD_DIR)
	$(DOCKER) build -t $(IMAGE_PREFIX)/$* $(VIRT_DIR)/$*
	touch $@

$(BUILD_DIR):
	mkdir -p $@
	touch $@

# Remove image markers, but leave actual images

.PHONY: clean-docker
clean-docker:
	rm -rf $(BUILD_DIR)


LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

include $(XASH3D_CONFIG)

LOCAL_MODULE := yapb

LOCAL_CONLYFLAGS += -std=c99
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include \
		    $(LOCAL_PATH)/../include/engine

LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)

LOCAL_SRC_FILES := \
	basecode.cpp \
	manager.cpp \
	chatlib.cpp \
	combat.cpp \
	globals.cpp \
	interface.cpp \
	navigate.cpp \
	netmsg.cpp \
	support.cpp \
	waypoint.cpp \

LOCAL_CFLAGS += -O2 -DLINUX -D_LINUX -DPOSIX -DHAVE_STDINT_H -D__extern_always_inline=inline -D_strdup=strdup -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-c++11-compat-deprecated-writable-strings
LOCAL_CPPFLAGS += -w -Wno-invalid-offsetof -fno-exceptions -fno-rtti

include $(BUILD_SHARED_LIBRARY)

Enable _hardfp postfix on armv7 hardfp

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

include $(XASH3D_CONFIG)

LOCAL_MODULE := yapb

ifeq ($(TARGET_ARCH_ABI),armeabi-v7a-hard)
LOCAL_MODULE_FILENAME = libyapb_hardfp
endif

LOCAL_CONLYFLAGS += -std=c99
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include \
		    $(LOCAL_PATH)/../include/engine

LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)

LOCAL_SRC_FILES := \
	basecode.cpp \
	manager.cpp \
	chatlib.cpp \
	combat.cpp \
	globals.cpp \
	interface.cpp \
	navigate.cpp \
	netmsg.cpp \
	support.cpp \
	waypoint.cpp \

LOCAL_CFLAGS += -O2 -DLINUX -D_LINUX -DPOSIX -DHAVE_STDINT_H -D__extern_always_inline=inline -D_strdup=strdup -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-c++11-compat-deprecated-writable-strings
LOCAL_CPPFLAGS += -w -Wno-invalid-offsetof -fno-exceptions -fno-rtti

include $(BUILD_SHARED_LIBRARY)


# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk
# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers.
# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h.

ifeq ($(LONGINT_IMPL),NONE)
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none
endif

ifeq ($(LONGINT_IMPL),MPZ)
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz
endif

ifeq ($(LONGINT_IMPL),LONGLONG)
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong
endif

# Put samd21-only choices here.
ifeq ($(CHIP_FAMILY),samd21)
# frequencyio not yet verified as working on SAMD21.
CIRCUITPY_FRQUENCYIO = 0
endif

# Put samd51-only choices here.
ifeq ($(CHIP_FAMILY),samd51)
CIRCUITPY_SAMD = 1
endif

INTERNAL_LIBM = 1

USB_SERIAL_NUMBER_LENGTH = 32

Correct typo in line meant to turn off frequencyio on M0 which saves 2k code space.

# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk
# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers.
# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h.

ifeq ($(LONGINT_IMPL),NONE)
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none
endif

ifeq ($(LONGINT_IMPL),MPZ)
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz
endif

ifeq ($(LONGINT_IMPL),LONGLONG)
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong
endif

# Put samd21-only choices here.
ifeq ($(CHIP_FAMILY),samd21)
# frequencyio not yet verified as working on SAMD21.
CIRCUITPY_FREQUENCYIO = 0
endif

# Put samd51-only choices here.
ifeq ($(CHIP_FAMILY),samd51)
CIRCUITPY_SAMD = 1
endif

INTERNAL_LIBM = 1

USB_SERIAL_NUMBER_LENGTH = 32


## ------- ##
## Check.  ##
## ------- ##

TESTS =
# We don't ship them: they are generated when the doc test suite is.
-include $(call ls_files,tests/*/*/local.mk)
include $(top_srcdir)/build-aux/check.mk

TEST_LOGS = $(TESTS:.chk=.log)
# FIXME: Assigned to QH.
TFAIL_TESTS += specs/lang.tex

# Generating the test files.
noinst_DATA = $(patsubst %.tex,$(srcdir)/tests/%/local.mk,$(call ls_files,*.tex))
$(srcdir)/tests/%/local.mk: %.tex $(srcdir)/tex2chk
	srcdir=$(srcdir) $(srcdir)/tex2chk $<

URBI_CONSOLE = $(top_builddir)/tests/bin/urbi-console

# Set URBI_PATH to find URBI.INI.
TESTS_ENVIRONMENT +=				\
  URBI_CONSOLE=$(URBI_CONSOLE)			\
  URBI_PATH=$(abs_srcdir)/specs:$$URBI_PATH	\
  srcdir=$(srcdir)/tests\
  PATH=$(abs_top_builddir)/tests/bin:$$PATH

UCONSOLE_CHECK = $(top_builddir)/tests/bin/uconsole-check
UCONSOLE_CHECKFLAGS = -k2 --no-locations

%.log: %.chk
	@$(am__check_pre) $(UCONSOLE_CHECK) $(UCONSOLE_CHECKFLAGS) $${dir}$< $(am__check_post)

debug:
	echo $(TESTS)
	echo $(TEST_LOGS)

Fix generation of doc test suite.

## ------- ##
## Check.  ##
## ------- ##

TESTS =
# We don't ship them: they are generated when the doc test suite is.
-include $(wildcard $(srcdir)/tests/*/*/local.mk)
include $(top_srcdir)/build-aux/check.mk

TEST_LOGS = $(TESTS:.chk=.log)
# FIXME: Assigned to QH.
TFAIL_TESTS += specs/lang.tex

# Generating the test files.
noinst_DATA = $(patsubst %.tex,$(srcdir)/tests/%/local.mk,$(call ls_files,*.tex))
$(srcdir)/tests/%/local.mk: %.tex $(srcdir)/tex2chk
	srcdir=$(srcdir) $(srcdir)/tex2chk $<

URBI_CONSOLE = $(top_builddir)/tests/bin/urbi-console

# Set URBI_PATH to find URBI.INI.
TESTS_ENVIRONMENT +=				\
  URBI_CONSOLE=$(URBI_CONSOLE)			\
  URBI_PATH=$(abs_srcdir)/specs:$$URBI_PATH	\
  srcdir=$(srcdir)/tests\
  PATH=$(abs_top_builddir)/tests/bin:$$PATH

UCONSOLE_CHECK = $(top_builddir)/tests/bin/uconsole-check
UCONSOLE_CHECKFLAGS = -k2 --no-locations

%.log: %.chk
	@$(am__check_pre) $(UCONSOLE_CHECK) $(UCONSOLE_CHECKFLAGS) $${dir}$< $(am__check_post)

debug:
	echo $(TESTS)
	echo $(TEST_LOGS)


SDK_LIBS := #$(APPLICATION_PATH)/hardware/secret/cc3200-sdk/simplelink/gcc/exe/libsimplelink.a
SDK_INCS := -I$(APPLICATION_PATH)/hardware/msp432/cores/msp432/inc/CMSIS

VFP := -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant

CPPFLAGS +=
CFLAGS += -DF_CPU=$(F_CPU) -D__MSP432P401R__ -DTARGET_IS_MSP432P4XX -Dxdc__nolocalstring=1
#SDK_LIBS := ti/runtime/wiring/msp432/lib/ti.runtime.wiring.msp432.lib
OBJCOPY =
OBJCOPY_FLAGS =

Add driverlib path to include path

SDK_LIBS := #$(APPLICATION_PATH)/hardware/secret/cc3200-sdk/simplelink/gcc/exe/libsimplelink.a
SDK_INCS := -I$(APPLICATION_PATH)/hardware/msp432/cores/msp432/inc/CMSIS -I$(APPLICATION_PATH)/hardware/msp432/cores/msp432/driverlib/MSP432P4xx

VFP := -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant

CPPFLAGS +=
CFLAGS += -DF_CPU=$(F_CPU) -D__MSP432P401R__ -DTARGET_IS_MSP432P4XX -Dxdc__nolocalstring=1
#SDK_LIBS := ti/runtime/wiring/msp432/lib/ti.runtime.wiring.msp432.lib
OBJCOPY =
OBJCOPY_FLAGS =


# src/backend/nls.mk
CATALOG_NAME     = postgres
AVAIL_LANGUAGES  = de es fr it ja pl pt_BR ru zh_CN zh_TW
GETTEXT_FILES    = + gettext-files
GETTEXT_TRIGGERS = $(BACKEND_COMMON_GETTEXT_TRIGGERS) \
    GUC_check_errmsg GUC_check_errdetail GUC_check_errhint \
    write_stderr yyerror parser_yyerror report_invalid_record
GETTEXT_FLAGS    = $(BACKEND_COMMON_GETTEXT_FLAGS) \
    GUC_check_errmsg:1:c-format \
    GUC_check_errdetail:1:c-format \
    GUC_check_errhint:1:c-format \
    write_stderr:1:c-format \
    report_invalid_record:2:c-format

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

my-clean:
	rm -f gettext-files

.PHONY: my-clean
clean: my-clean

Add libpgcommon to backend gettext source files

# src/backend/nls.mk
CATALOG_NAME     = postgres
AVAIL_LANGUAGES  = de es fr it ja pl pt_BR ru zh_CN zh_TW
GETTEXT_FILES    = + gettext-files
GETTEXT_TRIGGERS = $(BACKEND_COMMON_GETTEXT_TRIGGERS) \
    GUC_check_errmsg GUC_check_errdetail GUC_check_errhint \
    write_stderr yyerror parser_yyerror report_invalid_record
GETTEXT_FLAGS    = $(BACKEND_COMMON_GETTEXT_FLAGS) \
    GUC_check_errmsg:1:c-format \
    GUC_check_errdetail:1:c-format \
    GUC_check_errhint:1:c-format \
    write_stderr:1:c-format \
    report_invalid_record:2:c-format

gettext-files: distprep
	find $(srcdir)/ $(srcdir)/../common/ $(srcdir)/../port/ -name '*.c' -print | LC_ALL=C sort >$@

my-clean:
	rm -f gettext-files

.PHONY: my-clean
clean: my-clean


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

LOCAL_CPP_EXTENSION := .cc

# Set up the target identity
LOCAL_MODULE := libpac
LOCAL_MODULE_CLASS := SHARED_LIBRARIES

LOCAL_SRC_FILES := \
  src/proxy_resolver_v8.cc \
  src/proxy_resolver_js_bindings.cc \
  src/net_util.cc

LOCAL_CFLAGS += \
  -Wno-endif-labels \
  -Wno-import \
  -Wno-format \
  -Wno-unused-parameter \

LOCAL_C_INCLUDES += $(LOCAL_PATH)/src \
                    external/chromium_org/v8 \
                    external/chromium_org/src/v8 \

# Depend on V8 from WebView
# DO NOT COPY without permission from WebView Owners
LOCAL_STATIC_LIBRARIES := v8_tools_gyp_v8_base_gyp \
                          v8_tools_gyp_v8_snapshot_gyp

# Temporary until this V8 target name is fixed to not include the architecture.
LOCAL_GROUP_STATIC_LIBRARIES := true
LOCAL_STATIC_LIBRARIES_arm := v8_tools_gyp_v8_libbase_arm_gyp
LOCAL_STATIC_LIBRARIES_arm64 := v8_tools_gyp_v8_libbase_arm64_gyp
LOCAL_STATIC_LIBRARIES_x86 := v8_tools_gyp_v8_libbase_ia32_gyp
LOCAL_STATIC_LIBRARIES_x86_64 := v8_tools_gyp_v8_libbase_x64_gyp
LOCAL_STATIC_LIBRARIES_mips := v8_tools_gyp_v8_libbase_mipsel_gyp

LOCAL_SHARED_LIBRARIES := libutils libstlport liblog libicui18n libicuuc

include external/stlport/libstlport.mk

include $(BUILD_SHARED_LIBRARY)

Remove architecture from v8_libbase dependency.

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

LOCAL_CPP_EXTENSION := .cc

# Set up the target identity
LOCAL_MODULE := libpac
LOCAL_MODULE_CLASS := SHARED_LIBRARIES

LOCAL_SRC_FILES := \
  src/proxy_resolver_v8.cc \
  src/proxy_resolver_js_bindings.cc \
  src/net_util.cc

LOCAL_CFLAGS += \
  -Wno-endif-labels \
  -Wno-import \
  -Wno-format \
  -Wno-unused-parameter \

LOCAL_C_INCLUDES += $(LOCAL_PATH)/src \
                    external/chromium_org/v8 \
                    external/chromium_org/src/v8 \

# Depend on V8 from WebView
# DO NOT COPY without permission from WebView Owners
LOCAL_STATIC_LIBRARIES := v8_tools_gyp_v8_base_gyp \
			  v8_tools_gyp_v8_libbase_gyp \
                          v8_tools_gyp_v8_snapshot_gyp

LOCAL_SHARED_LIBRARIES := libutils libstlport liblog libicui18n libicuuc

include external/stlport/libstlport.mk

include $(BUILD_SHARED_LIBRARY)


arch = x86_64
version = 0.0
mirror = http://dl.2f30.org/morpheus-pkgs/${arch}/${version}
pkgdirs = $mkbuild/../ports
nprocs = 2

TOOLCHAIN_TRIPLET = ${arch}-musl-linux
CC = ${TOOLCHAIN_TRIPLET}-gcc
CXX = ${TOOLCHAIN_TRIPLET}-g++
LD = $CC
AR = ${TOOLCHAIN_TRIPLET}-ar
RANLIB = ${TOOLCHAIN_TRIPLET}-ranlib
STRIP = ${TOOLCHAIN_TRIPLET}-strip
CPP = ${TOOLCHAIN_TRIPLET}-cpp

HOST_TOOLCHAIN_TRIPLET = ${arch}-musl-linux
HOSTCC = $CC -static
SHELL = /bin/sh

PREFIX =
BINDIR = ${PREFIX}/bin
LIBDIR = ${PREFIX}/lib
ETCDIR = ${PREFIX}/etc
DFLDIR = ${ETCDIR}/default
MANDIR = ${PREFIX}/share/man

INSTALL = /usr/bin/install
SUM = sha512sum

# these don't work for all packages yet...
optldflags = -s -Wl,--gc-sections -Wl,-z,relro,-z,now
optcflags = -fdata-sections -ffunction-sections -Os -g0 -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack

CPPFLAGS = -D_BSD_SOURCE -D_GNU_SOURCE
CFLAGS = ${CPPFLAGS} # ${optcflags}
LDFLAGS = -static ${optldflags}

Revert "We link with -s, we do not use STRIP"

arch = x86_64
version = 0.0
mirror = http://dl.2f30.org/morpheus-pkgs/${arch}/${version}
pkgdirs = $mkbuild/../ports
nprocs = 2

TOOLCHAIN_TRIPLET = ${arch}-musl-linux
CC = ${TOOLCHAIN_TRIPLET}-gcc
CXX = ${TOOLCHAIN_TRIPLET}-g++
LD = $CC
AR = ${TOOLCHAIN_TRIPLET}-ar
RANLIB = ${TOOLCHAIN_TRIPLET}-ranlib
STRIP = ${TOOLCHAIN_TRIPLET}-strip
CPP = ${TOOLCHAIN_TRIPLET}-cpp

HOST_TOOLCHAIN_TRIPLET = ${arch}-musl-linux
HOSTCC = $CC -static
# use STRIP = true instead of the above
# if you do not want stripped binaries
#STRIP = true
SHELL = /bin/sh

PREFIX =
BINDIR = ${PREFIX}/bin
LIBDIR = ${PREFIX}/lib
ETCDIR = ${PREFIX}/etc
DFLDIR = ${ETCDIR}/default
MANDIR = ${PREFIX}/share/man

INSTALL = /usr/bin/install
SUM = sha512sum

# these don't work for all packages yet...
optldflags = -s -Wl,--gc-sections -Wl,-z,relro,-z,now
optcflags = -fdata-sections -ffunction-sections -Os -g0 -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack

CPPFLAGS = -D_BSD_SOURCE -D_GNU_SOURCE
CFLAGS = ${CPPFLAGS} # ${optcflags}
LDFLAGS = -static ${optldflags}


DEPS = edgar swab

dep_edgar = git https://github.com/crownedgrouse/edgar.git 1.0.1
dep_swab  = git https://github.com/crownedgrouse/swab.git  1.0.2

Change edgar version for now/0 deprecation

DEPS = edgar swab

dep_edgar = git https://github.com/crownedgrouse/edgar.git 1.0.2
dep_swab  = git https://github.com/crownedgrouse/swab.git  1.0.2


#/
# @license Apache-2.0
#
# Copyright (c) 2019 The Stdlib Authors.
#
# 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.
#/

# VARIABLES #

# Define the path of the executable:
LIST_PACKAGE_TYPES ?= $(TOOLS_PKGS_DIR)/pkgs/types/bin/cli

# Define the command flags:
LIST_PACKAGE_TYPES_FLAGS ?=

# TARGETS #

# List all packages containing TypeScript declarations.
#
# This target prints a list of all packages containing TypeScript declarations.

list-pkgs-types: $(LIST_PACKAGE_TYPES) $(NODE_MODULES)
	$(QUIET) NODE_PATH="$(NODE_PATH)" $(NODE) $(LIST_PACKAGE_TYPES) $(LIST_PACKAGE_TYPES_FLAGS) $(SRC_DIR)

.PHONY: list-pkgs-types

Add recipe for listing pkgs without TypeScript declarations

#/
# @license Apache-2.0
#
# Copyright (c) 2019 The Stdlib Authors.
#
# 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.
#/

# VARIABLES #

# Define the path of the executable:
LIST_PACKAGE_TYPES ?= $(TOOLS_PKGS_DIR)/pkgs/types/bin/cli

# Define the command flags:
LIST_PACKAGE_TYPES_FLAGS ?=

# TARGETS #

# List all packages containing TypeScript declarations.
#
# This target prints a list of all packages containing TypeScript declarations.

list-pkgs-types: $(LIST_PACKAGE_TYPES) $(NODE_MODULES)
	$(QUIET) NODE_PATH="$(NODE_PATH)" $(NODE) $(LIST_PACKAGE_TYPES) $(LIST_PACKAGE_TYPES_FLAGS) $(SRC_DIR)

.PHONY: list-pkgs-types

# List all packages without TypeScript declarations.
#
# This target prints a newline-delimited list of all packages without TypeScript declarations.

list-pkgs-without-types:
	$(QUIET) comm -23 <($(MAKE) -f $(this_file) list-lib-pkgs | sort) <($(MAKE) -f $(this_file) list-pkgs-types | sort)

.PHONY: list-pkgs-without-types


NECFLAGS = $(subst -Werror,,$(subst -Wall,,$(CFLAGS)))

%.c: %.y
	yacc -d -o$*.c $<

%.c: %.l
	flex -o$*.c $<

Add knowledge that gram.h is generated from gram.y

NECFLAGS = $(subst -Werror,,$(subst -Wall,,$(CFLAGS)))

%.h %.c: %.y
	yacc -d -o$*.c $<

%.c: %.l
	flex -o$*.c $<


# Makefile for creating a PDF from a LaTeX project
LATEX = pdflatex
LATEXFLAGS = -halt-on-error -no-shell-escape
LATEXMK = latexmk
LATEXMKFLAGS = -f

FIGURES  = $(patsubst %.svg,%.pdf,$(wildcard *.svg)) \
           $(patsubst %.jpg,%.pdf,$(wildcard *.jpg)) \
           $(patsubst %.png,%.pdf,$(wildcard *.png))

.PHONY: all
all: ${FIGURES}
	$(LATEXMK) $(LATEXMKFLAGS) -pdflatex="$(LATEX) $(LATEXFLAGS) %O %S" \
		-pdf "$(notdir $(CURDIR:%/=%))"

%.pdf: %.svg
	inkscape --without-gui --export-area-drawing --export-text-to-path \
		--export-ignore-filters --export-pdf=$@ $<

%.pdf: %.jpg
	convert $< $@

%.pdf: %.png
	convert $< $@

Switch from pdflatex to lualatex for builds

# Makefile for creating a PDF from a LaTeX project
LATEX = lualatex
LATEXFLAGS = -halt-on-error -no-shell-escape
LATEXMK = latexmk
LATEXMKFLAGS = -f

FIGURES  = $(patsubst %.svg,%.pdf,$(wildcard *.svg)) \
           $(patsubst %.jpg,%.pdf,$(wildcard *.jpg)) \
           $(patsubst %.png,%.pdf,$(wildcard *.png))

.PHONY: all
all: ${FIGURES}
	$(LATEXMK) $(LATEXMKFLAGS) -pdflatex="$(LATEX) $(LATEXFLAGS) %O %S" \
		-pdf "$(notdir $(CURDIR:%/=%))"

%.pdf: %.svg
	inkscape --without-gui --export-area-drawing --export-text-to-path \
		--export-ignore-filters --export-pdf=$@ $<

%.pdf: %.jpg
	convert $< $@

%.pdf: %.png
	convert $< $@


ifeq ($(MAKECMDGOALS), dist)
  dist-files += $(shell git ls-files) $(shell git ls-files)
endif

dist-files += configure config.h.in

GLOBAL_CXXFLAGS += -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr

Add nix.spec to the distribution

ifeq ($(MAKECMDGOALS), dist)
  dist-files += $(shell git ls-files) $(shell git ls-files)
endif

dist-files += configure config.h.in nix.spec

GLOBAL_CXXFLAGS += -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr


# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p9/procedures/hwp/initfiles/p9_xbus_g0_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_xbus_g0_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_xbus_g0_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_xbus_g0_scom
lib$(PROCEDURE)_COMMONFLAGS+=-fno-var-tracking-assignments
$(call BUILD_PROCEDURE)


# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p10/procedures/utils/stopreg/p10_stop_api.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=p10_stop_api
STOP_UTIL=$(ROOTPATH)/chips/p10/procedures/utils/stopreg/
STOP_UTIL+=$(ROOTPATH)/chips/p10/procedures/hwp/lib
lib$(PROCEDURE)_DEPLIBS += p10_stop_util
$(call ADD_MODULE_INCDIR,$(PROCEDURE),$(STOP_UTIL))
$(call BUILD_PROCEDURE)

Stop API: Fixed OP build issue for ubuntu 21.04.

# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/import/chips/p10/procedures/utils/stopreg/p10_stop_api.mk $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2015,2021
# [+] 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=p10_stop_api
STOP_UTIL=$(ROOTPATH)/chips/p10/procedures/utils/stopreg/
STOP_UTIL+=$(ROOTPATH)/chips/p10/procedures/hwp/lib
lib$(PROCEDURE)_USELIBS += p10_stop_util
$(call ADD_MODULE_INCDIR,$(PROCEDURE),$(STOP_UTIL))
$(call BUILD_PROCEDURE)


#HC=/tmp/ghc/bin/ghc
HC=ghc
setup: Setup.lhs
	$(HC) -cpp --make -i../.. Setup.lhs -o setup 2>out.build
clean:
	rm -f setup a.out .setup-config register.sh unregister.sh out.build
	rm -rf ,tmp* dist
	find . -name "*.o" |xargs rm -f
	find . -name "*.hi" |xargs rm -f
	find . -name "*~" | xargs rm -f
check: setup
	./setup configure --user --prefix=/tmp/foo
	./setup build
	./setup install --install-prefix=/tmp/bar
	ls /tmp/bar*
	# install w/ register!
	./setup install
#	ls /tmp/foo*
	./setup sdist
	ls dist

Make system tweaks to avoid cabal thinking it isn't bootstrapped when running the testsuite

# Some hacks
HC = $(shell grep "^HC=" ../../Makefile | sed "s/HC=//")
comma = ,
CABALVERSION = $(shell grep "^CABALVERSION=" ../../Makefile | sed "s/CABALVERSION=//")

setup: Setup.lhs
	$(HC) -cpp -DCABAL_VERSION=$(subst .,$(comma),$(CABALVERSION)) --make -i../.. Setup.lhs -o setup 2>out.build
clean:
	rm -f setup a.out .setup-config register.sh unregister.sh out.build
	rm -rf ,tmp* dist
	find . -name "*.o" |xargs rm -f
	find . -name "*.hi" |xargs rm -f
	find . -name "*~" | xargs rm -f
check: setup
	./setup configure --user --prefix=/tmp/foo
	./setup build
	./setup install --install-prefix=/tmp/bar
	ls /tmp/bar*
	# install w/ register!
	./setup install
#	ls /tmp/foo*
	./setup sdist
	ls dist


# Copyright (C) 2015 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)

LOCAL_MODULE_TAGS := tests

LOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION)

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_RESOURCE_DIR := \
    $(LOCAL_PATH)/res \
    $(LOCAL_PATH)/../res

LOCAL_STATIC_JAVA_LIBRARIES  := \
        android-support-v7-recyclerview \
        android-support-v4 \
        android-support-annotations

LOCAL_PACKAGE_NAME := RecyclerViewTests
LOCAL_AAPT_FLAGS := \
        --auto-add-overlay \
        --extra-packages android.support.v7.recyclerview

include $(BUILD_PACKAGE)

Add APCT tests to the device-tests suite.

# Copyright (C) 2015 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)

LOCAL_MODULE_TAGS := tests

LOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION)

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_RESOURCE_DIR := \
    $(LOCAL_PATH)/res \
    $(LOCAL_PATH)/../res

LOCAL_STATIC_JAVA_LIBRARIES  := \
        android-support-v7-recyclerview \
        android-support-v4 \
        android-support-annotations

LOCAL_PACKAGE_NAME := RecyclerViewTests
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_AAPT_FLAGS := \
        --auto-add-overlay \
        --extra-packages android.support.v7.recyclerview

include $(BUILD_PACKAGE)


.INTERMEDIATE: testfn testbuildin

testfn:
	@echo 'echo "void $$1(); int main() {$$1();return 0;}" > testfn.c' >$@
	@echo 'if gcc -o testfn.out testfn.c 2> /dev/null; then echo "#define $$2 1"; else echo "#defined $$2 0"; fi' >>$@
	@echo 'rm -f testfn.out testfn.c' >>$@
	@chmod +x $@

testbuildin:
	@echo 'echo "int main() {$$1;return 0;}"  > testfn.c' >$@
	@echo 'if gcc -o testfn.out testfn.c 2> /dev/null; then echo "#define $$2 1"; else echo "#defined $$2 0"; fi' >>$@
	@echo 'rm -f testfn.out testfn.c' >>$@
	@chmod +x $@

Improve test function in makefile

.INTERMEDIATE: testfn testbuildin testheader

testfn:
	@echo '#!/bin/bash'>$@
	@echo 'echo "void $$1(); int main() {$$1();return 0;}" > testfn.c' >>$@
	@echo 'if gcc -o testfn.out testfn.c 2> /dev/null; then echo "#define $$2 1"; else echo "#define $$2 0"; fi' >>$@
	@echo 'rm -f testfn.out testfn.c' >>$@
	@chmod +x $@

testbuildin:
	@echo '#!/bin/bash'>$@
	@echo 'echo "int main() {$$1;return 0;}"  > testfn.c' >>$@
	@echo 'if gcc -o testfn.out testfn.c 2> /dev/null; then echo "#define $$2 1"; else echo "#define $$2 0"; fi' >>$@
	@echo 'rm -f testfn.out testfn.c' >>$@
	@chmod +x $@

testheader:
	@echo '#!/bin/bash' >$@
	@echo 'echo -e "#include <$$1>\\n\\nint main() {return 0;}"  > testheader.c' >>$@
	@echo 'if gcc -o testheader.out testheader.c 2> /dev/null; then echo "#define $$2 1"; else echo "#define $$2 0"; fi' >>$@
	@echo 'rm -f testheader.out testheader.c' >>$@
	@chmod +x $@


# 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.

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

LOCAL_MODULE := guava
LOCAL_SDK_VERSION := 8
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_STATIC_JAVA_LIBRARIES := jsr305

include $(BUILD_STATIC_JAVA_LIBRARY)

# Include this library in the build server's output directory
$(call dist-for-goals, droid, $(LOCAL_BUILT_MODULE):guava.jar)

Add in build rule to build guava as a host side library as well as a device side library.

# 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.

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

LOCAL_MODULE := guava
LOCAL_SDK_VERSION := 8
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_STATIC_JAVA_LIBRARIES := jsr305

include $(BUILD_STATIC_JAVA_LIBRARY)

# Include this library in the build server's output directory
$(call dist-for-goals, droid, $(LOCAL_BUILT_MODULE):guava.jar)

# Also build a host-side library
include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_MODULE := guavalib
LOCAL_STATIC_JAVA_LIBRARIES := jsr305lib

include $(BUILD_HOST_JAVA_LIBRARY)


SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST)))

XML_DEPS = $(shell realpath $(SELF_DIR)/../../utils/xml_deps.py)

arch.deps.mk: arch.xml $(XML_DEPS) $(SELF_DIR)/arch.mk
	$(XML_DEPS) $@ $<

-include arch.deps.mk

merged.xml: arch.xml arch.deps.mk $(SELF_DIR)/arch.mk
	@rm -f $@
	@echo '<?xml version="1.0"?>' > $@
	@echo '<!-- Generated from arch.xml - **DO NOT EDIT** -->' >> $@
	xmllint --xinclude --nsclean --noblanks --format arch.xml \
	| sed -e's/\s*\(xml\|xmlns\):[^=]*="[^"]*"\s*/ /g' -e's/\s\+/ /g' -e's/\s\+"/"/g' -e's/="\s\+/="/g' \
	| XMLLINT_INDENT=' ' xmllint --pretty 1 - \
	| tail -n+2 >> $@
	@chmod u-w $@ # Make read only to prevent editing.

clean:
	rm -f arch.deps.mk merged.xml

.DEFAULT_GOAL := merged.xml

Remove any leftover xi:includes after processing.

SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST)))

XML_DEPS = $(shell realpath $(SELF_DIR)/../../utils/xml_deps.py)

arch.deps.mk: arch.xml $(XML_DEPS) $(SELF_DIR)/arch.mk
	$(XML_DEPS) $@ $<

-include arch.deps.mk

merged.xml: arch.xml arch.deps.mk $(SELF_DIR)/arch.mk
	@rm -f $@
	@echo '<?xml version="1.0"?>' > $@
	@echo '<!-- Generated from arch.xml - **DO NOT EDIT** -->' >> $@
	xmllint --xinclude --nsclean --noblanks --format arch.xml \
	| sed -e's/\s*\(xml\|xmlns\):[^=]*="[^"]*"\s*/ /g' -e's/\s\+/ /g' -e's/\s\+"/"/g' -e's/="\s\+/="/g' -e's/<xi:include[^>]*>//g' \
	| XMLLINT_INDENT=' ' xmllint --pretty 1 - \
	| tail -n+2 >> $@
	@chmod u-w $@ # Make read only to prevent editing.

clean:
	rm -f arch.deps.mk merged.xml

.DEFAULT_GOAL := merged.xml


dep-save:
	$(if $(GODEP), , \
		$(error Please install godep: go get github.com/tools/godep))
	godep save $(shell go list ./... | grep -v vendor/)

dep-restore:
	$(if $(GODEP), , \
		$(error Please install godep: go get github.com/tools/godep))
	godep restore -v

Change godep command call to use the GODEP variable

dep-save:
	$(if $(GODEP), , \
		$(error Please install godep: go get github.com/tools/godep))
	$(GODEP) save $(shell go list ./... | grep -v vendor/)

dep-restore:
	$(if $(GODEP), , \
		$(error Please install godep: go get github.com/tools/godep))
	$(GODEP) restore -v


USB_VID = 0x239A
USB_PID = 0x811E

USB_PRODUCT = "Feather ESP32-S3 TFT"
USB_MANUFACTURER = "Adafruit"

IDF_TARGET = esp32s3

#CIRCUITPY_AUDIOCORE = 0
#CIRCUITPY_PULSEIO = 0
CIRCUITPY_BITBANGIO = 0

INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = MPZ

# The default queue depth of 16 overflows on release builds,
# so increase it to 32.
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32

CIRCUITPY_ESP_FLASH_MODE=dio
CIRCUITPY_ESP_FLASH_FREQ=40m
CIRCUITPY_ESP_FLASH_SIZE=4MB

CIRCUITPY_MODULE=wroom

Disable ulab for ESP32-S3 TFT

USB_VID = 0x239A
USB_PID = 0x811E

USB_PRODUCT = "Feather ESP32-S3 TFT"
USB_MANUFACTURER = "Adafruit"

IDF_TARGET = esp32s3

# Make room for build
CIRCUITPY_ULAB = 0

INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = MPZ

# The default queue depth of 16 overflows on release builds,
# so increase it to 32.
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32

CIRCUITPY_ESP_FLASH_MODE=dio
CIRCUITPY_ESP_FLASH_FREQ=40m
CIRCUITPY_ESP_FLASH_SIZE=4MB

CIRCUITPY_MODULE=wroom


APP_OPTIM := release
APP_ABI := all # or armeabi
APP_MODULES := libjpeg

Fix jpeg build for newer NDKs

APP_OPTIM := release
APP_ABI := all # or armeabi
APP_MODULES := libjpeg
APP_ALLOW_MISSING_DEPS := true


LOCAL_PATH := $(call my-dir)

################################
include $(CLEAR_VARS)

LOCAL_MODULE    := cve-2013-6123
LOCAL_SRC_FILES := put_get_user_check.c

LOCAL_CFLAGS += -Ijni/include/

include $(BUILD_SHARED_LIBRARY)
################################

################################
include $(CLEAR_VARS)

LOCAL_MODULE    := cve-2013-6123check
LOCAL_SRC_FILES := put_get_user_check.c

LOCAL_CFLAGS += -Ijni/include/

include $(BUILD_EXECUTABLE)
################################

###############################
include $(CLEAR_VARS)

LOCAL_MODULE    := cve-2014-3153
LOCAL_SRC_FILES := futex_exploit_check.c

LOCAL_CFLAGS += -Ijni/include/

include $(BUILD_SHARED_LIBRARY)
################################

################################
include $(CLEAR_VARS)

LOCAL_MODULE    := cve-2011-1149
LOCAL_SRC_FILES := ashmem_bug.c

include $(BUILD_SHARED_LIBRARY)
################################

################################
include $(CLEAR_VARS)

LOCAL_MODULE    := cve-2011-1149check
LOCAL_SRC_FILES := ashmem_bug.c

include $(BUILD_EXECUTABLE)
################################

Build command line version of futex check as well as shared library

LOCAL_PATH := $(call my-dir)

################################
include $(CLEAR_VARS)

LOCAL_MODULE    := cve-2013-6123
LOCAL_SRC_FILES := put_get_user_check.c

LOCAL_CFLAGS += -Ijni/include/

include $(BUILD_SHARED_LIBRARY)
################################

################################
include $(CLEAR_VARS)

LOCAL_MODULE    := cve-2013-6123check
LOCAL_SRC_FILES := put_get_user_check.c

LOCAL_CFLAGS += -Ijni/include/

include $(BUILD_EXECUTABLE)
################################

###############################
include $(CLEAR_VARS)

LOCAL_MODULE    := cve-2014-3153
LOCAL_SRC_FILES := futex_exploit_check.c

LOCAL_CFLAGS += -Ijni/include/

include $(BUILD_SHARED_LIBRARY)
################################

################################
include $(CLEAR_VARS)

LOCAL_MODULE    := cve-2014-3153check
LOCAL_SRC_FILES := futex_exploit_check.c

LOCAL_CFLAGS += -Ijni/include/

include $(BUILD_EXECUTABLE)
################################

################################
include $(CLEAR_VARS)

LOCAL_MODULE    := cve-2011-1149
LOCAL_SRC_FILES := ashmem_bug.c

include $(BUILD_SHARED_LIBRARY)
################################

################################
include $(CLEAR_VARS)

LOCAL_MODULE    := cve-2011-1149check
LOCAL_SRC_FILES := ashmem_bug.c

include $(BUILD_EXECUTABLE)
################################


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

LOCAL_SRC_FILES:= \
    android_renderscript_RenderScript.cpp

LOCAL_SHARED_LIBRARIES := \
        libRSSupport \
        libjnigraphics

LOCAL_STATIC_LIBRARIES := \
        libcutils \
        liblog

rs_generated_include_dir := $(call intermediates-dir-for,SHARED_LIBRARIES,libRSSupport,,)

LOCAL_C_INCLUDES += \
	$(JNI_H_INCLUDE) \
	frameworks/rs \
	$(rs_generated_include_dir)

LOCAL_CFLAGS +=

LOCAL_LDLIBS := -lpthread
LOCAL_ADDITIONAL_DEPENDENCIES := $(addprefix $(rs_generated_include_dir)/,rsgApiFuncDecl.h)
LOCAL_MODULE:= librsjni
LOCAL_ADDITIONAL_DEPENDENCIES += $(rs_generated_source)
LOCAL_MODULE_TAGS := optional
LOCAL_REQUIRED_MODULES := libRSSupport

include $(BUILD_SHARED_LIBRARY)

Switch JNI library over to building with Clang.

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

LOCAL_CLANG := true

LOCAL_SRC_FILES:= \
    android_renderscript_RenderScript.cpp

LOCAL_SHARED_LIBRARIES := \
        libRSSupport \
        libjnigraphics

LOCAL_STATIC_LIBRARIES := \
        libcutils \
        liblog

rs_generated_include_dir := $(call intermediates-dir-for,SHARED_LIBRARIES,libRSSupport,,)

LOCAL_C_INCLUDES += \
	$(JNI_H_INCLUDE) \
	frameworks/rs \
	$(rs_generated_include_dir)

LOCAL_CFLAGS += -Wno-unused-parameter

LOCAL_LDLIBS := -lpthread
LOCAL_ADDITIONAL_DEPENDENCIES := $(addprefix $(rs_generated_include_dir)/,rsgApiFuncDecl.h)
LOCAL_MODULE:= librsjni
LOCAL_ADDITIONAL_DEPENDENCIES += $(rs_generated_source)
LOCAL_MODULE_TAGS := optional
LOCAL_REQUIRED_MODULES := libRSSupport

include $(BUILD_SHARED_LIBRARY)


#
# 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)

mockwebserver_src_files := $(call all-java-files-under,src/main/java)

include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(mockwebserver_src_files)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := mockwebserver
LOCAL_JAVA_LIBRARIES := core
LOCAL_NO_STANDARD_LIBRARIES := true
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
include $(BUILD_STATIC_JAVA_LIBRARY)

include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(mockwebserver_src_files)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := mockwebserver-host
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
include $(BUILD_HOST_JAVA_LIBRARY)

Switch from core to core-libart

#
# 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)

mockwebserver_src_files := $(call all-java-files-under,src/main/java)

include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(mockwebserver_src_files)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := mockwebserver
LOCAL_JAVA_LIBRARIES := core-libart
LOCAL_NO_STANDARD_LIBRARIES := true
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
include $(BUILD_STATIC_JAVA_LIBRARY)

include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(mockwebserver_src_files)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := mockwebserver-host
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
include $(BUILD_HOST_JAVA_LIBRARY)


LOCAL_PATH := $(call my-dir)

GST_PLUGINS_GOOD_TOP := $(LOCAL_PATH)

include $(CLEAR_VARS)

include $(GST_PLUGINS_GOOD_TOP)/gst/id3demux/Android.mk
include $(GST_PLUGINS_GOOD_TOP)/gst/qtdemux/Android.mk
include $(GST_PLUGINS_GOOD_TOP)/gst/wavparse/Android.mk
include $(GST_PLUGINS_GOOD_TOP)/gst/videofilter/Android.mk

Build gst-plugins-good only if BUILD_WITH_GST option provided.

ifeq ($(strip $(BUILD_WITH_GST)),true)

LOCAL_PATH := $(call my-dir)

GST_PLUGINS_GOOD_TOP := $(LOCAL_PATH)

include $(CLEAR_VARS)

include $(GST_PLUGINS_GOOD_TOP)/gst/id3demux/Android.mk
include $(GST_PLUGINS_GOOD_TOP)/gst/qtdemux/Android.mk
include $(GST_PLUGINS_GOOD_TOP)/gst/wavparse/Android.mk
include $(GST_PLUGINS_GOOD_TOP)/gst/videofilter/Android.mk

endif


# Disable implicit rules
.SUFFIXES:

.DELETE_ON_ERROR:

.SECONDEXPANSION:

SHELL = /bin/bash

CC  ?= gcc
CXX ?= g++
LD  ?= gcc

valid_os = OSX Linux

ifeq ($(filter $(OS),$(valid_os)),)
    $(error the OS variable must be set to one of: $(valid_os))
endif

ifeq ($(OS),OSX)
    CFLAGS += -DOS_OSX
    SO_EXT := dylib
    bin_platform = osx
    soname_ld_option_prefix = -Wl,-install_name,@executable_path/
else
    CFLAGS += -DOS_LINUX
    SO_EXT := so
    CFLAGS_DEBUG += -gstabs
    bin_platform = linux64
    soname_ld_option_prefix = -Wl,-soname,
endif

Use @loader_path instead of @executable_path on os x

# Disable implicit rules
.SUFFIXES:

.DELETE_ON_ERROR:

.SECONDEXPANSION:

SHELL = /bin/bash

CC  ?= gcc
CXX ?= g++
LD  ?= gcc

valid_os = OSX Linux

ifeq ($(filter $(OS),$(valid_os)),)
    $(error the OS variable must be set to one of: $(valid_os))
endif

ifeq ($(OS),OSX)
    CFLAGS += -DOS_OSX
    SO_EXT := dylib
    bin_platform = osx
    soname_ld_option_prefix = -Wl,-install_name,@loader_path/
else
    CFLAGS += -DOS_LINUX
    SO_EXT := so
    CFLAGS_DEBUG += -gstabs
    bin_platform = linux64
    soname_ld_option_prefix = -Wl,-soname,
endif


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

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_RTC = 0
CIRCUITPY_SAMD = 0
CIRCUITPY_USB_MIDI = 0
CIRCUITPY_SMALL_BUILD = 1

CHIP_VARIANT = SAMD21E18A
CHIP_FAMILY = samd21

CFLAGS_INLINE_LIMIT = 45

# 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 rtc from pirkey_m0 to make TRANSLATION=fr fit

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

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_RTC = 0
CIRCUITPY_SAMD = 0
CIRCUITPY_USB_MIDI = 0
CIRCUITPY_SMALL_BUILD = 1

CHIP_VARIANT = SAMD21E18A
CHIP_FAMILY = samd21

CFLAGS_INLINE_LIMIT = 45

# 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