Reject Oggopus files that don't have complete pregap
[lsnes.git] / Makefile
blob6764dc524b35a6562457069d2af735463acdb675
1 OPTIONS=options.build
2 include $(OPTIONS)
4 ifndef LUA
5 LUA=lua
6 endif
8 #Compilers.
9 REALCC = $(CROSS_PREFIX)$(CC)
10 REALLD = $(CROSS_PREFIX)$(LD)
11 REALRANLIB = $(CROSS_PREFIX)$(RANLIB)
13 #Flags.
14 HOSTCCFLAGS = -std=gnu++0x
15 CFLAGS += -std=gnu++0x $(USER_CFLAGS)
16 ifdef BOOST_NEEDS_MT
17 BOOST_LIB_POSTFIX=-mt
18 else
19 BOOST_LIB_POSTFIX=
20 endif
22 LDFLAGS = -lboost_iostreams$(BOOST_LIB_POSTFIX) -lboost_filesystem$(BOOST_LIB_POSTFIX) -lboost_system$(BOOST_LIB_POSTFIX) -lboost_regex$(BOOST_LIB_POSTFIX) -lz $(USER_LDFLAGS)
24 ifeq ($(THREADS), NATIVE)
25 CFLAGS += -DNATIVE_THREADS
26 else
27 ifeq ($(THREADS), BOOST)
28 CFLAGS += -DBOOST_THREADS
29 LDFLAGS += -lboost_thread$(BOOST_LIB_POSTFIX)
30 else
31 $(error "Bad value for THREADS (expected NATIVE or BOOST)")
32 endif
33 endif
36 export
38 all: src/__all_files__
40 CFLAGS += $(shell $(CROSS_PREFIX)pkg-config $(LUA) --cflags)
41 LDFLAGS += $(shell $(CROSS_PREFIX)pkg-config $(LUA) --libs)
43 compiler=$(subst ++,cc,$(REALCC))
44 gambatte_compiler=$(REALCC)
46 bsnes/out/libsnes.$(ARCHIVE_SUFFIX): forcelook
47 $(MAKE) -C bsnes $(BSNES_PROFILE_STRING) $(BSNES_TARGET_STRING)
48 $(REALRANLIB) bsnes/out/libsnes.$(ARCHIVE_SUFFIX)
51 src/__all_files__: src/core/version.cpp forcelook
52 $(MAKE) -C src precheck
53 $(MAKE) -C src
54 cp src/lsnes$(DOT_EXECUTABLE_SUFFIX) .
56 buildaux/version.exe: buildaux/version.cpp VERSION
57 $(HOSTCC) $(HOSTCCFLAGS) -o $@ $<
58 src/core/version.cpp: buildaux/version.exe forcelook
59 buildaux/version.exe >$@
62 clean:
63 $(MAKE) -C src clean
65 forcelook:
66 @true