mirror of
https://github.com/obarthel/amiga-smbfs.git
synced 2025-12-08 14:58:35 +00:00
Added const qualifiers to the parameters used by the functions in "crypt.c". This in turn revealed that the smb_encrypt() function did not in fact modify the password string passed to it, which allowed the smb_proc_reconnect() function in "proc.c" to be simplified. Augmented the file handle, file lock and SMB file access operations with splay trees to improve performance for validation and lookup. Instead of having to walk the entire list of file, lock or SMB file entries, comparing the list entries by name or address, the entire process should have to check 1-5 entries only. This splay tree functionality is a compile time option which has to be enabled in the "splay.h" header file. If there is a port number given as part of the share name which is out of range, smbfs now reports this as a specific error rather than just stating that the service is not valid. Replaced duplicate code in "smb_abstraction.c" which built path names from a parent directory name and a file/directory name with a single common solution. Revised the build makefiles to create the standard smbfs variant rather than the one with full debugging support enabled. The AmigaOS4 variant specifically avoids using cross-compilation options which would have to be enabled first, if needed.
87 lines
3.1 KiB
Plaintext
87 lines
3.1 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.
|
|
#
|
|
|
|
.c.o:
|
|
@echo "Compiling $<"
|
|
@gcc -c $(CFLAGS) -o $*.o $<
|
|
|
|
###############################################################################
|
|
|
|
PROJECT = smbfs
|
|
|
|
###############################################################################
|
|
|
|
WARNINGS = \
|
|
-Wall -W -Wshadow -Wpointer-arith -Wsign-compare -Wmissing-prototypes \
|
|
-Wundef -Wbad-function-cast -Wmissing-declarations -Wconversion
|
|
|
|
CPU = -m68020-60
|
|
OPTIONS = -fno-builtin -Inetinclude -Iinclude
|
|
OPTIMIZE = -O2 -fomit-frame-pointer
|
|
DEBUG = -DNDEBUG -g
|
|
|
|
###############################################################################
|
|
|
|
CFLAGS = $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(CPU) $(OPTIONS) -Iinclude -I.
|
|
LFLAGS = -nostartfiles -nostdlib -L.
|
|
|
|
###############################################################################
|
|
|
|
OBJS = \
|
|
main.o proc.o smb_abstraction.o sock.o crypt.o quad_math.o dump_smb.o \
|
|
cp437.o cp850.o splay.o
|
|
|
|
###############################################################################
|
|
|
|
LIBS = -lc -ldebug -lamiga
|
|
|
|
###############################################################################
|
|
|
|
all: $(PROJECT)
|
|
|
|
$(PROJECT): $(OBJS)
|
|
gcc -o $@.debug $(OBJS) $(CFLAGS) $(LFLAGS) $(LIBS)
|
|
strip --strip-all -o $@ $@.debug
|
|
protect $@ +e
|
|
|
|
exall-example: exall-example.c
|
|
gcc -o $@ 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 splay.h smbfs.h
|
|
dump_smb.o : dump_smb.c system_headers.h assert.h quad_math.h splay.h smbfs.h dump_smb.h
|
|
main.o : main.c system_headers.h assert.h quad_math.h splay.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 splay.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 splay.h smbfs.h errors.h smb_abstraction.h
|
|
sock.o : sock.c system_headers.h assert.h quad_math.h splay.h smbfs.h smb_abstraction.h dump_smb.h errors.h
|
|
splay.o : splay.c system_headers.h assert.h quad_math.h splay.h smbfs.h
|
|
|
|
###############################################################################
|
|
|
|
clean:
|
|
-delete #?.o #?.map $(PROJECT)(%|.debug) exall-example
|