Added Android targeted build support to the makefile
This commit is contained in:
parent
22b130be23
commit
2d4d248ae3
1 changed files with 44 additions and 31 deletions
21
makefile
21
makefile
|
@ -7,9 +7,10 @@
|
|||
# NetBSD
|
||||
# FreeBSD
|
||||
# Windows (MinGW & cygwin)
|
||||
# Linux x86 targeting Android (using agcc script)
|
||||
#
|
||||
#
|
||||
# CC Command (and platform available options). (Poor man's autoconf)
|
||||
# Android targeted builds should invoke GNU make with GCC=agcc on
|
||||
# the command line.
|
||||
#
|
||||
# In general, the logic below will detect and build with the available
|
||||
# features which the host build environment provides.
|
||||
|
@ -20,14 +21,21 @@
|
|||
# Internal ROM support can be disabled if GNU make is invoked with
|
||||
# DONT_USE_ROMS=1 on the command line.
|
||||
#
|
||||
ifeq ($(WIN32),)
|
||||
#*nix Environments (&& cygwin)
|
||||
# CC Command (and platform available options). (Poor man's autoconf)
|
||||
#
|
||||
ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||
ifeq ($(GCC),)
|
||||
GCC = gcc
|
||||
endif
|
||||
ifeq (SunOS,$(shell uname))
|
||||
TEST = /bin/test
|
||||
else
|
||||
TEST = test
|
||||
endif
|
||||
ifeq (agcc,$(findstring agcc,$(GCC))) # Android target build?
|
||||
OS_CCDEFS = -D_GNU_SOURCE -DSIM_ASYNCH_IO
|
||||
OS_LDFLAGS = -lm
|
||||
else # Non-Android Builds
|
||||
INCPATH=/usr/include
|
||||
LIBPATH=/usr/lib
|
||||
OS_CCDEFS = -D_GNU_SOURCE
|
||||
|
@ -63,6 +71,7 @@ ifeq ($(WIN32),)
|
|||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq (cygwin,$(findstring cygwin,$(OSTYPE)))
|
||||
OS_CCDEFS += -O2
|
||||
endif
|
||||
|
@ -441,7 +450,11 @@ endif
|
|||
|
||||
${BIN}BuildROMs${EXE} :
|
||||
${MKDIRBIN}
|
||||
ifeq (agcc,$(findstring agcc,$(firstword $(CC))))
|
||||
gcc $(wordlist 2,1000,${CC}) sim_BuildROMs.c -o $@
|
||||
else
|
||||
${CC} sim_BuildROMs.c -o $@
|
||||
endif
|
||||
ifeq ($(WIN32),)
|
||||
$@
|
||||
${RM} $@
|
||||
|
|
Loading…
Add table
Reference in a new issue