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}, '.');
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -44,9 +44,9 @@
|
|||
#include "usbconfig.h"
|
||||
#include "usbhid.h"
|
||||
|
||||
USB_DEV_INFO DeviceInfo;
|
||||
HID_DEVICE_INFO HidDevInfo;
|
||||
ROM ** rom = (ROM **)0x1fff1ff8;
|
||||
static USB_DEV_INFO DeviceInfo;
|
||||
static HID_DEVICE_INFO HidDevInfo;
|
||||
static ROM ** rom = (ROM **)0x1fff1ff8;
|
||||
|
||||
typedef struct usbhid_out_s
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@ exit
|
|||
fi
|
||||
|
||||
echo "Updating directories"
|
||||
for i in `find firmware/ -type d `
|
||||
for i in `find firmware -type d `
|
||||
do
|
||||
if test -d simulat0r/$i
|
||||
then verbmsg "OK Directory already exists: $i"
|
||||
|
@ -22,7 +22,7 @@ fi
|
|||
done
|
||||
|
||||
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
|
||||
if test -f simulat0r/$i;
|
||||
then
|
||||
|
@ -34,7 +34,7 @@ do
|
|||
done
|
||||
|
||||
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
|
||||
if test -f simulat0r/$i;
|
||||
then
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
#ifdef __APPLE__
|
||||
#define lcdRefresh _hideaway_lcdRefresh
|
||||
#endif
|
||||
#define lcdDisplay _hideaway_lcdDisplay
|
||||
#define lcdInit _hideaway_lcdInit
|
||||
#include "../../../firmware/lcd/display.c"
|
||||
#undef lcdDisplay
|
||||
#undef lcdInit
|
||||
#ifdef __APPLE__
|
||||
#undef lcdRefresh
|
||||
#endif
|
||||
|
||||
#include "simulator.h"
|
||||
|
||||
|
@ -10,5 +16,11 @@ void lcdDisplay() {
|
|||
simlcdDisplayUpdate();
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
void lcdRefresh() {
|
||||
lcdDisplay();
|
||||
}
|
||||
#endif
|
||||
|
||||
void lcdInit() {
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ CFLAGS += -I../firmware
|
|||
CFLAGS += -I../firmware/core # for gpio.h including projectconfig.h without path
|
||||
CFLAGS += -I../simcore
|
||||
|
||||
OBJS+= ../firmware/basic/*.o
|
||||
OBJS+= ../firmware/core/*.o
|
||||
OBJS+= ../firmware/core/*/*.o
|
||||
LIBS+= ../firmware/applications/libapp.a
|
||||
|
@ -32,7 +31,6 @@ OBJS += simulat0r.o
|
|||
all : simulat0r
|
||||
|
||||
simulat0r : $(OBJS) $(LIBS)
|
||||
$(LD) $(OBJS) $(LIBS) -lc -o $@
|
||||
|
||||
clean:
|
||||
$(RM) simulat0r.o
|
||||
|
|
Loading…
Reference in New Issue