Merge branch 'master' into 'master'

More build related cleanup

See merge request InfiniteNesLives/INL-retro-progdump!7
This commit is contained in:
Paul Molloy 2018-11-26 04:04:39 +00:00
commit 0e1f634e62
3 changed files with 6 additions and 13 deletions

1
.gitignore vendored
View File

@ -11,7 +11,6 @@
# ignore shared files that have been copied to host-firmware dirs # ignore shared files that have been copied to host-firmware dirs
firmware/source/shared_*.h firmware/source/shared_*.h
host/source/shared_*.h
# ignore trash/temp files stored in host/ignore # ignore trash/temp files stored in host/ignore
host/ignore host/ignore

View File

@ -1,6 +1,6 @@
#compiler flags: -Wall Warnings all, -g gdb debug markings, #compiler flags: -Wall Warnings all, -g gdb debug markings,
CFLAGS=-Wall -O CFLAGS=-Wall -O
INCLUDE= -I ./include INCLUDE= -I ./include -I ../shared
WINLIB= -L ./winlib WINLIB= -L ./winlib
LIBUSB= -lusb-1.0 LIBUSB= -lusb-1.0
CC= gcc CC= gcc
@ -13,12 +13,12 @@ LUAOBJ=$(wildcard source/lua/*.o)
TARGET=inlretro TARGET=inlretro
#default to windows build #default to windows build
all: shared all:
$(CC) $(INCLUDE) $(LUAOBJ) $(SOURCES) -o $(TARGET) $(WINLIB) $(CFLAGS) $(LIBUSB) $(CC) $(INCLUDE) $(LUAOBJ) $(SOURCES) -o $(TARGET) $(WINLIB) $(CFLAGS) $(LIBUSB)
#unix build doesn't need winlib directory as libusb should be installed on OS. #unix build doesn't need winlib directory as libusb should be installed on OS.
#sudo apt-get install libusb-1.0-0-dev #sudo apt-get install libusb-1.0-0-dev
unix: shared unix:
$(CC) $(INCLUDE) $(LUAOBJ) $(SOURCES) -o $(TARGET) $(CFLAGS) -lm $(LIBUSB) $(CC) $(INCLUDE) $(LUAOBJ) $(SOURCES) -o $(TARGET) $(CFLAGS) -lm $(LIBUSB)
# "make debug" will build program with debug print messages # "make debug" will build program with debug print messages
@ -32,12 +32,6 @@ unixdebug: CFLAGS += -DDEBUG -g
unixdebug: unix unixdebug: unix
#copy shared .h files which are used in host and firmware
shared:
cp -r ../shared/* source/
#clean on unix and windows(.exe) #clean on unix and windows(.exe)
clean: clean:
rm -f $(TARGET) $(TARGET).exe $(OBJECTS) $(LUAOBJ) rm -f $(TARGET) $(TARGET).exe $(OBJECTS) $(LUAOBJ)
rm -f source/shared_*

View File

@ -25,6 +25,8 @@ static libusb_device_handle *lua_usb_handle = NULL;
libusb_device_handle *open_usb_device( libusb_context *context, int log_level ) libusb_device_handle *open_usb_device( libusb_context *context, int log_level )
{ {
int rv = 0; int rv = 0;
libusb_device_handle *handle = NULL;
libusb_device **device_list = NULL;
//context set to NULL since only acting as single user of libusb //context set to NULL since only acting as single user of libusb
//libusb_context *context = NULL; //libusb_context *context = NULL;
@ -60,7 +62,6 @@ libusb_device_handle *open_usb_device( libusb_context *context, int log_level )
libusb_set_debug(context, log_level); libusb_set_debug(context, log_level);
//discover all usb devices //discover all usb devices
libusb_device **device_list = NULL;
//ssize_t libusb_get_device_list (libusb_context *ctx, libusb_device ***list) //ssize_t libusb_get_device_list (libusb_context *ctx, libusb_device ***list)
// Returns a list of USB devices currently attached to the system. // Returns a list of USB devices currently attached to the system.
// return value is number of devices plus one as list is null terminated, or LIBUSB_ERROR if negative. // return value is number of devices plus one as list is null terminated, or LIBUSB_ERROR if negative.
@ -75,7 +76,6 @@ libusb_device_handle *open_usb_device( libusb_context *context, int log_level )
libusb_device *retroprog = NULL; libusb_device *retroprog = NULL;
libusb_device *device = NULL; libusb_device *device = NULL;
struct libusb_device_descriptor desc; struct libusb_device_descriptor desc;
libusb_device_handle *handle = NULL;
const char manf[256]; //used to hold manf/prod strings const char manf[256]; //used to hold manf/prod strings
const char prod[256]; //used to hold manf/prod strings const char prod[256]; //used to hold manf/prod strings
//Original kazzo //Original kazzo