Previous 199869 Revisions Next

r35281 Thursday 26th February, 2015 at 15:11:28 UTC by Olivier Galibert
Local config
[/trunk]makefile
[src/emu]emucore.h
[src/emu/cpu]cpu.mak
[src/emu/ui]ui.c
[src/osd/modules/netdev]taptun.c

trunk/makefile
r243792r243793
2424#-------------------------------------------------
2525
2626ifndef TARGET
27TARGET = mame
27TARGET = ume
2828endif
2929
3030ifndef SUBTARGET
r243792r243793
182182#   ARCHOPTS = -mcpu=G4           # optimize for G4
183183# note that we leave this commented by default so that you can
184184# configure this in your environment and never have to think about it
185# ARCHOPTS =
185ARCHOPTS = -march=native
186186
187NOWERROR=1
187188
188189
189190#-------------------------------------------------
r243792r243793
221222#-------------------------------------------------
222223
223224# uncomment next line if you are building for a 64-bit target
224# PTR64 = 1
225PTR64 = 1
225226
226227# uncomment next line if you are building for a big-endian target
227228# BIGENDIAN = 1
r243792r243793
286287
287288# specify optimization level or leave commented to use the default
288289# (default is OPTIMIZE = 3 normally, or OPTIMIZE = 0 with symbols)
289# OPTIMIZE = 3
290OPTIMIZE = 3
290291
292USE_NETWORK = 1
291293
292294###########################################################################
293295##################   END USER-CONFIGURABLE OPTIONS   ######################
r243792r243793
363365
364366# compiler, linker and utilities
365367ifneq ($(TARGETOS),emscripten)
366AR = @ar
367CC = @gcc
368LD = @g++
368AR = ar
369CC = gcc
370LD = g++
369371endif
370MD = -mkdir$(BUILD_EXE)
371RM = @rm -f
372OBJDUMP = @objdump
373PYTHON = @python
372MD = mkdir$(EXE)
373RM = rm -f
374OBJDUMP = objdump
375PYTHON = python2
374376
375377#-------------------------------------------------
376378# form the name of the executable
r243792r243793
395397
396398# 64-bit builds get a '64' suffix
397399ifeq ($(PTR64),1)
398SUFFIX64 = 64
400SUFFIX64 =
399401endif
400402
401403# debug builds just get the 'd' suffix and nothing more
r243792r243793
475477ifdef DEBUG
476478DEFS += -DMAME_DEBUG
477479else
478DEFS += -DNDEBUG
480#DEFS += -DNDEBUG
479481endif
480482
481483# define MAME_PROFILER if we are a profiling build
r243792r243793
565567endif
566568
567569# add the optimization flag
568CCOMFLAGS += -O$(OPTIMIZE)
570OPT= -O$(OPTIMIZE)
571CCOMFLAGS += $(OPT)
572#CCOMFLAGS += -g$(SYMLEVEL) -fno-omit-frame-pointer
569573
570574# add the error warning flag
571575ifndef NOWERROR
r243792r243793
664668
665669# LDFLAGS are used generally; LDFLAGSEMULATOR are additional
666670# flags only used when linking the core emulator
667LDFLAGS =
671LDFLAGS = -g
668672ifneq ($(TARGETOS),macosx)
669673ifneq ($(TARGETOS),os2)
670674ifneq ($(TARGETOS),solaris)
r243792r243793
682686# strip symbols and other metadata in non-symbols and non profiling builds
683687ifndef SYMBOLS
684688ifneq ($(TARGETOS),macosx)
685LDFLAGS += -s
689LDFLAGS +=
686690endif
687691endif
688692
r243792r243793
887891maketree: $(sort $(OBJDIRS))
888892
889893clean: $(OSDCLEAN)
890   @echo Deleting object tree $(OBJ)...
891894   $(RM) -r $(OBJ)
892   @echo Deleting $(EMULATOR)...
893895   $(RM) $(EMULATOR)
894   @echo Deleting $(TOOLS)...
895896   $(RM) $(TOOLS)
896897   @echo Deleting dependencies...
897898   $(RM) depend_emu.mak
r243792r243793
899900   $(RM) depend_mess.mak
900901   $(RM) depend_ume.mak
901902ifdef MAP
902   @echo Deleting $(FULLNAME).map...
903903   $(RM) $(FULLNAME).map
904904endif
905905ifdef SYMBOLS
r243792r243793
972972#-------------------------------------------------
973973
974974$(OBJ)/%.o: $(SRC)/%.c | $(OSPREBUILD)
975   @echo Compiling $<...
976975   $(CC) $(CDEFS) $(CFLAGS) -c $< -o $@
977976ifdef CPPCHECK
978977   @$(CPPCHECK) $(CPPCHECKFLAGS) $<
r243792r243793
986985endif
987986
988987$(OBJ)/%.pp: $(SRC)/%.c | $(OSPREBUILD)
989   @echo Compiling $<...
990988   $(CC) $(CDEFS) $(CFLAGS) -E $< -o $@
991989ifdef CPPCHECK
992990   @$(CPPCHECK) $(CPPCHECKFLAGS) $<
993991endif
994992
995993$(OBJ)/%.s: $(SRC)/%.c | $(OSPREBUILD)
996   @echo Compiling $<...
997994   $(CC) $(CDEFS) $(CFLAGS) -S $< -o $@
998995ifdef CPPCHECK
999996   @$(CPPCHECK) $(CPPCHECKFLAGS) $<
r243792r243793
10291026   @cp $< $@
10301027else
10311028$(OBJ)/%.a:
1032   @echo Archiving $@...
10331029   $(RM) $@
10341030   $(AR) $(ARFLAGS) $@ $^
10351031endif
10361032
1033$(OBJ)/%.so:
1034   $(RM) $@
1035   $(AR) $(ARFLAGS) $@ $^
1036#   $(CC) -shared -o $@ $^
1037
10371038ifeq ($(TARGETOS),macosx)
10381039$(OBJ)/%.o: $(SRC)/%.m | $(OSPREBUILD)
10391040   @echo Objective-C compiling $<...
trunk/src/emu/cpu/cpu.mak
r243792r243793
16241624
16251625BUILD += $(M68KMAKE)
16261626
1627$(M68KMAKE): $(CPUOBJ)/m68000/m68kmake.o $(LIBOCORE)
1627$(M68KMAKE): $(CPUOBJ)/m68000/m68kmake.o
16281628   @echo Linking $@...
16291629   $(LD) $(LDFLAGS) $(OSDBGLDFLAGS) $^ $(BASELIBS) -o $@
16301630endif
trunk/src/emu/emucore.h
r243792r243793
218218#undef assert
219219#undef assert_always
220220
221#ifdef MAME_DEBUG
222221#define assert(x)               do { if (!(x)) throw emu_fatalerror("assert: %s:%d: %s", __FILE__, __LINE__, #x); } while (0)
223222#define assert_always(x, msg)   do { if (!(x)) throw emu_fatalerror("Fatal error: %s\nCaused by assert: %s:%d: %s", msg, __FILE__, __LINE__, #x); } while (0)
224#else
225#define assert(x)               do { } while (0)
226#define assert_always(x, msg)   do { if (!(x)) throw emu_fatalerror("Fatal error: %s (%s:%d)", msg, __FILE__, __LINE__); } while (0)
227#endif
228223
229224
230225// macros to convert radians to degrees and degrees to radians
r243792r243793
316311template<class _Dest, class _Source>
317312inline _Dest downcast(_Source *src)
318313{
319#if defined(MAME_DEBUG) && !defined(MAME_DEBUG_FAST)
320314   try {
321315      if (dynamic_cast<_Dest>(src) != src)
322316      {
r243792r243793
330324   {
331325      report_bad_cast(typeid(src), typeid(_Dest));
332326   }
333#endif
334327   return static_cast<_Dest>(src);
335328}
336329
337330template<class _Dest, class _Source>
338331inline _Dest downcast(_Source &src)
339332{
340#if defined(MAME_DEBUG) && !defined(MAME_DEBUG_FAST)
341333   try {
342334      if (&dynamic_cast<_Dest>(src) != &src)
343335      {
r243792r243793
351343   {
352344      report_bad_cast(typeid(src), typeid(_Dest));
353345   }
354#endif
355346   return static_cast<_Dest>(src);
356347}
357348
trunk/src/emu/ui/ui.c
r243792r243793
316316
317317   // disable everything if we are using -str for 300 or fewer seconds, or if we're the empty driver,
318318   // or if we are debugging
319   if (!first_time || (str > 0 && str < 60*5) || &machine().system() == &GAME_NAME(___empty) || (machine().debug_flags & DEBUG_FLAG_ENABLED) != 0)
319   if (1 || !first_time || (str > 0 && str < 60*5) || &machine().system() == &GAME_NAME(___empty) || (machine().debug_flags & DEBUG_FLAG_ENABLED) != 0)
320320      show_gameinfo = show_warnings = show_disclaimer = show_mandatory_fileman = FALSE;
321321
322322   #ifdef SDLMAME_EMSCRIPTEN
trunk/src/osd/modules/netdev/taptun.c
r243792r243793
5757{
5858#ifdef __linux__
5959   struct ifreq ifr;
60
6160   m_fd = -1;
6261   if((m_fd = open("/dev/net/tun", O_RDWR)) == -1) {
6362      osd_printf_verbose("tap: open failed %d\n", errno);
r243792r243793
6665
6766   memset(&ifr, 0, sizeof(ifr));
6867   ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
69   sprintf(ifr.ifr_name, "tap-mess-%d-0", getuid());
68   sprintf(ifr.ifr_name, "mess0");
7069   if(ioctl(m_fd, TUNSETIFF, (void *)&ifr) == -1) {
7170      osd_printf_verbose("tap: ioctl failed %d\n", errno);
7271      close(m_fd);


Previous 199869 Revisions Next


© 1997-2024 The MAME Team