Skip to content

Commit

Permalink
first stab at building android externals
Browse files Browse the repository at this point in the history
compiles on dockcross/android-arm and dockcross/android-arm64
not runtime tests have been performed yet (as i only have a cross-compilation environment)

Related: #60
  • Loading branch information
umlaeute committed Mar 9, 2020
1 parent 9bd01a2 commit 6a99fbd
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Makefile.pdlibbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,9 @@ target.triplet := $(subst -, ,$(shell $(CC) -dumpmachine))
ifneq ($(filter linux gnu% kfreebsd, $(target.triplet)),)
system = Linux
endif
ifneq ($(filter android%, $(target.triplet)),)
system = Android
endif

ifneq ($(filter darwin%, $(target.triplet)),)
system = Darwin
Expand Down Expand Up @@ -497,6 +500,27 @@ ifeq ($(system), Linux)
endif


#=== flags and paths for Android ===============================================
ifeq ($(system), Android)
prefix = /usr/local
libdir := $(prefix)/lib
pkglibdir = $(libdir)/pd-externals
pdincludepath := $(wildcard /usr/include/pd)
extension = so
cpp.flags := -DUNIX
c.flags :=
c.ldflags := -rdynamic -shared -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags
c.ldlibs := -lc -lm
cxx.flags := -fcheck-new
cxx.ldflags := -rdynamic -shared -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags
cxx.ldlibs := -lc -lm -lstdc++
shared.extension = so
shared.ldflags := -rdynamic -shared -Wl,-soname,$(shared.lib)
endif




#=== flags and paths for Darwin ================================================


Expand Down Expand Up @@ -721,7 +745,11 @@ all.objects = $(classes.objects) $(common.objects) $(shared.objects) \


# construct class executable names from class names
ifeq ($(system), Android)
classes.executables := $(addprefix lib, $(addsuffix .$(extension), $(patsubst %~,%_tilde,$(classes))))
else
classes.executables := $(addsuffix .$(extension), $(classes))
endif

# Construct shared lib executable name if shared sources are defined. If
# extension and shared extension are not identical, use both to facilitate co-
Expand Down

0 comments on commit 6a99fbd

Please sign in to comment.