Files
amiga-smbfs/source_code/GNUmakefile.os4
T
2018-04-11 12:19:24 +02:00

85 lines
3.0 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 $<"
@$(CC) -c $(CFLAGS) -o $*.o $<
###########################################################################
PROJECT = smbfs
###########################################################################
CC = ppc-amigaos-gcc
###########################################################################
WARNINGS = \
-Wall -W -Wshadow -Wpointer-arith -Wsign-compare -Wmissing-prototypes \
-Wundef -Wbad-function-cast -Wmissing-declarations
OPTIONS = -DNDEBUG
#OPTIONS = -DDEBUG=1 -DDUMP_SMB=1
OPTIMIZE = -O3
DEBUG = -ggdb
###########################################################################
CFLAGS = -mcrt=clib2 -D__NO_NET_API $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) \
-I. -I/V/include -I/usr/local/amiga/ppc-amigaos/sys-include -Iinclude -Inetinclude
LFLAGS = -nostartfiles -nostdlib -L.
###########################################################################
OBJS = main.o proc.o smb_abstraction.o sock.o crypt.o quad_math.o dump_smb.o utf-8-iso-8859-1-conversion.o assert.o
###########################################################################
LIBS = -lc -ldebug
###########################################################################
all: $(PROJECT)
$(PROJECT): $(OBJS)
@echo "Linking $@"
@$(CC) -o $@.debug $(CFLAGS) $(LFLAGS) $(OBJS) $(LIBS) -Wl,--cref,-M,-Map=$@.map
ppc-amigaos-strip -R.comment -o $@ $@.debug
###########################################################################
assert.o : assert.c assert.h
crypt.o : crypt.c system_headers.h assert.h smbfs.h
main.o : main.c system_headers.h assert.h smbfs.h smb_abstraction.h smbfs_rev.h dump_smb.h utf-8-iso-8859-1-conversion.h
proc.o : proc.c system_headers.h assert.h smbfs.h quad_math.h
quad_math.o : quad_math.c quad_math.h
smb_abstraction.o : smb_abstraction.c system_headers.h assert.h smbfs.h smb_abstraction.h
sock.o : sock.c system_headers.h assert.h smbfs.h smb_abstraction.h dump_smb.h
dump_smb.o : dump_smb.c system_headers.h assert.h smbfs.h dump_smb.h quad_math.h
utf-8-iso-8859-1-conversion.o : utf-8-iso-8859-1-conversion.c utf-8-iso-8859-1-conversion.h
###########################################################################
clean:
rm *.o $(PROJECT).debug $(PROJECT).map