mirror of
https://github.com/ksherlock/profuse.git
synced 2024-05-28 22:41:39 +00:00
conditional NUFX Support
git-svn-id: https://profuse.googlecode.com/svn/branches/v2@382 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
parent
32bb5d79b9
commit
f70b5897de
|
@ -19,7 +19,10 @@
|
||||||
#include <Device/DiskCopy42Image.h>
|
#include <Device/DiskCopy42Image.h>
|
||||||
#include <Device/DavexDiskImage.h>
|
#include <Device/DavexDiskImage.h>
|
||||||
#include <Device/RawDevice.h>
|
#include <Device/RawDevice.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_NUFX
|
||||||
#include <Device/SDKImage.h>
|
#include <Device/SDKImage.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace Device;
|
using namespace Device;
|
||||||
|
|
||||||
|
@ -39,8 +42,10 @@ unsigned BlockDevice::ImageType(MappedFile *f, unsigned defv)
|
||||||
if (DiskCopy42Image::Validate(f, std::nothrow))
|
if (DiskCopy42Image::Validate(f, std::nothrow))
|
||||||
return 'DC42';
|
return 'DC42';
|
||||||
|
|
||||||
|
#ifdef HAVE_NUFX
|
||||||
if (SDKImage::Validate(f, std::nothrow))
|
if (SDKImage::Validate(f, std::nothrow))
|
||||||
return 'SDK_';
|
return 'SDK_';
|
||||||
|
#endif
|
||||||
|
|
||||||
if (ProDOSOrderDiskImage::Validate(f, std::nothrow))
|
if (ProDOSOrderDiskImage::Validate(f, std::nothrow))
|
||||||
return 'PO__';
|
return 'PO__';
|
||||||
|
@ -98,11 +103,12 @@ unsigned BlockDevice::ImageType(const char *type, unsigned defv)
|
||||||
return 'DVX_';
|
return 'DVX_';
|
||||||
|
|
||||||
|
|
||||||
// not supported yet.
|
#ifdef HAVE_NUFX
|
||||||
if (::strcasecmp(type, "sdk") == 0)
|
if (::strcasecmp(type, "sdk") == 0)
|
||||||
return 'SDK_';
|
return 'SDK_';
|
||||||
if (::strcasecmp(type, "shk") == 0)
|
if (::strcasecmp(type, "shk") == 0)
|
||||||
return 'SDK_';
|
return 'SDK_';
|
||||||
|
#endif
|
||||||
|
|
||||||
return defv;
|
return defv;
|
||||||
}
|
}
|
||||||
|
@ -151,8 +157,10 @@ BlockDevicePointer BlockDevice::Open(const char *name, File::FileFlags flags, un
|
||||||
case 'DVX_':
|
case 'DVX_':
|
||||||
return DavexDiskImage::Open(&file);
|
return DavexDiskImage::Open(&file);
|
||||||
|
|
||||||
|
#if HAVE_NUFX
|
||||||
case 'SDK_':
|
case 'SDK_':
|
||||||
return SDKImage::Open(name);
|
return SDKImage::Open(name);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include <NufxLib.h>
|
#include <NufxLib.h>
|
||||||
|
|
||||||
|
|
23
Makefile
23
Makefile
|
@ -1,16 +1,20 @@
|
||||||
CC = g++
|
CC = g++
|
||||||
CPPFLAGS += -Wall -W -Wno-multichar -I. -O2 -g
|
CPPFLAGS += -Wall -W -Wno-multichar -I. -O2 -g
|
||||||
LDFLAGS += -lpthread
|
LIBS += -lpthread
|
||||||
UNAME = $(shell uname -s)
|
UNAME = $(shell uname -s)
|
||||||
|
|
||||||
ifeq ($(UNAME),Darwin)
|
ifeq ($(UNAME),Darwin)
|
||||||
fuse_pascal_LDFLAGS += -lfuse_ino64
|
fuse_pascal_LIBS += -lfuse_ino64
|
||||||
else
|
else
|
||||||
fuse_pascal_LDFLAGS += -lfuse
|
fuse_pascal_LIBS += -lfuse
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef HAVE_NUFX
|
||||||
|
DEVICE_OBJECTS += Device/SDKImage.o
|
||||||
|
LDFLAGS += -L/usr/local/lib/
|
||||||
|
LIBS += -lnufx -lz
|
||||||
|
CPPFLAGS += -DHAVE_NUFX=1
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
OBJECTS += ${wildcard *.o}
|
OBJECTS += ${wildcard *.o}
|
||||||
|
@ -43,6 +47,7 @@ DEVICE_OBJECTS += Device/DiskImage.o
|
||||||
DEVICE_OBJECTS += Device/RawDevice.o
|
DEVICE_OBJECTS += Device/RawDevice.o
|
||||||
DEVICE_OBJECTS += Device/UniversalDiskImage.o
|
DEVICE_OBJECTS += Device/UniversalDiskImage.o
|
||||||
|
|
||||||
|
|
||||||
ENDIAN_OBJECTS += Endian/Endian.o
|
ENDIAN_OBJECTS += Endian/Endian.o
|
||||||
|
|
||||||
FILE_OBJECTS += File/File.o
|
FILE_OBJECTS += File/File.o
|
||||||
|
@ -60,7 +65,7 @@ PROFUSE_OBJECTS += ProFUSE/Lock.o
|
||||||
|
|
||||||
|
|
||||||
xattr: bin/xattr.o
|
xattr: bin/xattr.o
|
||||||
$(CC) $(LDFLAGS) $^ -o $@
|
$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
|
||||||
|
|
||||||
newfs_pascal: bin/newfs_pascal.o \
|
newfs_pascal: bin/newfs_pascal.o \
|
||||||
${CACHE_OBJECTS} \
|
${CACHE_OBJECTS} \
|
||||||
|
@ -69,7 +74,7 @@ newfs_pascal: bin/newfs_pascal.o \
|
||||||
${FILE_OBJECTS} \
|
${FILE_OBJECTS} \
|
||||||
${PROFUSE_OBJECTS} \
|
${PROFUSE_OBJECTS} \
|
||||||
${PASCAL_OBJECTS}
|
${PASCAL_OBJECTS}
|
||||||
$(CC) $(LDFLAGS) $^ -o $@
|
$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
|
||||||
|
|
||||||
apfm: bin/apfm.o \
|
apfm: bin/apfm.o \
|
||||||
${CACHE_OBJECTS} \
|
${CACHE_OBJECTS} \
|
||||||
|
@ -78,7 +83,7 @@ apfm: bin/apfm.o \
|
||||||
${FILE_OBJECTS} \
|
${FILE_OBJECTS} \
|
||||||
${PROFUSE_OBJECTS} \
|
${PROFUSE_OBJECTS} \
|
||||||
${PASCAL_OBJECTS}
|
${PASCAL_OBJECTS}
|
||||||
$(CC) $(LDFLAGS) $^ -o $@
|
$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
|
||||||
|
|
||||||
|
|
||||||
fuse_pascal: bin/fuse_pascal.o bin/fuse_pascal_ops.o \
|
fuse_pascal: bin/fuse_pascal.o bin/fuse_pascal_ops.o \
|
||||||
|
@ -88,7 +93,7 @@ fuse_pascal: bin/fuse_pascal.o bin/fuse_pascal_ops.o \
|
||||||
${FILE_OBJECTS} \
|
${FILE_OBJECTS} \
|
||||||
${PROFUSE_OBJECTS} \
|
${PROFUSE_OBJECTS} \
|
||||||
${PASCAL_OBJECTS}
|
${PASCAL_OBJECTS}
|
||||||
$(CC) $(fuse_pascal_LDFLAGS) $(LDFLAGS) $^ -o $@
|
$(CC) $(LDFLAGS) $^ $(LIBS) $(fuse_pascal_LIBS) -o $@
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -44,6 +44,9 @@ void usage()
|
||||||
" dc42 DiskCopy 4.2 Image\n"
|
" dc42 DiskCopy 4.2 Image\n"
|
||||||
" davex Davex Disk Image\n"
|
" davex Davex Disk Image\n"
|
||||||
" 2img Universal Disk Image\n"
|
" 2img Universal Disk Image\n"
|
||||||
|
#ifdef HAVE_NUFX
|
||||||
|
" sdk ShrinkIt Disk Image\n"
|
||||||
|
#endif
|
||||||
" do DOS Order Disk Image\n"
|
" do DOS Order Disk Image\n"
|
||||||
" po ProDOS Order Disk Image (default)\n"
|
" po ProDOS Order Disk Image (default)\n"
|
||||||
" -o opt1,opt2... other mount parameters.\n"
|
" -o opt1,opt2... other mount parameters.\n"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user