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