###############################################################################
#                    Internetting Cooperating Programmers
# -----------------------------------------------------------------------------
#
#  ____    PROJECT
# |  _ \  __ _ _ __   ___ ___ _ __ 
# | | | |/ _` | '_ \ / __/ _ \ '__|
# | |_| | (_| | | | | (_|  __/ |   
# |____/ \__,_|_| |_|\___\___|_|   the IRC bot
#
# All files in this archive are subject to the GNU General Public License.
#
# $Source: /cvsroot/dancer/dancer/src/smakefile,v $
# $Revision: 1.1.1.1 $
# $Date: 2000/11/13 02:42:51 $
# $Author: holsta $
# $State: Exp $
# $Locker:  $
#
# -----------------------------------------------------------------------------
###############################################################################

# Amiga (for SAS/C)
#
# Dancer Amiga makefile (for SAS/C)
# Re-written by Keith Blakemore-Noble (Adric - keith@amiga.u-net.com).
# Sat Jan 18 20:37:12 1997
#
# I have re-written thie makefile, and hopefully it is now a little easier to
# use.
#
# It now automatically copies config.h.amiga to config.h when necessary.
# It also now has an easy-to-use method of generating code for any of the
# 680x0 family, with or without FPU.
#
# Defaults to compiling for 68000 with no FPU.  To compile for others, just
# call by
# smake 020FPU - compiles for 68020 + FPU
# smake 020    - compiles for 68020 with NO FPU.
#
# Similar for 68030/40/60 versions.
#
# Probably of limited use for now, but hopefully useful later is the all:
# target - this creates
# executables for all permutations, and renames them accordingly - Dancer.000,
# Dancer.020FPU, etc.
#
# There is also a deep_clean: target, mainly for internal use by the all:
# option, but sometimes handy.
#
# This is written for the SAS/C compiler, and currently requires the
# AmiTCP-SDK-4.3 to be on your system,
# with include: set to point to the SAS include files, the AmiTCP include files
# AND the FPL include files (available from the same place as the Dancer source).
# You also need to set lib: to point to the normal SAS lib plus the AmiTCP lib.
# (I'll do some proper Amiga compilation notes one day.  Or maybe someone else
# will.  Who knows...)
#
# Would need more work to get it to compile with the Amiga GNU at the moment,
# unfortunately...
#
#
# To Do:
# =====
#     *  Presently I (or someone else) will need to recreate the dependancies
#        list basically copy the .depends file to this makefile before
#        distributing if the .depends has changed.
#        I am looking at how to avoid this for the next release of this
#        smakefile.
#

CC = sc
MAKE = smake

OBJS= dancer.o function.o server.o command.o ctcp.o netstuff.o \
      user.o explain.o seen.o country.o regex.o bans.o transfer.o \
      setup.o tell.o list.o language.o parse.o flood.o ourcrypt.o \
      link.o servfunc.o fplrun.o convert.o news.o strio.o trio.o

#
# These are the default definitions - compile for base 68000, no FPU by default.
#

CPU = 68000
math = standard
mathlib=lib:scm.lib

#
# The normal flags - must be defined AFTER the above flags to allow default compilation to work.
#

# Note - there are lots of "ign" entries here - they just hide the safe warnings the code produces -
#        feel free to remove them from here if you want to see all the warnings, but they all SEEM to be OK.

CFLAGS = verbose def REGEX_MALLOC def HAVE_CONFIG_H data=far code=far ign 79 ign 85 ign 93 ign 84 ign 94 ign 123 ign 88 ign 224 ign 104 ign 225 ign 161 ign 100 ign 183 stackextend CPU=$(CPU) math=$(math)
LDFLAGS = link verbose CPU=$(CPU) math=$(math)
LIBS = lib lib:net.lib lib:sc.lib $(mathlib)


PRG = dancer

dancer: $(OBJS)
   $(CC) $(LDFLAGS) $(OBJS) $(LIBS) to $(PRG)

#
# The following 8 variations allow for different targets.  call by   smake 020 etc.
# (Produces in-line FPU code, so the FPU is REQUIRED for running the final program.
#

020:
    $(MAKE) $(PRG) CPU=68020

020FPU:
    $(MAKE) $(PRG) CPU=68020 math=68882 mathlib=lib:scm881.lib

030:
    $(MAKE) $(PRG) CPU=68030

030FPU:
    $(MAKE) $(PRG) CPU=68030 math=68882 mathlib=lib:scm881.lib

040:
    $(MAKE) $(PRG) CPU=68040

040FPU:
    $(MAKE) $(PRG) CPU=68040 math=68882 mathlib=lib:scm881.lib

060:
    $(MAKE) $(PRG) CPU=68060

060FPU:
    $(MAKE) $(PRG) CPU=68060 math=68882 mathlib=lib:scm881.lib

#
# This is a special case - makes versions for all CPU/FPU combinations...
# (May be useful for distribution versions in the end, maybe not...)
#
all:
    $(MAKE) deep_clean -k
    $(MAKE) $(PRG)
    rename $(PRG) $(PRG).000

    $(MAKE) deep_clean -k
    $(MAKE) 020
    rename $(PRG) $(PRG).020

    $(MAKE) deep_clean -k
    $(MAKE) 020FPU
    rename $(PRG) $(PRG).020FPU

    $(MAKE) deep_clean -k
    $(MAKE) 030
    rename $(PRG) $(PRG).030

    $(MAKE) deep_clean -k
    $(MAKE) 030FPU
    rename $(PRG) $(PRG).030FPU

    $(MAKE) deep_clean -k
    $(MAKE) 040
    rename $(PRG) $(PRG).040

    $(MAKE) deep_clean -k
    $(MAKE) 040FPU
    rename $(PRG) $(PRG).040FPU

    $(MAKE) deep_clean -k
    $(MAKE) 060
    rename $(PRG) $(PRG).060

    $(MAKE) deep_clean -k
    $(MAKE) 060FPU
    rename $(PRG) $(PRG).060FPU

#
# Clean out all object files, config.h and dancer executable itself.
# I.e. ensure that the next make is a full make from scratch.
#
deep_clean:
    delete $(OBJS)
    delete config.h
    delete $(PRG)

#
# Automatically copy the config.h.amiga file as appropriate
#

config.h: config.h.amiga
    copy config.h.amiga config.h

#
# And finally, the depends list - I need to look at making the
#     smakefile automatically read this in for the future.
#

dancer.o: dancer.c dancer.h config.h language.h servfunc.h list.h \
 version.h setup.h server.h netstuff.h user.h function.h explain.h \
 seen.h country.h bans.h transfer.h parse.h link.h ibcp.h regex.h \
 tell.h news.h files.h fplrun.h command.h

function.o: function.c dancer.h config.h language.h servfunc.h list.h \
 version.h regex.h function.h transfer.h user.h

server.o: server.c numeric.h list.h dancer.h config.h language.h \
 servfunc.h version.h function.h user.h command.h ctcp.h transfer.h \
 seen.h server.h bans.h link.h ibcp.h netstuff.h fplrun.h

command.o: command.c dancer.h config.h language.h servfunc.h list.h \
 version.h function.h user.h bans.h explain.h seen.h country.h \
 transfer.h command.h server.h parse.h flood.h link.h ibcp.h \
 netstuff.h convert.h news.h fplrun.h

ctcp.o: ctcp.c dancer.h config.h language.h servfunc.h list.h \
 version.h function.h user.h transfer.h flood.h netstuff.h ctcp.h \
 ibcp.h fplrun.h command.h link.h

netstuff.o: netstuff.c dancer.h config.h language.h servfunc.h list.h \
 version.h function.h user.h server.h transfer.h netstuff.h link.h \
 ibcp.h inet_pton.c inet_ntop.c

user.o: user.c dancer.h config.h language.h servfunc.h list.h \
 version.h function.h user.h tell.h seen.h transfer.h flood.h \
 ourcrypt.h link.h ibcp.h netstuff.h bans.h fplrun.h command.h

explain.o: explain.c dancer.h config.h language.h servfunc.h list.h \
 version.h function.h explain.h

seen.o: seen.c dancer.h config.h language.h servfunc.h list.h \
 version.h function.h user.h transfer.h seen.h

country.o: country.c dancer.h config.h language.h servfunc.h list.h \
 version.h function.h user.h transfer.h country.h

regex.o: regex.c config.h regex.h

bans.o: bans.c dancer.h config.h language.h servfunc.h list.h \
 version.h function.h transfer.h user.h seen.h bans.h flood.h fplrun.h \
 command.h

transfer.o: transfer.c dancer.h config.h language.h servfunc.h list.h \
 version.h function.h user.h transfer.h netstuff.h seen.h link.h \
 ibcp.h flood.h bans.h command.h ctcp.h

setup.o: setup.c config.h list.h dancer.h language.h servfunc.h \
 version.h function.h setup.h user.h command.h files.h

tell.o: tell.c dancer.h config.h language.h servfunc.h list.h \
 version.h function.h user.h transfer.h tell.h news.h

list.o: list.c list.h

language.o: language.c dancer.h config.h language.h servfunc.h list.h \
 version.h transfer.h user.h

parse.o: parse.c parse.h transfer.h dancer.h config.h language.h \
 servfunc.h list.h version.h user.h function.h command.h

flood.o: flood.c dancer.h config.h language.h servfunc.h list.h \
 version.h transfer.h user.h flood.h bans.h

ourcrypt.o: ourcrypt.c

link.o: link.c dancer.h config.h language.h servfunc.h list.h \
 version.h user.h transfer.h link.h ibcp.h netstuff.h command.h \
 function.h

servfunc.o: servfunc.c list.h dancer.h config.h language.h servfunc.h \
 version.h function.h fplrun.h command.h user.h

fplrun.o: fplrun.c config.h FPL.h FPL_protos.h dancer.h language.h \
 servfunc.h list.h version.h transfer.h user.h function.h fplrun.h \
 command.h

convert.o: convert.c dancer.h config.h language.h servfunc.h list.h \
 version.h function.h transfer.h user.h country.h

news.o: news.c dancer.h config.h language.h servfunc.h list.h \
 version.h user.h news.h

strio.o: strio.c strio.h

trio.o: trio.c trio.h strio.h


syntax highlighted by Code2HTML, v. 0.9.1