Merge pull request #13 from raimue/simulat0r-macosx
Fix building simulat0r on Mac OS X #2
This commit is contained in:
commit
9cafb1670a
|
@ -77,7 +77,12 @@ sub wanted {
|
||||||
File::Find::find({wanted => \&wanted}, '.');
|
File::Find::find({wanted => \&wanted}, '.');
|
||||||
|
|
||||||
print C "";
|
print C "";
|
||||||
print C qq!__attribute__ ((used, section("table"))) const void * TheTable[]={!;
|
print C <<EOF;
|
||||||
|
#ifndef __APPLE__
|
||||||
|
__attribute__ ((used, section("table")))
|
||||||
|
#endif /* __APPLE__ */
|
||||||
|
const void * TheTable[]={
|
||||||
|
EOF
|
||||||
|
|
||||||
my %defs;
|
my %defs;
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,9 @@
|
||||||
#include "usbconfig.h"
|
#include "usbconfig.h"
|
||||||
#include "usbhid.h"
|
#include "usbhid.h"
|
||||||
|
|
||||||
USB_DEV_INFO DeviceInfo;
|
static USB_DEV_INFO DeviceInfo;
|
||||||
HID_DEVICE_INFO HidDevInfo;
|
static HID_DEVICE_INFO HidDevInfo;
|
||||||
ROM ** rom = (ROM **)0x1fff1ff8;
|
static ROM ** rom = (ROM **)0x1fff1ff8;
|
||||||
|
|
||||||
typedef struct usbhid_out_s
|
typedef struct usbhid_out_s
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,7 @@ exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Updating directories"
|
echo "Updating directories"
|
||||||
for i in `find firmware/ -type d `
|
for i in `find firmware -type d `
|
||||||
do
|
do
|
||||||
if test -d simulat0r/$i
|
if test -d simulat0r/$i
|
||||||
then verbmsg "OK Directory already exists: $i"
|
then verbmsg "OK Directory already exists: $i"
|
||||||
|
@ -22,7 +22,7 @@ fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Updating bridge files for C source"
|
echo "Updating bridge files for C source"
|
||||||
for i in `find firmware/ \! -path firmware/lcd/allfonts.h \! -path firmware/l0dable/usetable.h -type f -iname \*.[ch]`
|
for i in `find firmware \! -path firmware/lcd/allfonts.h \! -path firmware/l0dable/usetable.h -type f -iname \*.[ch]`
|
||||||
do
|
do
|
||||||
if test -f simulat0r/$i;
|
if test -f simulat0r/$i;
|
||||||
then
|
then
|
||||||
|
@ -34,7 +34,7 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Updating bridge files for Makefiles"
|
echo "Updating bridge files for Makefiles"
|
||||||
for i in `find firmware/ -type f -iname Makefile`
|
for i in `find firmware -type f -iname Makefile`
|
||||||
do
|
do
|
||||||
if test -f simulat0r/$i;
|
if test -f simulat0r/$i;
|
||||||
then
|
then
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#define lcdRefresh _hideaway_lcdRefresh
|
||||||
|
#endif
|
||||||
#define lcdDisplay _hideaway_lcdDisplay
|
#define lcdDisplay _hideaway_lcdDisplay
|
||||||
#define lcdInit _hideaway_lcdInit
|
#define lcdInit _hideaway_lcdInit
|
||||||
#include "../../../firmware/lcd/display.c"
|
#include "../../../firmware/lcd/display.c"
|
||||||
#undef lcdDisplay
|
#undef lcdDisplay
|
||||||
#undef lcdInit
|
#undef lcdInit
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#undef lcdRefresh
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "simulator.h"
|
#include "simulator.h"
|
||||||
|
|
||||||
|
@ -10,5 +16,11 @@ void lcdDisplay() {
|
||||||
simlcdDisplayUpdate();
|
simlcdDisplayUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
void lcdRefresh() {
|
||||||
|
lcdDisplay();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void lcdInit() {
|
void lcdInit() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@ CFLAGS += -I../firmware
|
||||||
CFLAGS += -I../firmware/core # for gpio.h including projectconfig.h without path
|
CFLAGS += -I../firmware/core # for gpio.h including projectconfig.h without path
|
||||||
CFLAGS += -I../simcore
|
CFLAGS += -I../simcore
|
||||||
|
|
||||||
OBJS+= ../firmware/basic/*.o
|
|
||||||
OBJS+= ../firmware/core/*.o
|
OBJS+= ../firmware/core/*.o
|
||||||
OBJS+= ../firmware/core/*/*.o
|
OBJS+= ../firmware/core/*/*.o
|
||||||
LIBS+= ../firmware/applications/libapp.a
|
LIBS+= ../firmware/applications/libapp.a
|
||||||
|
@ -32,7 +31,6 @@ OBJS += simulat0r.o
|
||||||
all : simulat0r
|
all : simulat0r
|
||||||
|
|
||||||
simulat0r : $(OBJS) $(LIBS)
|
simulat0r : $(OBJS) $(LIBS)
|
||||||
$(LD) $(OBJS) $(LIBS) -lc -o $@
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) simulat0r.o
|
$(RM) simulat0r.o
|
||||||
|
|
Loading…
Reference in New Issue