Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
dbfbb19
aarm64
dimitre Sep 10, 2022
05a95c2
info
dimitre Sep 11, 2022
d5c562a
aarch64 + info
dimitre Sep 11, 2022
0c9d504
aarch64 template
dimitre Sep 11, 2022
de87867
mfpu
dimitre Sep 11, 2022
e0c6b18
less config
dimitre Sep 11, 2022
f29938d
wall werror
dimitre Sep 11, 2022
5cda785
remove werror
dimitre Sep 11, 2022
1c35574
fix conflicts
dimitre Apr 19, 2023
0fdae69
constants
dimitre Apr 18, 2023
33b6bf2
updates
dimitre Apr 18, 2023
c01d713
update
dimitre Apr 18, 2023
ccee9a4
aarch64 in ofUtils
dimitre Apr 18, 2023
287ef84
constants fix
dimitre Apr 18, 2023
8d8d8ec
remove c++17 tag from specific platform. it gets from common
dimitre Apr 18, 2023
1de37ad
return commenting
dimitre Apr 18, 2023
c90d877
armv8a
dimitre Apr 18, 2023
24f31f3
rpi 4 flags
dimitre Apr 18, 2023
f14ee01
fix flags
dimitre Apr 18, 2023
1b0a8ff
GCC_MAJOR test
dimitre Apr 18, 2023
5ad9143
info red
dimitre Apr 18, 2023
6fc79a1
test in makefiles
dimitre Apr 18, 2023
5f13a88
more inspection
dimitre Apr 18, 2023
b7d12c3
up
dimitre Apr 18, 2023
cd86961
remove debug info
dimitre Apr 18, 2023
8873421
revert deleting xcconfig in another branch
dimitre Apr 18, 2023
0cc5b96
remove more info
dimitre Apr 18, 2023
35cd51c
update pg
dimitre Apr 19, 2023
8ad5ed3
constants ok
dimitre Apr 19, 2023
d551b14
updates
dimitre Apr 19, 2023
a990e32
update conflict
dimitre Apr 19, 2023
d6dd9aa
fix constants
dimitre Apr 19, 2023
3ff920a
fix constants
dimitre Apr 19, 2023
5a27817
simplify ofConstants.h change
dimitre Apr 19, 2023
7fc3f35
revert ofUtils ident
dimitre Apr 19, 2023
589b40b
fix PR ouch
dimitre Apr 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion libs/openFrameworks/utils/ofConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ enum ofTargetPlatform{
OF_TARGET_LINUXARMV7L,
/// \brief Compiled to javascript using Emscripten.
/// \sa https://github.com/kripken/emscripten
OF_TARGET_EMSCRIPTEN
OF_TARGET_EMSCRIPTEN,
OF_TARGET_LINUXAARCH64
};


Expand Down
2 changes: 2 additions & 0 deletions libs/openFrameworks/utils/ofUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,8 @@ ofTargetPlatform ofGetTargetPlatform(){
return OF_TARGET_LINUXARMV6L;
} else if(ofIsStringInString(arch,"armv7l")) {
return OF_TARGET_LINUXARMV7L;
} else if(ofIsStringInString(arch,"aarch64")) {
return OF_TARGET_LINUXAARCH64;
} else {
return OF_TARGET_LINUX;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
###############################################################################
# CONFIGURE CORE PLATFORM MAKEFILE
# This file is where we make platform and architecture specific
# configurations. This file can be specified for a generic architecture or can
# be defined as variants. For instance, normally this file will be located in
# a platform specific subpath such as
#
# $(OF_ROOT)/libs/openFrameworksComplied/linux64
#
# This file will then be a generic platform file like:
#
# configure.linux64.default.make
#
# Or it can specify a specific platform variant like:
#
# configure.linuxarmv6l.raspberrypi.make
#
################################################################################

################################################################################
# include common rules
#
# all linux systems have several rules in common so most of them are included
# from the following file
#
################################################################################

include $(OF_SHARED_MAKEFILES_PATH)/config.linux.common.mk


################################################################################
# PLATFORM CFLAGS
# This is a list of fully qualified CFLAGS required when compiling for this
# platform. These flags will always be added when compiling a project or the
# core library. These flags are presented to the compiler AFTER the
# PLATFORM_OPTIMIZATION_CFLAGS below.
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################

PLATFORM_LDFLAGS += -lstdc++fs


PLATFORM_CFLAGS += -march=armv8-a
PLATFORM_CFLAGS += -mcpu=cortex-a72
PLATFORM_CFLAGS += -mtune=cortex-a72
# PLATFORM_CFLAGS += -Wall
# PLATFORM_CFLAGS += -Werror
PLATFORM_CFLAGS += -fPIC
PLATFORM_CFLAGS += -ftree-vectorize
PLATFORM_CFLAGS += -Wno-psabi
PLATFORM_CFLAGS += -pipe

################################################################################
# PLATFORM LIBRARIES
# These are library names/paths that are platform specific and are specified
# using names or paths. The library flag (i.e. -l) is prefixed automatically.
#
# PLATFORM_LIBRARIES are libraries that can be found in the library search
# paths.
# PLATFORM_STATIC_LIBRARIES is a list of required static libraries.
# PLATFORM_SHARED_LIBRARIES is a list of required shared libraries.
# PLATFORM_PKG_CONFIG_LIBRARIES is a list of required libraries that are
# under system control and are easily accesible via the package
# configuration utility (i.e. pkg-config)
#
# See the helpfile for the -l flag here for more information:
# http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################

PLATFORM_PKG_CONFIG_LIBRARIES += glesv1_cm
PLATFORM_PKG_CONFIG_LIBRARIES += glesv2
PLATFORM_PKG_CONFIG_LIBRARIES += egl


################################################################################
# PLATFORM CORE EXCLUSIONS
# During compilation, these makefiles will generate lists of sources, headers
# and third party libraries to be compiled and linked into a program or core
# library. The PLATFORM_CORE_EXCLUSIONS is a list of fully qualified file
# paths that will be used to exclude matching paths and files during list
# generation.
#
# Each item in the PLATFORM_CORE_EXCLUSIONS list will be treated as a complete
# string unless teh user adds a wildcard (%) operator to match subdirectories.
# GNU make only allows one wildcard for matching. The second wildcard (%) is
# treated literally.
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################

PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/sound/ofFmodSoundPlayer.cpp

ifeq ($(CROSS_COMPILING),1)

ifdef TOOLCHAIN_ROOT
#You have specified TOOLCHAIN_ROOT with an environment variable
else
TOOLCHAIN_ROOT = /opt/cross/bin
endif

ifdef GCC_PREFIX
#You have specified GCC_PREFIX with an environment variable
else
GCC_PREFIX = arm-linux-gnueabihf
endif

PLATFORM_CXX = $(TOOLCHAIN_ROOT)/bin/$(GCC_PREFIX)-g++
PLATFORM_CC = $(TOOLCHAIN_ROOT)/bin/$(GCC_PREFIX)-gcc
PLATFORM_AR = $(TOOLCHAIN_ROOT)/bin/$(GCC_PREFIX)-ar
PLATFORM_LD = $(TOOLCHAIN_ROOT)/bin/$(GCC_PREFIX)-ld

SYSROOT=$(RPI_ROOT)

#c++ 17 support - comment out two lines below to use c++11
PLATFORM_CFLAGS += -std=c++17

PLATFORM_HEADER_SEARCH_PATHS += $(SYSROOT)/usr/include/c++/7

PLATFORM_LIBRARY_SEARCH_PATHS += $(SYSROOT)/usr/lib/$(GCC_PREFIX)

PLATFORM_LDFLAGS += --sysroot=$(SYSROOT)
PLATFORM_LDFLAGS += -Wl,-rpath=$(SYSROOT)/usr/lib/$(GCC_PREFIX)
PLATFORM_LDFLAGS += -Wl,-rpath=$(SYSROOT)/lib/$(GCC_PREFIX)

PKG_CONFIG_LIBDIR=$(SYSROOT)/usr/lib/pkgconfig:$(SYSROOT)/usr/lib/arm-linux-gnueabihf/pkgconfig:$(SYSROOT)/usr/share/pkgconfig

endif
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ else
endif
endif


ifdef MAKEFILE_DEBUG
$(info PLATFORM_ARCH=$(PLATFORM_ARCH))
$(info PLATFORM_OS=$(PLATFORM_OS))
Expand All @@ -92,6 +93,8 @@ ifndef PLATFORM_LIB_SUBPATH
PLATFORM_LIB_SUBPATH=linux
else ifeq ($(PLATFORM_ARCH),i686)
PLATFORM_LIB_SUBPATH=linux
else ifeq ($(PLATFORM_ARCH),aarch64)
PLATFORM_LIB_SUBPATH=linuxaarch64
else
$(error This makefile does not support your architecture $(PLATFORM_ARCH))
endif
Expand Down
13 changes: 13 additions & 0 deletions scripts/templates/linuxaarch64/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Attempt to load a config.make file.
# If none is found, project defaults in config.project.make will be used.
ifneq ($(wildcard config.make),)
include config.make
endif

# make sure the the OF_ROOT location is defined
ifndef OF_ROOT
OF_ROOT=$(realpath ../../..)
endif

# call the project makefile!
include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
142 changes: 142 additions & 0 deletions scripts/templates/linuxaarch64/config.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
################################################################################
# CONFIGURE PROJECT MAKEFILE (optional)
# This file is where we make project specific configurations.
################################################################################

################################################################################
# OF ROOT
# The location of your root openFrameworks installation
# (default) OF_ROOT = ../../..
################################################################################
# OF_ROOT = ../../..

################################################################################
# PROJECT ROOT
# The location of the project - a starting place for searching for files
# (default) PROJECT_ROOT = . (this directory)
#
################################################################################
# PROJECT_ROOT = .

################################################################################
# PROJECT SPECIFIC CHECKS
# This is a project defined section to create internal makefile flags to
# conditionally enable or disable the addition of various features within
# this makefile. For instance, if you want to make changes based on whether
# GTK is installed, one might test that here and create a variable to check.
################################################################################
# None

################################################################################
# PROJECT EXTERNAL SOURCE PATHS
# These are fully qualified paths that are not within the PROJECT_ROOT folder.
# Like source folders in the PROJECT_ROOT, these paths are subject to
# exlclusion via the PROJECT_EXLCUSIONS list.
#
# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank)
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_EXTERNAL_SOURCE_PATHS =

################################################################################
# PROJECT EXCLUSIONS
# These makefiles assume that all folders in your current project directory
# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations
# to look for source code. The any folders or files that match any of the
# items in the PROJECT_EXCLUSIONS list below will be ignored.
#
# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete
# string unless teh user adds a wildcard (%) operator to match subdirectories.
# GNU make only allows one wildcard for matching. The second wildcard (%) is
# treated literally.
#
# (default) PROJECT_EXCLUSIONS = (blank)
#
# Will automatically exclude the following:
#
# $(PROJECT_ROOT)/bin%
# $(PROJECT_ROOT)/obj%
# $(PROJECT_ROOT)/%.xcodeproj
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_EXCLUSIONS =

################################################################################
# PROJECT LINKER FLAGS
# These flags will be sent to the linker when compiling the executable.
#
# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################

# Currently, shared libraries that are needed are copied to the
# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to
# add a runtime path to search for those shared libraries, since they aren't
# incorporated directly into the final executable application binary.
# TODO: should this be a default setting?
# PROJECT_LDFLAGS=-Wl,-rpath=./libs

################################################################################
# PROJECT DEFINES
# Create a space-delimited list of DEFINES. The list will be converted into
# CFLAGS with the "-D" flag later in the makefile.
#
# (default) PROJECT_DEFINES = (blank)
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_DEFINES =

################################################################################
# PROJECT CFLAGS
# This is a list of fully qualified CFLAGS required when compiling for this
# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS
# defined in your platform specific core configuration files. These flags are
# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below.
#
# (default) PROJECT_CFLAGS = (blank)
#
# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in
# your platform specific configuration file will be applied by default and
# further flags here may not be needed.
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_CFLAGS =

################################################################################
# PROJECT OPTIMIZATION CFLAGS
# These are lists of CFLAGS that are target-specific. While any flags could
# be conditionally added, they are usually limited to optimization flags.
# These flags are added BEFORE the PROJECT_CFLAGS.
#
# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets.
#
# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank)
#
# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets.
#
# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank)
#
# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the
# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration
# file will be applied by default and further optimization flags here may not
# be needed.
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_OPTIMIZATION_CFLAGS_RELEASE =
# PROJECT_OPTIMIZATION_CFLAGS_DEBUG =

################################################################################
# PROJECT COMPILERS
# Custom compilers can be set for CC and CXX
# (default) PROJECT_CXX = (blank)
# (default) PROJECT_CC = (blank)
# Note: Leave a leading space when adding list items with the += operator
################################################################################
# PROJECT_CXX =
# PROJECT_CC =