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
$(USER_CFLAGS
)
21 ifdef HOST_BOOST_NEEDS_MT
22 HOST_BOOST_LIB_POSTFIX
=-mt
24 HOST_BOOST_LIB_POSTFIX
=
27 LDFLAGS
= -lboost_iostreams
$(BOOST_LIB_POSTFIX
) -lboost_filesystem
$(BOOST_LIB_POSTFIX
) -lboost_system
$(BOOST_LIB_POSTFIX
) -lboost_regex
$(BOOST_LIB_POSTFIX
) -lz
$(USER_LDFLAGS
)
29 ifeq ($(THREADS
), NATIVE
)
30 CFLAGS
+= -DNATIVE_THREADS
32 ifeq ($(THREADS
), BOOST
)
33 CFLAGS
+= -DBOOST_THREADS
34 LDFLAGS
+= -lboost_thread
$(BOOST_LIB_POSTFIX
)
36 $(error
"Bad value for THREADS (expected NATIVE or BOOST)")
45 CFLAGS
+= -DUSE_LIBGCRYPT_SHA256
46 LDFLAGS
+= -lgcrypt
-lgpg-error
50 CFLAGS
+= -DLIBLZMA_AVAILABLE
54 ifeq ($(ARCHITECTURE
), I386
)
55 CFLAGS
+= -DARCH_IS_I386
62 all: src
/__all_files__
64 CFLAGS
+= $(shell $(CROSS_PREFIX
)pkg-config
$(LUA
) --cflags)
65 LDFLAGS
+= $(shell $(CROSS_PREFIX
)pkg-config
$(LUA
) --libs
)
66 CFLAGS
+= $(shell $(CROSS_PREFIX
)curl-config
--cflags)
67 LDFLAGS
+= $(shell $(CROSS_PREFIX
)curl-config
--libs
)
69 compiler
=$(subst ++,cc,$(REALCC
))
70 gambatte_compiler
=$(REALCC
)
72 bsnes
/out
/libsnes.
$(ARCHIVE_SUFFIX
): forcelook
73 $(MAKE
) -C bsnes
$(BSNES_PROFILE_STRING
) $(BSNES_TARGET_STRING
)
74 $(REALRANLIB
) bsnes
/out
/libsnes.
$(ARCHIVE_SUFFIX
)
77 src
/__all_files__
: src
/core
/version.
cpp buildaux
/mkdeps.exe buildaux
/txt2cstr.exe forcelook
78 $(MAKE
) -C src precheck
80 cp src
/lsnes
$(DOT_EXECUTABLE_SUFFIX
) .
82 buildaux
/txt2cstr.exe
: buildaux
/txt2cstr.
cpp
83 $(HOSTCC
) $(HOSTCCFLAGS
) -o
$@
$<
84 buildaux
/version.exe
: buildaux
/version.
cpp VERSION
85 $(HOSTCC
) $(HOSTCCFLAGS
) -o
$@
$<
86 buildaux
/mkdeps.exe
: buildaux
/mkdeps.
cpp VERSION
87 $(HOSTCC
) $(HOSTCCFLAGS
) -o
$@
$< -lboost_filesystem
$(HOST_BOOST_LIB_POSTFIX
) -lboost_system
$(HOST_BOOST_LIB_POSTFIX
)
88 src
/core
/version.
cpp: buildaux
/version.exe forcelook
89 buildaux
/version.exe
>$@
92 $(MAKE
) -C src platclean
96 rm -f buildaux
/version.exe