Skip to content

Commit

Permalink
Apply patch phoneME-GP2X-SDL-1.0.0.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
minexew committed Dec 26, 2020
1 parent 1a6147f commit e291ec2
Show file tree
Hide file tree
Showing 167 changed files with 26,952 additions and 29 deletions.
27 changes: 27 additions & 0 deletions compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
export MEHOME=~/phoneME/phoneme_feature
mkdir $MEHOME/build_output
export BUILD_OUTPUT_DIR=$MEHOME/build_output
export JDK_DIR=/usr/lib/jvm/j2sdk1.4.2_16
export PATH=$JDK_DIR/bin:$PATH
export MONTAVISTA=/gp2xsdk/Tools/arm-gp2x-linux
export PCSL_OUTPUT_DIR=$BUILD_OUTPUT_DIR/pcsl
export PCSL_PLATFORM=linux_i386_gcc
cd $MEHOME/pcsl
make NETWORK_MODULE=bsd/generic
export PCSL_PLATFORM=linux_arm_gcc
cd $MEHOME/pcsl
make NETWORK_MODULE=bsd/generic GNU_TOOLS_DIR=$MONTAVISTA
export JVMWorkSpace=$MEHOME/cldc
export JVMBuildSpace=$BUILD_OUTPUT_DIR/cldc
cd $JVMWorkSpace/build/linux_arm
make ENABLE_PCSL=true PCSL_OUTPUT_DIR=$BUILD_OUTPUT_DIR/pcsl ENABLE_ISOLATES=true GNU_TOOLS_DIR=$MONTAVISTA
cd $JVMWorkSpace/build/linux_i386
export PCSL_PLATFORM=linux_i386_gcc
make ENABLE_PCSL=true PCSL_OUTPUT_DIR=$BUILD_OUTPUT_DIR/pcsl ENABLE_ISOLATES=true
export MIDP_OUTPUT_DIR=$BUILD_OUTPUT_DIR/midp
cd $MEHOME/midp/build/linux_sdl_gcc
make USE_SDL_ABB=true PCSL_OUTPUT_DIR=$BUILD_OUTPUT_DIR/pcsl CLDC_DIST_DIR=$BUILD_OUTPUT_DIR/cldc/linux_i386/dist TOOLS_DIR=$MEHOME/tools USE_MULTIPLE_ISOLATES=true
cd $MEHOME/midp/build/linux_sdl_gcc
make USE_SDL_ABB=true PCSL_OUTPUT_DIR=$BUILD_OUTPUT_DIR/pcsl CLDC_DIST_DIR=$BUILD_OUTPUT_DIR/cldc/linux_arm/dist TOOLS_DIR=$MEHOME/tools TARGET_CPU=arm USE_MULTIPLE_ISOLATES=true GNU_TOOLS_DIR=$MONTAVISTA

10 changes: 10 additions & 0 deletions phoneme_feature/midp/build/common/makefiles/Subsystems.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,14 @@ PROJECT_MIDP_ABB_DIR ?= $(MIDP_ABB_DIR)
include $(PROJECT_MIDP_ABB_DIR)/src/config/$(SUBSYSTEM_MAKE_FILE)
endif

#####################################################################
# Multimedia Subsystem
# Description: SDL implements ABB
#####################################################################
ifeq ($(USE_SDL_ABB), true)
include $(SUBSYSTEM_DIR)/media-sdl/$(LIB_MAKE_FILE)
endif

#####################################################################
# (Extra) Mobile I18N Subsystem
# Description: JSR 238
Expand Down Expand Up @@ -395,11 +403,13 @@ ifneq ($(TARGET_VM),cdc_vm)
ifneq ($(USE_JSR_234), true)
ifneq ($(USE_JSR_135), true)
ifneq ($(USE_MIDP_ABB), true)
ifneq ($(USE_SDL_ABB), true)
include $(SUBSYSTEM_DIR)/media/$(LIB_MAKE_FILE)
endif
endif
endif
endif
endif

#####################################################################
# (Extra) JPEG lib
Expand Down
3 changes: 2 additions & 1 deletion phoneme_feature/midp/build/common/makefiles/gcc.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ ASMGEN_OPTIONS += +GenerateGNUCode

ifneq ($(TARGET_VM), cdc_vm)
# CDC port is not yet clear of warnings.
EXTRA_CFLAGS += -Werror
#EXTRA_CFLAGS += -Werror
EXTRA_CFLAGS +=
endif

EXTRA_CFLAGS += -W -Wall
Expand Down
156 changes: 156 additions & 0 deletions phoneme_feature/midp/build/common/makefiles/gcc.gmk~
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
#
#
#
# Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version
# 2 only, as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License version 2 for more details (a copy is
# included at /legal/license.txt).
#
# You should have received a copy of the GNU General Public License
# version 2 along with this work; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
# Clara, CA 95054 or visit www.sun.com if you need additional
# information or have any questions.
#
######################################################################
#
# Generic compiler specific defines
# MIDP specific directories and libraries defines will be in gcc-jtwi.gmk.
#
######################################################################
#
# The following variables are required to be defined here:
#
# File suffixes
#
# LIB_SUFFIX suffix of library file
# OBJ_SUFFIX suffix of object file
#
# Compiler definitions
#
# CC compiler command for c files
# CPP compiler command for c++ files
# CC_OUTPUT compiler option used to specify name of output file
#
# Linker definitions
#
# LD linker command
# LINKER_OUTPUT linker option used to specify output name
#
# Archiver or library command
#
# AR command that creates a library
#
# Some optional variables
#
# AR_FLAGS flags for the library command
# LIBS libraries to be linked with
# LD_FLAGS linker flags
# EXTRA_CFLAGS flags for c compiler
# EXTRA_CPPFLAGS flags for c++ compiler
#
#
######################################################################
ifdef GNU_TOOLS_DIR
GNU_TOOLS_BINDIR?=$(GNU_TOOLS_DIR)/bin/
else
ifeq ($(TARGET_CPU), arm)
# Export GNU_TOOLS_DIR to VM makefile
export GNU_TOOLS_DIR=/opt/Embedix/tools/arm-linux
GNU_TOOLS_BINDIR?=$(GNU_TOOLS_DIR)/bin/
else
# Otherwise, use gcc command from path
GNU_TOOLS_BINDIR=
endif
endif

# Suffix
LIB_SUFFIX = .a
SHARED_LIB_SUFFIX = .so
OBJ_SUFFIX = o

# Same defines when used as either TARGET or HOST COMPILER
ifndef USE_GCC
USE_GCC = true
endif
ifndef GCC_VERSION
GCC_VERSION =
endif

CC = $(GNU_TOOLS_BINDIR)gcc$(GCC_VERSION)
CPP = $(GNU_TOOLS_BINDIR)g++$(GCC_VERSION)
CC_OUTPUT = -o

LD = $(GNU_TOOLS_BINDIR)g++$(GCC_VERSION)
LINKER_OUTPUT = -o
LIBS = -lpthread -lm -lnsl

# Options to force single-pass linker to search undefined references repeatly.
# Note. '-Wl,' option cannot be used instead of -Xlinker
LD_START_GROUP = -Xlinker --start-group
LD_END_GROUP = --end-group

AR = $(GNU_TOOLS_BINDIR)ar
CREATE_LIB = $(AR) -rcs
LIB_OUTPUT =
RANLIB = $(GNU_TOOLS_BINDIR)ranlib

# commands for AR mri script
MRI_ADD = 'ADDMOD '
MRI_CREATE = 'CREATE '
MRI_SAVE = 'SAVE'
MRI_OPT = -M <

ASM = $(GNU_TOOLS_BINDIR)as
ASM_FLAGS = -W
ASM_OUTPUT = -o
ASMGEN_OPTIONS += +GenerateGNUCode

ifneq ($(TARGET_VM), cdc_vm)
# CDC port is not yet clear of warnings.
EXTRA_CFLAGS += -Werror
endif

EXTRA_CFLAGS += -W -Wall
EXTRA_CFLAGS += -DGCC

ifeq ($(TARGET_VM), cdc_vm)
ifneq ($(CVM_PRELOAD_LIB), true)
LD_FLAGS += -shared
endif
endif

ifeq ($(USE_NATIVE_PROFILER), true)
EXTRA_CFLAGS += -pg
LD_FLAGS += -pg
endif

ifeq ($(USE_GCOV), true)
EXTRA_CFLAGS += -O0 -fprofile-arcs -ftest-coverage
EXTRA_CPPFLAGS += -O0 -fprofile-arcs -ftest-coverage
LIBS += -lgcov
endif

ifeq ($(USE_DEBUG), true)
EXTRA_CFLAGS += -g -D_DEBUG
LD_FLAGS += -g
else
ifneq ($(USE_GCOV), true)
EXTRA_CFLAGS += -O3 -fexpensive-optimizations
EXTRA_CPPFLAGS += -fconserve-space
endif
ifeq ($(USE_NATIVE_PROFILER), false)
EXTRA_CFLAGS += -s -fomit-frame-pointer
endif
endif
90 changes: 90 additions & 0 deletions phoneme_feature/midp/build/linux_sdl_gcc/GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#
#
#
# Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version
# 2 only, as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License version 2 for more details (a copy is
# included at /legal/license.txt).
#
# You should have received a copy of the GNU General Public License
# version 2 along with this work; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
# Clara, CA 95054 or visit www.sun.com if you need additional
# information or have any questions.
#
######################################################################
#
# Makefile for building and packaging.
#
######################################################################
#
# The following variables are required to be defined here:
#
# Definitions regarding build platform
#
# HOST_PLATFORM
# HOST_OS os of host system
# HOST_CPU cpu of host system
# HOST_COMPILER compiler on host system
#
# Definitions of target or platform to run on
#
# TARGET_PLATFORM
# TARGET_OS os running on target device/system
# TARGET_CPU cpu on target device/platform
# TARGET_COMPILER compiler on target system
# TARGET_VM Java vm running on target
#
# MIDP_DIR top of midp workspace
#
# The following variables are optional:
#
# MIDP_OUTPUT_DIR Directory where output of build is put
#
######################################################################

# Definition of platform to build on
HOST_PLATFORM = linux
HOST_OS = linux
HOST_CPU = i386
HOST_COMPILER = gcc

# Definition of platform to run on
TARGET_PLATFORM = sdl
TARGET_OS = linux
TARGET_CPU = i386
TARGET_COMPILER = gcc
TARGET_VM = cldc_vm

# file/directory name separator ( / or \\\\ )
# if the file separator is backslash, double-quoting is needed,
# that is, you need to write "\\\\" (four backslashes) for "\" (one backslash)
FN_SEP=/

# Workspace directory
MIDP_DIR = $(CURDIR)/../..

# Build output directory
ifndef MIDP_OUTPUT_DIR
MIDP_OUTPUT_DIR = $(CURDIR)/output
endif

# Build options should be include before shared gmk
include Options.gmk


# All rules are defined in shared makefiles
include $(MIDP_DIR)/build/common/Top.gmk
include sdl.gmk

Loading

0 comments on commit e291ec2

Please sign in to comment.