Files
amiga-smbfs/source_code/smakefile
T
obarthel e5f42326e5 Updated to version 2.3
Added the ADDVOLUME option, which defaults to "yes". If no volume name is
provided, smbfs will use the service name as the template, e.g. if you
connect to //server-name/pictures then the default volume name will
be "pictures". The idea is that if the file server allows this, you
should not need to start the smbfs program with any parameter other
than the service/share name and it should work out of the box.

Preparations for showing error messages when running as a Workbench
program would corrupt memory once the message was ready for display,
but this only happened in the AmigaOS4 build. As far as I can tell
this never worked correctly on AmigaOS4. Thanks go to Matthew Kille
who reported the problem!

Simplified the icon parameter processing used when running smbfs
as a Workbench program. The reworked code is now basically limited
to processing and setting up the same configuration data which the
shell command use employs. Both paths share the same configuration
data checking and handling.

Turns out that the ACTION_CURRENT_VOLUME function does need to return
the volume node, not the device node. Note to self: a 'struct DeviceList'
refers to a volume (DLT_VOLUME), whereas a 'struct DeviceNode' refers
to a device (DLT_DEVICE). See? This could have been easily been avoided :-/

Added more code documentation, especially for the various constants and
data structures defined and used in "main.c".

Reading from the file name translation file now performs better error
detection and reporting. If read errors should crop up, the error message
will now say so. If the file is shorter than required the error message
will reflect this.

Reworked the smb_proc_reconnect() function so that it does not end up
truncating the password before it is encrypted. This means that up to
63 characters of the password can be used to produce the encrypted
form, resolving problems with longer server passwords not quite
matching what you entered. However, since this long encrypted password
is still accompanied by the legacy encrypted form which truncates the
password to 14 characters (which are converted to all-upper-case
letters) there is no actual gain in terms of security...
2018-12-08 12:11:09 +01:00

137 lines
4.4 KiB
Plaintext

#
# :ts=4
#
# SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
#
# Copyright (C) 2000-2018 by Olaf `Olsen' Barthel <obarthel -at- gmx -dot- net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# NOTE: In order to build smbfs you will need to obtain the AmiTCP
# SDK, or the equivalent for Miami/Miami Deluxe or Roadshow.
# From that SDK, copy the "netinclude" directory to the same
# directory you find this "smakefile" in. Next, modify this
# "smakefile", removing the "@ctags >tagfiles/$* $<" and
# "@type tagfiles/\#? >t:tags", "@copy t:tags """ and
# "@delete >nil: t:tags" lines if you don't have the "ctags"
# command installed.
#
.c.o:
sc $(CFLAGS) $<
@ctags >tagfiles/$* $<
.asm.o:
asm $(ASMFLAGS) $<
###############################################################################
PROJECT = smbfs
###############################################################################
#############################################################################
#
# Program version
#
#############################################################################
VERSION = 2
###############################################################################
OPTIMIZE = optimize opttime optinline optinlocal
CPU = any
#CPU = 060 optschedule
DEBUG = line
#DEBUG = symbolflush noopt define=DEBUG define=DUMP_SMB
###############################################################################
CFLAGS = \
idlen=64 comnest streq strmerge nostkchk \
$(OPTIMIZE) cpu=$(CPU) debug=$(DEBUG) code=far data=faronly \
params=register idir=netinclude idir=include \
ignore=306 gst=system_headers.gst
LFLAGS = \
noicons batch
###############################################################################
OBJS = \
main.o proc.o smb_abstraction.o sock.o crypt.o quad_math.o dump_smb.o \
cp437.o cp850.o swap_stack_and_call.o
###############################################################################
LIBS = lib:scnb.lib lib:amiga.lib lib:debug.lib
###############################################################################
all: tagfiles system_headers.gst $(PROJECT)
tagfiles:
makedir $@
$(PROJECT): $(OBJS) system_headers.gst Assert.o
slink $(OBJS) to $@.debug lib $(LIBS) Assert.o $(LFLAGS) \
map $(PROJECT).map,fhx fwidth 32 pwidth 32 swidth 32
slink $@.debug to $@ noicons nodebug
@type tagfiles/\#? >t:tags
@copy t:tags ""
@delete >nil: t:tags
system_headers.gst: system_headers.h system_headers.c
gst unload $@
sc $(CFLAGS) nodebug noobjname nogst makegst=$@ system_headers.c
exall-example: exall-example.c
sc link exall-example.c
###############################################################################
assert.o : assert.c
cp437.o : cp437.c
cp850.o : cp850.c
crypt.o : crypt.c system_headers.h assert.h quad_math.h smbfs.h
dump_smb.o : dump_smb.c system_headers.h assert.h quad_math.h smbfs.h dump_smb.h
main.o : main.c system_headers.h assert.h quad_math.h smbfs.h smb_abstraction.h cp437.h cp850.h errors.h dump_smb.h smbfs_rev.h
proc.o : proc.c system_headers.h assert.h quad_math.h smbfs.h errors.h smbfs_rev.h
quad_math.o : quad_math.c quad_math.h
smb_abstraction.o : smb_abstraction.c system_headers.h assert.h quad_math.h smbfs.h errors.h smb_abstraction.h
sock.o : sock.c system_headers.h assert.h quad_math.h smbfs.h smb_abstraction.h dump_smb.h errors.h
swap_stack_and_call.o : swap_stack_and_call.asm
###############################################################################
clean:
-delete \#?.o $(PROJECT)(%|.debug) exall-example(%|.lnk)
realclean: clean
-delete system_headers.gst tags tagfiles \#?.map ID all
###############################################################################
mkid:
mkid -v \#?.(c|h|a|asm|i) include/smb/\#?.h
update:
mkid -v -u
version:
bumprev $(VERSION) $(PROJECT)