* \author Bernardo Innocenti <bernie@develer.com>
*/
+
+
+#ifdef __APPLE__
+ //This workaround is necessary to compile under OS X assembler.
+ #define SWITCH_CONTEXT _asm_switch_context
+ #define SWITCH_VERSION _asm_switch_version
+#else
+ #define SWITCH_CONTEXT asm_switch_context
+ #define SWITCH_VERSION asm_switch_version
+#endif
+
/* void asm_switch_context(void ** new_sp, void ** save_sp) */
-.globl asm_switch_context
-asm_switch_context:
+.globl SWITCH_CONTEXT
+SWITCH_CONTEXT:
pushl %eax
pushl %ebx
pushl %ecx
ret
/* int asm_switch_version(void) */
-.globl asm_switch_version
-asm_switch_version:
+.globl SWITCH_VERSION
+SWITCH_VERSION:
mov $1,%eax
ret
#In embedded we need s19, hex and bin
$$(OUTDIR)/$(1).tgt : $$(OUTDIR)/$(1).s19 $$(OUTDIR)/$(1).hex $$(OUTDIR)/$(1).bin
else
+#On Darwin architecture the assembly doesn't link correctly if this flag is setted.
+ifeq ($(shell uname | grep -c "Darwin"),1)
+LIST_FLAGS = ""
+MAP_FLAGS = ""
+LDFLAGS = ""
+endif
#use hosted specific map flags
$(1)_MAP_FLAGS = $$(MAP_FLAGS_HOST)
#in hosted application we need only executable file.