Previous 199869 Revisions Next

r36866 Wednesday 1st April, 2015 at 05:12:03 UTC by Vasantha Crabb
Bring back NOASM
[/trunk]makefile
[scripts]genie.lua
[scripts/src/osd]sdl.lua windows.lua
[src/osd]eminline.h
[src/osd/sdl]sdlmain.c sdlprefix.h

trunk/makefile
r245377r245378
132132endif
133133
134134
135ifeq ($(findstring arm,$(UNAME)),arm)
136ifndef NOASM
137   NOASM := 1
138endif
139endif
140
141
135142PYTHON := $(SILENT)python
136143CC := $(SILENT)gcc
137144LD := $(SILENT)g++
r245377r245378
266273endif
267274
268275ifdef MAP
269PARAMS += --MAP=$(MAP)
276PARAMS += --MAP='$(MAP)'
270277endif
271278
272279ifdef USE_BGFX
273PARAMS += --USE_BGFX=$(USE_BGFX)
280PARAMS += --USE_BGFX='$(USE_BGFX)'
274281endif
275282
283ifdef NOASM
284PARAMS += --NOASM='$(NOASM)'
285endif
286
287ifdef FORCE_DRC_C_BACKEND
288PARAMS += --FORCE_DRC_C_BACKEND='$(FORCE_DRC_C_BACKEND)'
289endif
290
276291ifdef NOWERROR
277292PARAMS += --NOWERROR=$(NOWERROR)
278293endif
trunk/scripts/genie.lua
r245377r245378
164164}
165165
166166newoption {
167   trigger = "NOASM",
168   description = "Disable implementations based on assembler code",
169   allowed = {
170      { "0",  "Enable assembler code"   },
171      { "1",  "Disable assembler code"  },
172   },
173}
174
175newoption {
167176   trigger = "FORCE_DRC_C_BACKEND",
168177   description = "Force DRC C backend.",
169178}
r245377r245378
180189      { "0",   "Disabled"    },
181190      { "1",   "Enabled"      },
182191   }
183}
192}
184193
185194local os_version = str_to_version(_OPTIONS["os_version"])
186195
196if not _OPTIONS["NOASM"] then
197   if _OPTIONS["targetos"]=="emscripten" then
198      _OPTIONS["NOASM"] = "1"
199   else
200      _OPTIONS["NOASM"] = "0"
201   end
202end
203
204if _OPTIONS["NOASM"]=="1" and not _OPTIONS["FORCE_DRC_C_BACKEND"] then
205   _OPTIONS["FORCE_DRC_C_BACKEND"] = "1"
206end
207
187208USE_BGFX = 1
188209if (_OPTIONS["targetos"]=="macosx" and  os_version < 100700) then
189210   USE_BGFX = 0
r245377r245378
201222   solution (_OPTIONS["target"])
202223else
203224   solution (_OPTIONS["target"] .. _OPTIONS["subtarget"])
204end   
205   configurations {
206      "Debug",
207      "Release",
208   }
225end
209226
210   platforms {
211      "x32",
212      "x64",
213      "Native", -- for targets where bitness is not specified
214   }
227configurations {
228   "Debug",
229   "Release",
230}
215231
216   language "C++"
232platforms {
233   "x32",
234   "x64",
235   "Native", -- for targets where bitness is not specified
236}
217237
238language "C++"
239
240flags {
241   "StaticRuntime",
242   "Unicode",
243   "NoPCH",
244}
245
246configuration { "vs*" }
218247   flags {
219      "StaticRuntime",
220      "Unicode",
221      "NoPCH",
222   }
223   
224   configuration { "vs*" }
225   flags {
226248      "ExtraWarnings",
227249   }
228   if _OPTIONS["NOWERROR"]==nil then
229   flags{
230      "FatalWarnings",
231   }
250   if not _OPTIONS["NOWERROR"] then
251      flags{
252         "FatalWarnings",
253      }
232254   end
233255   
234256   
235   configuration { "Debug", "vs*" }
236      flags {
237         "Symbols",
238      }   
239   configuration {}
257configuration { "Debug", "vs*" }
258   flags {
259      "Symbols",
260   }
261
262configuration {}
240263   
241264--aftercompilefile ("\t$(SILENT) gawk -f ../../../../../scripts/depfilter.awk $(@:%.o=%.d) > $(@:%.o=%.dep)\n\t$(SILENT) mv $(@:%.o=%.dep) $(@:%.o=%.d)")
242265   
r245377r245378
305328
306329
307330if _OPTIONS["targetos"]=="windows" then
308configuration { "x64" }
309   defines {
310      "X64_WINDOWS_ABI",
311   }
312configuration { }
331   configuration { "x64" }
332      defines {
333         "X64_WINDOWS_ABI",
334      }
335   configuration { }
313336end
314337
315338-- Avoid error when invoking genie --help.
r245377r245378
349372   }
350373
351374configuration { }
352   -- CR/LF setup: use both on win32/os2, CR only on everything else
353   if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="os2" then
354      defines {
355         "CRLF=3",
356      }
357   else
358      defines {
359         "CRLF=2",
360      }
361   end
362375
376-- CR/LF setup: use both on win32/os2, CR only on everything else
377if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="os2" then
378   defines {
379      "CRLF=3",
380   }
381else
382   defines {
383      "CRLF=2",
384   }
385end
363386
364   -- define LSB_FIRST if we are a little-endian target
387
388-- define LSB_FIRST if we are a little-endian target
389defines {
390   "LSB_FIRST",
391}
392
393-- define USE_NETWORK if networking is enabled (not OS/2 and hasn't been disabled)
394if not _OPTIONS["targetos"]=="os2" then
365395   defines {
366      "LSB_FIRST",
396      "USE_NETWORK",
367397   }
398end
399-- need to ensure FLAC functions are statically linked
400defines {
401   "FLAC__NO_DLL",
402}
368403
369   -- define USE_NETWORK if networking is enabled (not OS/2 and hasn't been disabled)
370   if not _OPTIONS["targetos"]=="os2" then
371      defines {
372         "USE_NETWORK",
373      }
374   end
375   -- need to ensure FLAC functions are statically linked
404if _OPTIONS["NOASM"]=="1" then
376405   defines {
377      "FLAC__NO_DLL",
406      "MAME_NOASM"
378407   }
408end
379409
380   -- fixme -- need to make this work for other target architectures (PPC)
381   if _OPTIONS["FORCE_DRC_C_BACKEND"]==nil then
382      configuration { "x64" }
383         defines {
384            "NATIVE_DRC=drcbe_x64",
385         }
386      configuration { "x32" }
387         defines {
388            "NATIVE_DRC=drcbe_x86",
389         }
390      configuration {  }
391   end
410-- fixme -- need to make this work for other target architectures (PPC)
411if not _OPTIONS["FORCE_DRC_C_BACKEND"] then
412   configuration { "x64" }
413      defines {
414         "NATIVE_DRC=drcbe_x64",
415      }
416   configuration { "x32" }
417      defines {
418         "NATIVE_DRC=drcbe_x86",
419      }
420   configuration {  }
421end
392422   
393423-- define USE_SYSTEM_JPEGLIB if library shipped with MAME is not used
394424--ifneq ($(BUILD_JPEGLIB),1)
trunk/scripts/src/osd/sdl.lua
r245377r245378
382382      MAME_DIR .. "src/osd/modules/osdmodule.c",
383383      MAME_DIR .. "src/osd/modules/lib/osdlib_" .. SDLOS_TARGETOS .. ".c",
384384      MAME_DIR .. "src/osd/modules/sync/sync_" .. SYNC_IMPLEMENTATION .. ".c",
385      --ifdef NOASM
386      --MAME_DIR .. "src/osd/modules/sync/work_mini.c",
387      --else
388      MAME_DIR .. "src/osd/modules/sync/work_osd.c",
389385   }
390386
387   if _OPTIONS["NOASM"]=="1" then
388      files {
389         MAME_DIR .. "src/osd/modules/sync/work_mini.c",
390      }
391   else
392      files {
393         MAME_DIR .. "src/osd/modules/sync/work_osd.c",
394      }
395   end
396
391397   if _OPTIONS["targetos"]=="macosx" then
392398      files {
393399         MAME_DIR .. "src/osd/sdl/osxutils.m",
trunk/scripts/src/osd/windows.lua
r245377r245378
150150      MAME_DIR .. "src/osd/windows/winsocket.c",
151151      MAME_DIR .. "src/osd/windows/winptty.c",
152152      MAME_DIR .. "src/osd/modules/osdmodule.c",
153      MAME_DIR .. "src/osd/modules/sync/work_osd.c",
154153      MAME_DIR .. "src/osd/modules/lib/osdlib_win32.c",
155154   }
156155
156   if _OPTIONS["NOASM"]=="1" then
157      files {
158         MAME_DIR .. "src/osd/modules/sync/work_mini.c",
159      }
160   else
161      files {
162         MAME_DIR .. "src/osd/modules/sync/work_osd.c",
163      }
164   end
157165
166
158167--------------------------------------------------
159168-- ledutil
160169--------------------------------------------------
trunk/src/osd/eminline.h
r245377r245378
1313#ifndef __EMINLINE__
1414#define __EMINLINE__
1515
16#if !defined(SDLMAME_NOASM)
16#if !defined(MAME_NOASM)
1717/* we come with implementations for GCC x86 and PPC */
1818#if defined(__GNUC__)
1919
trunk/src/osd/sdl/sdlmain.c
r245377r245378
389389   MACRO_VERBOSE(SDLMAME_DARWIN);
390390   MACRO_VERBOSE(SDLMAME_LINUX);
391391   MACRO_VERBOSE(SDLMAME_SOLARIS);
392   MACRO_VERBOSE(SDLMAME_NOASM);
393392   MACRO_VERBOSE(SDLMAME_IRIX);
394393   MACRO_VERBOSE(SDLMAME_BSD);
395394   osd_printf_verbose("\n");
396395   osd_printf_verbose("Build defines 1:    ");
397396   MACRO_VERBOSE(LSB_FIRST);
398397   MACRO_VERBOSE(PTR64);
398   MACRO_VERBOSE(MAME_NOASM);
399399   MACRO_VERBOSE(MAME_DEBUG);
400400   MACRO_VERBOSE(BIGENDIAN);
401401   MACRO_VERBOSE(CPP_COMPILE);
trunk/src/osd/sdl/sdlprefix.h
r245377r245378
7272#if defined(EMSCRIPTEN)
7373#define SDLMAME_EMSCRIPTEN 1
7474#define SDLMAME_NO64BITIO 1
75#define NOASM 1
76#define SDLMAME_NOASM 1
7775struct _IO_FILE {};  //_IO_FILE is an opaque type in the emscripten libc which makes clang cranky
7876#endif
7977


Previous 199869 Revisions Next


© 1997-2024 The MAME Team