6 REALCC
= $(CROSS_PREFIX
)$(CC
)
7 REALLD
= $(CROSS_PREFIX
)$(LD
)
8 REALRANLIB
= $(CROSS_PREFIX
)$(RANLIB
)
10 ifeq ($(CORE_TYPE
), BSNES
)
11 CORE_PATH
=$(shell pwd
)/bsnes
13 CORE_OBJECT
=bsnes
/out
/libsnes.
$(ARCHIVE_SUFFIX
)
14 CORE_DEFINE
=-DCORETYPE_BSNES
=1
16 CFLAGS
+= -DBSNES_IS_COMPAT
17 BSNES_PROFILE_STRING
=profile
=compatibility
19 BSNES_PROFILE_STRING
=profile
=accuracy
21 ifeq ($(BSNES_VERSION
), 084)
22 BSNES_PROFILE_STRING
+=options
=debugger
23 CFLAGS
+= -DBSNES_HAS_DEBUGGER
25 ifeq ($(BSNES_VERSION
), 085)
26 BSNES_PROFILE_STRING
+=options
=debugger
27 CFLAGS
+= -DBSNES_HAS_DEBUGGER
31 ifeq ($(BSNES_VERSION
), 087)
32 BSNES_TARGET_STRING
=target
=libsnes
34 BSNES_TARGET_STRING
=ui
=ui-libsnes
36 CFLAGS
+= -DBSNES_V
${BSNES_VERSION}
38 ifeq ($(CORE_TYPE
), GAMBATTE
)
39 CORE_PATH
=$(shell pwd
)/gambatte
41 CORE_OBJECT
=gambatte
/libgambatte
/libgambatte.
$(ARCHIVE_SUFFIX
)
42 CORE_DEFINE
=-DCORETYPE_GAMBATTE
=1
46 $(error
"Bad value for CORETYPE (expected BSNES or GAMBATTE)")
51 HOSTCCFLAGS
= -std
=gnu
++0x
52 CFLAGS
+= -I
$(CORE_PATH
) $(CORE_DEFINE
) -std
=gnu
++0x
$(USER_CFLAGS
)
59 LDFLAGS
= -lboost_iostreams
$(BOOST_LIB_POSTFIX
) -lboost_filesystem
$(BOOST_LIB_POSTFIX
) -lboost_system
$(BOOST_LIB_POSTFIX
) -lboost_regex
$(BOOST_LIB_POSTFIX
) -lz
$(USER_LDFLAGS
)
61 ifeq ($(THREADS
), NATIVE
)
62 CFLAGS
+= -DNATIVE_THREADS
64 ifeq ($(THREADS
), BOOST
)
65 CFLAGS
+= -DBOOST_THREADS
66 LDFLAGS
+= -lboost_thread
$(BOOST_LIB_POSTFIX
)
68 $(error
"Bad value for THREADS (expected NATIVE or BOOST)")
75 all: src
/__all_files__
79 compiler
=$(subst ++,cc,$(REALCC
))
80 gambatte_compiler
=$(REALCC
)
82 $(CORE_OBJECT
): forcelook
83 $(MAKE
) -C
$(CORE_SUBDIR
) $(BSNES_PROFILE_STRING
) $(BSNES_TARGET_STRING
)
86 src
/__all_files__
: src
/core
/version.
cpp forcelook
$(CORE_OBJECT
)
87 $(MAKE
) -C src precheck
89 cp src
/lsnes
$(DOT_EXECUTABLE_SUFFIX
) .
91 buildaux
/version.exe
: buildaux
/version.
cpp VERSION
92 $(HOSTCC
) $(HOSTCCFLAGS
) -o
$@
$<
93 src
/core
/version.
cpp: buildaux
/version.exe forcelook
94 buildaux
/version.exe
>$@
98 -$(MAKE
) -C bsnes
clean
99 -$(MAKE
) -C gambatte
clean