9 REALCC
= $(CROSS_PREFIX
)$(CC
)
10 REALLD
= $(CROSS_PREFIX
)$(LD
)
11 REALRANLIB
= $(CROSS_PREFIX
)$(RANLIB
)
14 HOSTCCFLAGS
= -std
=gnu
++0x
15 CFLAGS
+= -std
=gnu
++0x
-pthread
$(USER_CFLAGS
)
19 ifdef HOST_BOOST_NEEDS_MT
20 HOST_BOOST_POSTFIX
=-mt
23 LDFLAGS
= -pthread
-lboost_iostreams
$(BOOST_LIB_POSTFIX
) -lboost_filesystem
$(BOOST_LIB_POSTFIX
) -lboost_system
$(BOOST_LIB_POSTFIX
) -lz
$(USER_LDFLAGS
)
26 ifeq ($(THREADS
), NATIVE
)
27 CFLAGS
+= -DNATIVE_THREADS
29 ifeq ($(THREADS
), BOOST
)
30 CFLAGS
+= -DBOOST_THREADS
31 LDFLAGS
+= -lboost_thread
$(BOOST_LIB_POSTFIX
)
33 $(error
"Bad value for THREADS (expected NATIVE or BOOST)")
37 ifeq ($(REGEX
), BOOST
)
38 CFLAGS
+= -DUSE_BOOST_REGEX
39 LDFLAGS
+= -lboost_regex
$(BOOST_LIB_POSTFIX
)
40 HOSTHELPER_LDFLAGS
+= -lboost_regex
$(HOST_BOOST_POSTFIX
)
42 HOSTHELPER_LDFLAGS
+= -lboost_system
$(HOST_BOOST_POSTFIX
)
50 CFLAGS
+= -DUSE_LIBGCRYPT_SHA256
51 LDFLAGS
+= -lgcrypt
-lgpg-error
55 CFLAGS
+= -DLIBLZMA_AVAILABLE
59 ifeq ($(ARCHITECTURE
), I386
)
60 CFLAGS
+= -DARCH_IS_I386
67 all: src
/__all_files__
69 CFLAGS
+= $(shell $(CROSS_PREFIX
)pkg-config
$(LUA
) --cflags)
70 LDFLAGS
+= $(shell $(CROSS_PREFIX
)pkg-config
$(LUA
) --libs
)
71 CFLAGS
+= $(shell $(CROSS_PREFIX
)curl-config
--cflags)
72 LDFLAGS
+= $(shell $(CROSS_PREFIX
)curl-config
--libs
)
74 compiler
=$(subst ++,cc,$(REALCC
))
75 gambatte_compiler
=$(REALCC
)
77 bsnes
/out
/libsnes.
$(ARCHIVE_SUFFIX
): forcelook
78 $(MAKE
) -C bsnes
$(BSNES_PROFILE_STRING
) $(BSNES_TARGET_STRING
)
79 $(REALRANLIB
) bsnes
/out
/libsnes.
$(ARCHIVE_SUFFIX
)
82 src
/__all_files__
: src
/core
/version.
cpp buildaux
/mkdeps
$(DOT_EXECUTABLE_SUFFIX
) buildaux
/txt2cstr
$(DOT_EXECUTABLE_SUFFIX
) forcelook
83 $(MAKE
) -C src precheck
85 cp src
/lsnes
$(DOT_EXECUTABLE_SUFFIX
) .
87 buildaux
/txt2cstr
$(DOT_EXECUTABLE_SUFFIX
): buildaux
/txt2cstr.
cpp
88 $(HOSTCC
) $(HOSTCCFLAGS
) -o
$@
$<
89 buildaux
/version
$(DOT_EXECUTABLE_SUFFIX
): buildaux
/version.
cpp VERSION
90 $(HOSTCC
) $(HOSTCCFLAGS
) -o
$@
$<
91 buildaux
/mkdeps
$(DOT_EXECUTABLE_SUFFIX
): buildaux
/mkdeps.
cpp VERSION
92 $(HOSTCC
) $(HOSTCCFLAGS
) -o
$@
$< -lboost_filesystem
$(HOST_BOOST_POSTFIX
) -lboost_system
$(HOST_BOOST_POSTFIX
)
93 src
/core
/version.
cpp: buildaux
/version
$(DOT_EXECUTABLE_SUFFIX
) forcelook
94 buildaux
/version
$(DOT_EXECUTABLE_SUFFIX
) >$@
97 $(MAKE
) -C src platclean
101 rm -f buildaux
/version
$(DOT_EXECUTABLE_SUFFIX
)
102 rm -f buildaux
/mkdeps
$(DOT_EXECUTABLE_SUFFIX
)
103 rm -f buildaux
/txt2cstr
$(DOT_EXECUTABLE_SUFFIX
)