9 REALCC
= $(CROSS_PREFIX
)$(CC
)
10 REALLD
= $(CROSS_PREFIX
)$(LD
)
11 REALRANLIB
= $(CROSS_PREFIX
)$(RANLIB
)
13 ifeq ($(CORE_TYPE
), BSNES
)
14 CORE_PATH
=$(shell pwd
)/bsnes
16 CORE_OBJECT
=bsnes
/out
/libsnes.
$(ARCHIVE_SUFFIX
)
17 CORE_DEFINE
=-DCORETYPE_BSNES
=1
19 CFLAGS
+= -DBSNES_IS_COMPAT
20 BSNES_PROFILE_STRING
=profile
=compatibility
22 BSNES_PROFILE_STRING
=profile
=accuracy
24 ifeq ($(BSNES_VERSION
), 084)
25 BSNES_PROFILE_STRING
+=options
=debugger
26 CFLAGS
+= -DBSNES_HAS_DEBUGGER
28 ifeq ($(BSNES_VERSION
), 085)
29 BSNES_PROFILE_STRING
+=options
=debugger
30 CFLAGS
+= -DBSNES_HAS_DEBUGGER
34 ifeq ($(BSNES_VERSION
), 087)
35 BSNES_TARGET_STRING
=target
=libsnes
37 BSNES_TARGET_STRING
=ui
=ui-libsnes
39 CFLAGS
+= -DBSNES_V
${BSNES_VERSION}
41 ifeq ($(CORE_TYPE
), GAMBATTE
)
42 CORE_PATH
=$(shell pwd
)/gambatte
44 CORE_OBJECT
=gambatte
/libgambatte
/libgambatte.
$(ARCHIVE_SUFFIX
)
45 CORE_DEFINE
=-DCORETYPE_GAMBATTE
=1
49 $(error
"Bad value for CORETYPE (expected BSNES or GAMBATTE)")
54 HOSTCCFLAGS
= -std
=gnu
++0x
55 CFLAGS
+= -I
$(CORE_PATH
) $(CORE_DEFINE
) -std
=gnu
++0x
$(USER_CFLAGS
)
62 LDFLAGS
= -lboost_iostreams
$(BOOST_LIB_POSTFIX
) -lboost_filesystem
$(BOOST_LIB_POSTFIX
) -lboost_system
$(BOOST_LIB_POSTFIX
) -lboost_regex
$(BOOST_LIB_POSTFIX
) -lz
$(USER_LDFLAGS
)
64 ifeq ($(THREADS
), NATIVE
)
65 CFLAGS
+= -DNATIVE_THREADS
67 ifeq ($(THREADS
), BOOST
)
68 CFLAGS
+= -DBOOST_THREADS
69 LDFLAGS
+= -lboost_thread
$(BOOST_LIB_POSTFIX
)
71 $(error
"Bad value for THREADS (expected NATIVE or BOOST)")
78 all: src
/__all_files__
80 CFLAGS
+= $(shell $(CROSS_PREFIX
)pkg-config
$(LUA
) --cflags)
81 LDFLAGS
+= $(shell $(CROSS_PREFIX
)pkg-config
$(LUA
) --libs
)
83 compiler
=$(subst ++,cc,$(REALCC
))
84 gambatte_compiler
=$(REALCC
)
86 $(CORE_OBJECT
): forcelook
87 $(MAKE
) -C
$(CORE_SUBDIR
) $(BSNES_PROFILE_STRING
) $(BSNES_TARGET_STRING
)
90 src
/__all_files__
: src
/core
/version.
cpp forcelook
$(CORE_OBJECT
)
91 $(MAKE
) -C src precheck
93 cp src
/lsnes
$(DOT_EXECUTABLE_SUFFIX
) .
95 buildaux
/version.exe
: buildaux
/version.
cpp VERSION
96 $(HOSTCC
) $(HOSTCCFLAGS
) -o
$@
$<
97 src
/core
/version.
cpp: buildaux
/version.exe forcelook
98 buildaux
/version.exe
>$@
102 -$(MAKE
) -C bsnes
clean
103 -$(MAKE
) -C gambatte
clean