Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

I forgot to add common.mak. Whoops!

  • Loading branch information...
commit cfce7aad913b85016c8feb147307c980d4ea1a46 1 parent efc070c
@jvilk jvilk authored
View
59 make/common.mak
@@ -0,0 +1,59 @@
+################################################################################
+#
+# common.mak
+#
+# This is where we hide all of our dirty Makefile secrets. Namely, all of the
+# gross details like 64-bit checking.
+#
+################################################################################
+
+# Are we on a 64 bit platform? If so, mame will append '64' to the native_obj
+# directory.
+# Logic copied from MESS Makefile.
+UNAME := $(shell uname -a)
+ifeq ($(firstword $(filter x86_64,$(UNAME))),x86_64)
+IS_64_BIT := 1
+endif
+ifeq ($(firstword $(filter amd64,$(UNAME))),amd64)
+IS_64_BIT := 1
+endif
+ifeq ($(firstword $(filter ppc64,$(UNAME))),ppc64)
+IS_64_BIT := 1
+endif
+
+# Function that generates a command to run sed with inplace replacement.
+# Unfortunately, GNU and BSD sed are slightly different. BSD sed returns an
+# error code when you run --help, which we abuse in this statement.
+# Left command is GNU, right command is BSD.
+# As this is a function, do not use := for immediate resolution!
+SED_I = sed --help >/dev/null 2>&1 && sed -i $(1) || sed -i '' $(1)
+
+
+
+EMSCRIPTEN_DIR := $(CURDIR)/third_party/emscripten
+EMMAKE := $(EMSCRIPTEN_DIR)/emmake
+EMCC := $(EMSCRIPTEN_DIR)/emcc
+
+# Used to build native tools. CC/CXX must be clang due to the additional flags
+# we supply to the compiler for warnings and such.
+NATIVE_CC := clang
+NATIVE_CXX := clang++
+NATIVE_LD := clang++
+NATIVE_AR := ar
+
+# Final directory for built files.
+OBJ_DIR := $(OBJ_DIR)/$(SYSTEM)
+# The HTML template we'll be using.
+TEMPLATE_DIR := $(CURDIR)/templates/default
+# All of the files in the template directory. Allows for 'smart' HTML rebuilding
+TEMPLATE_FILES := $(shell ls $(TEMPLATE_DIR))
+TEMPLATE_FILES := $(foreach TFILE,$(TEMPLATE_FILES),$(TEMPLATE_DIR)/$(TFILE))
+
+# The name of the bitcode executable produced by making mess.
+MESS_EXE := mess$(SYSTEM)
+
+ifeq ($(IS_64_BIT),1)
+NATIVE_OBJ := $(CURDIR)/mess/obj/sdl/nativemame64
+else
+NATIVE_OBJ := $(CURDIR)/mess/obj/sdl/nativemame
+endif
View
2  make/systems/c64.mak
@@ -6,7 +6,7 @@
BIOS := c64.zip
# SUBTARGET for the MESS makefile.
SUBTARGET := c64
-MESS_ARGS := ["c64n","-verbose","-rompath",".","-window","-resolution","418x235","-nokeepaspect"]
+MESS_ARGS := ["c64","-verbose","-rompath",".","-window","-resolution","418x235","-nokeepaspect"]
# System-specific flags that should be passed to MESS's makefile.
# MESS_FLAGS +=
View
12 templates/default/messloader.js
@@ -2,7 +2,13 @@ var gamename = 'GAME_FILE';
var game_file = null;
var bios_filenames = 'BIOS_FILES'.split(' ');
var bios_files = {};
-var file_countdown = bios_filenames.length + 1;
+var file_countdown = 0;
+if (bios_filenames.length !== 0 && bios_filenames[0] !== '') {
+ file_countdown += bios_filenames.length;
+}
+if (gamename !== '') {
+ file_countdown++;
+}
var newCanvas = document.createElement('canvas');
newCanvas.id = 'canvas';
@@ -67,4 +73,6 @@ for (var i=0; i < bios_filenames.length; i++) {
fetch_file(fname, function(data) { bios_files[fname] = data; update_countdown(); });
}
-fetch_file(gamename, function(data) { game_file = data; update_countdown(); });
+if (gamename !== "") {
+ fetch_file(gamename, function(data) { game_file = data; update_countdown(); });
+}
Please sign in to comment.
Something went wrong with that request. Please try again.